File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed 
rosidl_typesupport_cpp/cmake 
rosidl_typesupport_c/cmake Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -83,12 +83,18 @@ rosidl_write_generator_arguments(
8383# the search will prefer /usr/bin/python3 over /usr/bin/python3.11.  And that 
8484# latter functionality is only available in CMake 3.20 or later, so we need 
8585# at least that version. 
86- cmake_minimum_required (VERSION  3.27)  # Required by option DEPENDS_EXPLICIT_ONLY of add_custom_command 
86+ cmake_minimum_required (VERSION  3.20) 
8787cmake_policy (SET CMP0094 NEW)
8888set (Python3_FIND_UNVERSIONED_NAMES FIRST)
8989
9090find_package (Python3 REQUIRED COMPONENTS Interpreter)
9191
92+ if (${CMAKE_VERSION}  VERSION_GREATER_EQUAL  3.27)
93+   set (_dep_explicit_only DEPENDS_EXPLICIT_ONLY)
94+ else ()
95+   set (_dep_explicit_only "" )
96+ endif ()
97+ 
9298get_used_typesupports(typesupports "rosidl_typesupport_c" )
9399add_custom_command (
94100  OUTPUT  ${_generated_sources} 
@@ -99,7 +105,7 @@ add_custom_command(
99105  DEPENDS  ${target_dependencies} 
100106  COMMENT  "Generating C type support dispatch for ROS interfaces" 
101107  VERBATIM 
102-   DEPENDS_EXPLICIT_ONLY 
108+   ${_dep_explicit_only} 
103109)
104110
105111set (_target_suffix "__rosidl_typesupport_c" )
Original file line number Diff line number Diff line change @@ -80,12 +80,18 @@ rosidl_write_generator_arguments(
8080# the search will prefer /usr/bin/python3 over /usr/bin/python3.11.  And that 
8181# latter functionality is only available in CMake 3.20 or later, so we need 
8282# at least that version. 
83- cmake_minimum_required (VERSION  3.27)  # Required by option DEPENDS_EXPLICIT_ONLY of add_custom_command 
83+ cmake_minimum_required (VERSION  3.20) 
8484cmake_policy (SET CMP0094 NEW)
8585set (Python3_FIND_UNVERSIONED_NAMES FIRST)
8686
8787find_package (Python3 REQUIRED COMPONENTS Interpreter)
8888
89+ if (${CMAKE_VERSION}  VERSION_GREATER_EQUAL  3.27)
90+   set (_dep_explicit_only DEPENDS_EXPLICIT_ONLY)
91+ else ()
92+   set (_dep_explicit_only "" )
93+ endif ()
94+ 
8995get_used_typesupports(typesupports "rosidl_typesupport_cpp" )
9096add_custom_command (
9197  OUTPUT  ${_generated_sources} 
@@ -96,7 +102,7 @@ add_custom_command(
96102  DEPENDS  ${target_dependencies} 
97103  COMMENT  "Generating C++ type support dispatch for ROS interfaces" 
98104  VERBATIM 
99-   DEPENDS_EXPLICIT_ONLY 
105+   ${_dep_explicit_only} 
100106)
101107
102108set (_target_suffix "__rosidl_typesupport_cpp" )
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments