Skip to content

Commit 2d1ea29

Browse files
committed
Add DEPENDS_EXPLICIT_ONLY to remove implicit dependencies
Signed-off-by: Anthony Welte <[email protected]>
1 parent 5e206b3 commit 2d1ea29

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rosidl_generator_py/cmake/custom_command.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# CMake does not allow `add_custom_command()` to depend on files generated in
1919
# a different CMake subdirectory, and this command is invoked after an
2020
# add_subdirectory() call.
21+
cmake_minimum_required(VERSION 3.27) # Required by option DEPENDS_EXPLICIT_ONLY of add_custom_command
2122
add_custom_command(
2223
OUTPUT ${_generated_extension_files} ${_generated_py_files} ${_generated_c_files}
2324
# This assumes that python_cmake_module was found, which is always the case since this is only
@@ -28,6 +29,7 @@ add_custom_command(
2829
DEPENDS ${target_dependencies} ${rosidl_generate_interfaces_TARGET}
2930
COMMENT "Generating Python code for ROS interfaces"
3031
VERBATIM
32+
DEPENDS_EXPLICIT_ONLY
3133
)
3234

3335
if(TARGET ${rosidl_generate_interfaces_TARGET}${_target_suffix})

0 commit comments

Comments
 (0)