Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions rosidl_generator_py/cmake/custom_command.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
# CMake does not allow `add_custom_command()` to depend on files generated in
# a different CMake subdirectory, and this command is invoked after an
# add_subdirectory() call.
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.27)
set(_dep_explicit_only DEPENDS_EXPLICIT_ONLY)
else()
set(_dep_explicit_only "")
endif()

add_custom_command(
OUTPUT ${_generated_extension_files} ${_generated_py_files} ${_generated_c_files}
# This assumes that python_cmake_module was found, which is always the case since this is only
Expand All @@ -28,6 +34,7 @@ add_custom_command(
DEPENDS ${target_dependencies} ${rosidl_generate_interfaces_TARGET}
COMMENT "Generating Python code for ROS interfaces"
VERBATIM
${_dep_explicit_only}
)

if(TARGET ${rosidl_generate_interfaces_TARGET}${_target_suffix})
Expand Down