You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is how relevant part looks like in cmake 3.23.3 (link):
os << "# Protect against multiple inclusion, which would fail when already ""imported targets are added once more.\n""set(_targetsDefined)\n""set(_targetsNotDefined)\n""set(_expectedTargets)\n""foreach(_expectedTarget " << expectedTargets << ")\n"" list(APPEND _expectedTargets ${_expectedTarget})\n"/* ... */"\n\n";
And this is how relevant part looks like in cmake 3.24 (link):
os << "# Protect against multiple inclusion, which would fail when already ""imported targets are added once more.\n""set(_cmake_targets_defined \"\")\n""set(_cmake_targets_not_defined \"\")\n""set(_cmake_expected_targets \"\")\n""foreach(_cmake_expected_target IN ITEMS " << expectedTargets << ")\n"" list(APPEND _cmake_expected_targets \"${_cmake_expected_target}\")\n"/* ... */"\n\n";
This kind of situation was predicted about 9 month ago, along with a solution, so at least there is a known way to fix it. Alternative quick fix is to use regex like foreach\\((?:_expectedTarget|_cmake_expected_target) (.+)\\), less robust but faster to implement and it has a backward compatibility with previously generated packages. Still, probably better first check if IMPORTED_TARGETS exists, and if not, check for old regex.
The text was updated successfully, but these errors were encountered:
In short, this is how error looks on cmake 3.24:
This is relevant part of ament_cmake_export_targets-extras.cmake:
This is how relevant part looks like in cmake 3.23.3 (link):
And this is how relevant part looks like in cmake 3.24 (link):
This kind of situation was predicted about 9 month ago, along with a solution, so at least there is a known way to fix it. Alternative quick fix is to use regex like
foreach\\((?:_expectedTarget|_cmake_expected_target) (.+)\\)
, less robust but faster to implement and it has a backward compatibility with previously generated packages. Still, probably better first check ifIMPORTED_TARGETS
exists, and if not, check for old regex.The text was updated successfully, but these errors were encountered: