Skip to content

Commit e1790d1

Browse files
committed
Add DEPENDS_EXPLICIT_ONLY to remove implicit dependencies
Signed-off-by: Anthony Welte <[email protected]>
1 parent 8dd0865 commit e1790d1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

rosidl_typesupport_fastrtps_c/cmake/rosidl_typesupport_fastrtps_c_generate_interfaces.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ rosidl_write_generator_arguments(
8888
# the search will prefer /usr/bin/python3 over /usr/bin/python3.11. And that
8989
# latter functionality is only available in CMake 3.20 or later, so we need
9090
# at least that version.
91-
cmake_minimum_required(VERSION 3.20)
91+
cmake_minimum_required(VERSION 3.27) # Required by option DEPENDS_EXPLICIT_ONLY of add_custom_command
9292
cmake_policy(SET CMP0094 NEW)
9393
set(Python3_FIND_UNVERSIONED_NAMES FIRST)
9494

@@ -102,6 +102,7 @@ add_custom_command(
102102
DEPENDS ${target_dependencies}
103103
COMMENT "Generating C type support for eProsima Fast-RTPS"
104104
VERBATIM
105+
DEPENDS_EXPLICIT_ONLY
105106
)
106107

107108
# generate header to switch between export and import for a specific package

rosidl_typesupport_fastrtps_cpp/cmake/rosidl_typesupport_fastrtps_cpp_generate_interfaces.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ rosidl_write_generator_arguments(
9898
# the search will prefer /usr/bin/python3 over /usr/bin/python3.11. And that
9999
# latter functionality is only available in CMake 3.20 or later, so we need
100100
# at least that version.
101-
cmake_minimum_required(VERSION 3.20)
101+
cmake_minimum_required(VERSION 3.27) # Required by option DEPENDS_EXPLICIT_ONLY of add_custom_command
102102
cmake_policy(SET CMP0094 NEW)
103103
set(Python3_FIND_UNVERSIONED_NAMES FIRST)
104104

@@ -113,6 +113,7 @@ add_custom_command(
113113
DEPENDS ${target_dependencies}
114114
COMMENT "Generating C++ type support for eProsima Fast-RTPS"
115115
VERBATIM
116+
DEPENDS_EXPLICIT_ONLY
116117
)
117118

118119
# generate header to switch between export and import for a specific package

0 commit comments

Comments
 (0)