Skip to content

Commit 3e3a646

Browse files
committed
Add DEPENDS_EXPLICIT_ONLY to remove implicit dependencies
1 parent 2fa154b commit 3e3a646

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

rosidl_typesupport_c/cmake/rosidl_typesupport_c_generate_interfaces.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ 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.20)
86+
cmake_minimum_required(VERSION 3.27) # Required by option DEPENDS_EXPLICIT_ONLY of add_custom_command
8787
cmake_policy(SET CMP0094 NEW)
8888
set(Python3_FIND_UNVERSIONED_NAMES FIRST)
8989

@@ -99,6 +99,7 @@ add_custom_command(
9999
DEPENDS ${target_dependencies}
100100
COMMENT "Generating C type support dispatch for ROS interfaces"
101101
VERBATIM
102+
DEPENDS_EXPLICIT_ONLY
102103
)
103104

104105
set(_target_suffix "__rosidl_typesupport_c")

rosidl_typesupport_cpp/cmake/rosidl_typesupport_cpp_generate_interfaces.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ 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.20)
83+
cmake_minimum_required(VERSION 3.27) # Required by option DEPENDS_EXPLICIT_ONLY of add_custom_command
8484
cmake_policy(SET CMP0094 NEW)
8585
set(Python3_FIND_UNVERSIONED_NAMES FIRST)
8686

@@ -96,6 +96,7 @@ add_custom_command(
9696
DEPENDS ${target_dependencies}
9797
COMMENT "Generating C++ type support dispatch for ROS interfaces"
9898
VERBATIM
99+
DEPENDS_EXPLICIT_ONLY
99100
)
100101

101102
set(_target_suffix "__rosidl_typesupport_cpp")

0 commit comments

Comments
 (0)