Closed gavanderhoorn closed 1 year ago
Should line 15 be moved to somewhere around here, so it is also guarded by
RMW_IMPLEMENTATION_DISABLE_RUNTIME_SELECTION
?If this would be OK, I could submit a PR introducing this change.
Yes, that seems totally reasonable to me; as you mention, it is only needed when DISABLE_RUNTIME_SELECTION is OFF. Looks like this was probably just an oversight, so a PR to fix that would be welcome.
See #210.
Bug report
Required Info:
humble
HEAD
)This isn't so much an issue as it is a question: #189 added a build dependency on
ament_index_cpp
tormw_implementation
:https://github.com/ros2/rmw_implementation/blob/8c3c133eb070a4f19259f027cc2cea720b28eff0/rmw_implementation/CMakeLists.txt#L15
From the rest of the
CMakeLists.txt
,ament_index_cpp
only appears to be used whenRMW_IMPLEMENTATION_DISABLE_RUNTIME_SELECTION
isON
:https://github.com/ros2/rmw_implementation/blob/8c3c133eb070a4f19259f027cc2cea720b28eff0/rmw_implementation/CMakeLists.txt#L44-L61
However, because
find_package(ament_index_cpp ..)
appears outside theif(..) else (..)
, it's always executed, which leads to problems on (build) platforms which do not support C++ nor runtime RMW selection.Should line 15 be moved to somewhere around here, so it is also guarded by
RMW_IMPLEMENTATION_DISABLE_RUNTIME_SELECTION
?If this would be OK, I could submit a PR introducing this change.