File tree Expand file tree Collapse file tree 1 file changed +4
-18
lines changed Expand file tree Collapse file tree 1 file changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -12,26 +12,12 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
1212 add_compile_options (-Wno-ignored-qualifiers -Wno-reorder -Wall -Wextra)
1313endif ()
1414
15- if (DEFINED ENV{ROS_DISTRO})
16- set (ROS_DISTRO $ENV{ROS_DISTRO} )
17- endif ()
18-
19- if (NOT DEFINED ROS_DISTRO OR ROS_DISTRO STREQUAL "" )
20- execute_process (
21- COMMAND printenv ROS_DISTRO
22- OUTPUT_VARIABLE ROS_DISTRO
23- OUTPUT_STRIP_TRAILING_WHITESPACE
24- )
25- endif ()
26-
27- if (NOT DEFINED ROS_DISTRO OR ROS_DISTRO STREQUAL "" )
28- message (WARNING "ROS_DISTRO is not defined." )
29- endif ()
30-
31- if (ROS_DISTRO STREQUAL "humble" )
15+ if (EXISTS "/opt/ros/humble" )
3216 add_definitions (-DROS2_HUMBLE)
33- elseif (ROS_DISTRO STREQUAL "jazzy" OR ROS_DISTRO STREQUAL "rolling" )
17+ message ("Humble" )
18+ else ()
3419 add_definitions (-DROS2_JAZZY_OR_ROLLING)
20+ message ("Jazzy or Rolling" )
3521endif ()
3622
3723################################################################################
You can’t perform that action at this time.
0 commit comments