diff --git a/distros/humble/patch/ros2-rosidl-generator-c.patch b/distros/humble/patch/ros2-rosidl-generator-c.patch new file mode 100644 index 00000000..bd073eeb --- /dev/null +++ b/distros/humble/patch/ros2-rosidl-generator-c.patch @@ -0,0 +1,15 @@ +Generated .c/.cpp files installed into include/: https://github.com/ros2/rosidl/pull/1019 + +diff --git a/cmake/rosidl_generator_c_generate_interfaces.cmake b/cmake/rosidl_generator_c_generate_interfaces.cmake +index b024fe0..2500186 100644 +--- a/cmake/rosidl_generator_c_generate_interfaces.cmake ++++ b/cmake/rosidl_generator_c_generate_interfaces.cmake +@@ -149,7 +149,7 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) + install( + DIRECTORY ${_output_path}/ + DESTINATION "include/${PROJECT_NAME}/${PROJECT_NAME}" +- PATTERN "*.h" ++ PATTERN "*.c" EXCLUDE + ) + + # Export old-style CMake variables diff --git a/distros/humble/patch/ros2-rosidl-generator-py.patch b/distros/humble/patch/ros2-rosidl-generator-py.patch index 94d9d961..956da1b2 100644 --- a/distros/humble/patch/ros2-rosidl-generator-py.patch +++ b/distros/humble/patch/ros2-rosidl-generator-py.patch @@ -1,5 +1,7 @@ +egg-info written before the code is generated, backport of https://github.com/ament/ament_cmake/pull/587 and https://github.com/ros2/rosidl_python/pull/254 + diff --git a/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake b/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake -index a6d8263..786d2a5 100644 +index a6d8263..0ef854e 100644 --- a/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake +++ b/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake @@ -17,10 +17,22 @@ find_package(rosidl_runtime_c REQUIRED) @@ -28,7 +30,29 @@ index a6d8263..786d2a5 100644 # Get a list of typesupport implementations from valid rmw implementations. rosidl_generator_py_get_typesupports(_typesupport_impls) -@@ -164,7 +176,7 @@ set(rosidl_generator_py_suffix "__rosidl_generator_py") +@@ -142,6 +154,21 @@ set_property( + ${_generated_extension_files} ${_generated_py_files} ${_generated_c_files} + PROPERTY GENERATED 1) + ++# ament_python_install_package() copies (or symlinks) the package directory ++# into the build directory and runs `setup.py egg_info` on it. Do that only ++# after the Python code has been generated, otherwise the egg-info (e.g. ++# SOURCES.txt) lists only __init__.py. Fixed upstream in rolling by ++# ament/ament_cmake#587 and ros2/rosidl_python#254. ++if(NOT rosidl_generate_interfaces_SKIP_INSTALL) ++ foreach(_copy_target ++ ament_cmake_python_copy_${PROJECT_NAME} ++ ament_cmake_python_symlink_${PROJECT_NAME}) ++ if(TARGET ${_copy_target}) ++ add_dependencies(${_copy_target} ${rosidl_generate_interfaces_TARGET}${_target_suffix}) ++ endif() ++ endforeach() ++endif() ++ + macro(set_properties _build_type) + set_target_properties(${_target_name} PROPERTIES + COMPILE_OPTIONS "${_extension_compile_flags}" +@@ -164,7 +191,7 @@ set(rosidl_generator_py_suffix "__rosidl_generator_py") set(_target_name_lib "${rosidl_generate_interfaces_TARGET}${rosidl_generator_py_suffix}") add_library(${_target_name_lib} SHARED ${_generated_c_files}) @@ -37,7 +61,7 @@ index a6d8263..786d2a5 100644 ${rosidl_generate_interfaces_TARGET}__rosidl_generator_c) add_dependencies( ${_target_name_lib} -@@ -172,45 +184,24 @@ add_dependencies( +@@ -172,45 +199,24 @@ add_dependencies( ${rosidl_generate_interfaces_TARGET}__rosidl_typesupport_c ) @@ -92,7 +116,7 @@ index a6d8263..786d2a5 100644 foreach(_typesupport_impl ${_typesupport_impls}) find_package(${_typesupport_impl} REQUIRED) -@@ -223,7 +214,7 @@ foreach(_typesupport_impl ${_typesupport_impls}) +@@ -223,7 +229,7 @@ foreach(_typesupport_impl ${_typesupport_impls}) set(_pyext_suffix "__pyext") set(_target_name "${PROJECT_NAME}__${_typesupport_impl}${_pyext_suffix}") @@ -101,7 +125,7 @@ index a6d8263..786d2a5 100644 ${_generated_extension_${_typesupport_impl}_files} ) add_dependencies( -@@ -244,39 +235,28 @@ foreach(_typesupport_impl ${_typesupport_impls}) +@@ -244,39 +250,28 @@ foreach(_typesupport_impl ${_typesupport_impls}) set_properties("_RELWITHDEBINFO") endif() target_link_libraries( @@ -148,7 +172,7 @@ index a6d8263..786d2a5 100644 if(NOT rosidl_generate_interfaces_SKIP_INSTALL) install(TARGETS ${_target_name} -@@ -288,7 +268,7 @@ set(PYTHON_EXECUTABLE ${_PYTHON_EXECUTABLE}) +@@ -288,7 +283,7 @@ set(PYTHON_EXECUTABLE ${_PYTHON_EXECUTABLE}) # Depend on rosidl_generator_py generated targets from our dependencies foreach(_pkg_name ${rosidl_generate_interfaces_DEPENDENCY_PACKAGE_NAMES}) @@ -157,7 +181,7 @@ index a6d8263..786d2a5 100644 endforeach() set_lib_properties("") -@@ -305,9 +285,22 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) +@@ -305,9 +300,22 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) LIBRARY DESTINATION lib RUNTIME DESTINATION bin) diff --git a/distros/humble/patch/ros2-rosidl-typesupport-introspection-c.patch b/distros/humble/patch/ros2-rosidl-typesupport-introspection-c.patch new file mode 100644 index 00000000..4099c6a3 --- /dev/null +++ b/distros/humble/patch/ros2-rosidl-typesupport-introspection-c.patch @@ -0,0 +1,15 @@ +Generated .c/.cpp files installed into include/: https://github.com/ros2/rosidl/pull/1019 + +diff --git a/cmake/rosidl_typesupport_introspection_c_generate_interfaces.cmake b/cmake/rosidl_typesupport_introspection_c_generate_interfaces.cmake +index 26e0974..f131e75 100644 +--- a/cmake/rosidl_typesupport_introspection_c_generate_interfaces.cmake ++++ b/cmake/rosidl_typesupport_introspection_c_generate_interfaces.cmake +@@ -141,7 +141,7 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) + install( + DIRECTORY ${_output_path}/ + DESTINATION "include/${PROJECT_NAME}/${PROJECT_NAME}" +- PATTERN "*.h" ++ PATTERN "*.c" EXCLUDE + ) + install( + TARGETS ${rosidl_generate_interfaces_TARGET}${_target_suffix} diff --git a/distros/humble/patch/ros2-rosidl-typesupport-introspection-cpp.patch b/distros/humble/patch/ros2-rosidl-typesupport-introspection-cpp.patch new file mode 100644 index 00000000..e12acbc8 --- /dev/null +++ b/distros/humble/patch/ros2-rosidl-typesupport-introspection-cpp.patch @@ -0,0 +1,15 @@ +Generated .c/.cpp files installed into include/: https://github.com/ros2/rosidl/pull/1019 + +diff --git a/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake b/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake +index 88f6c6a..32fe845 100644 +--- a/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake ++++ b/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake +@@ -140,7 +140,7 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) + install( + DIRECTORY ${_output_path}/ + DESTINATION "include/${PROJECT_NAME}/${PROJECT_NAME}" +- PATTERN "*.hpp" ++ PATTERN "*.cpp" EXCLUDE + ) + + install( diff --git a/distros/humble/pkg_additional_info.yaml b/distros/humble/pkg_additional_info.yaml index 4fa48a11..fcae1feb 100644 --- a/distros/humble/pkg_additional_info.yaml +++ b/distros/humble/pkg_additional_info.yaml @@ -109,3 +109,11 @@ ament_cmake_gmock: # as ament_cmake_gtest build_number: 23 ament_cmake_gtest: # uses conda-forge's gtest instead of gtest_vendor's sources build_number: 23 +rosidl_generator_c: + build_number: 24 +rosidl_generator_py: + build_number: 24 +rosidl_typesupport_introspection_c: + build_number: 24 +rosidl_typesupport_introspection_cpp: + build_number: 24 diff --git a/distros/jazzy/patch/ros2-rosidl-generator-c.patch b/distros/jazzy/patch/ros2-rosidl-generator-c.patch new file mode 100644 index 00000000..610a0b62 --- /dev/null +++ b/distros/jazzy/patch/ros2-rosidl-generator-c.patch @@ -0,0 +1,30 @@ +Type descriptions out of date on incremental builds: https://github.com/ros2/rosidl/pull/1018 +Generated .c/.cpp files installed into include/: https://github.com/ros2/rosidl/pull/1019 + +diff --git a/cmake/rosidl_generator_c_generate_interfaces.cmake b/cmake/rosidl_generator_c_generate_interfaces.cmake +index 8bab169..7ac96d2 100644 +--- a/cmake/rosidl_generator_c_generate_interfaces.cmake ++++ b/cmake/rosidl_generator_c_generate_interfaces.cmake +@@ -78,6 +78,13 @@ foreach(dep ${target_dependencies}) + endif() + endforeach() + ++# The generated code embeds the type descriptions of this package, which are ++# only generated at build time, so add them after the existence check ++foreach(_tuple ${${rosidl_generate_interfaces_TARGET}__DESCRIPTION_TUPLES}) ++ string(REGEX REPLACE "^[^:]*:(.*)$" "\\1" _type_description_file "${_tuple}") ++ list(APPEND target_dependencies "${_type_description_file}") ++endforeach() ++ + get_target_property(_target_sources ${rosidl_generate_interfaces_TARGET} SOURCES) + set(generator_arguments_file "${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_c__arguments.json") + rosidl_write_generator_arguments( +@@ -185,7 +192,7 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) + install( + DIRECTORY ${_output_path}/ + DESTINATION "include/${PROJECT_NAME}/${PROJECT_NAME}" +- PATTERN "*.h" ++ PATTERN "*.c" EXCLUDE + ) + + # Export old-style CMake variables diff --git a/distros/jazzy/patch/ros2-rosidl-generator-cpp.patch b/distros/jazzy/patch/ros2-rosidl-generator-cpp.patch new file mode 100644 index 00000000..0e80c0b9 --- /dev/null +++ b/distros/jazzy/patch/ros2-rosidl-generator-cpp.patch @@ -0,0 +1,20 @@ +Type descriptions out of date on incremental builds: https://github.com/ros2/rosidl/pull/1018 + +diff --git a/cmake/rosidl_generator_cpp_generate_interfaces.cmake b/cmake/rosidl_generator_cpp_generate_interfaces.cmake +index 864ed78..570a044 100644 +--- a/cmake/rosidl_generator_cpp_generate_interfaces.cmake ++++ b/cmake/rosidl_generator_cpp_generate_interfaces.cmake +@@ -82,6 +82,13 @@ foreach(dep ${target_dependencies}) + endif() + endforeach() + ++# The generated code embeds the type hashes of this package, which are only ++# generated at build time, so add them after the existence check ++foreach(_tuple ${${rosidl_generate_interfaces_TARGET}__DESCRIPTION_TUPLES}) ++ string(REGEX REPLACE "^[^:]*:(.*)$" "\\1" _type_description_file "${_tuple}") ++ list(APPEND target_dependencies "${_type_description_file}") ++endforeach() ++ + set(generator_arguments_file "${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_cpp__arguments.json") + rosidl_write_generator_arguments( + "${generator_arguments_file}" diff --git a/distros/jazzy/patch/ros2-rosidl-generator-py.patch b/distros/jazzy/patch/ros2-rosidl-generator-py.patch index 193ed415..5fa36227 100644 --- a/distros/jazzy/patch/ros2-rosidl-generator-py.patch +++ b/distros/jazzy/patch/ros2-rosidl-generator-py.patch @@ -1,5 +1,8 @@ +egg-info written before the code is generated, backport of https://github.com/ament/ament_cmake/pull/587 and https://github.com/ros2/rosidl_python/pull/254 +Duplicate extension modules in Release/ on Windows: https://github.com/ros2/rosidl_python/pull/272 + diff --git a/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake b/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake -index cfc424a..1808ad5 100644 +index cfc424a..11b78dc 100644 --- a/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake +++ b/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake @@ -21,6 +21,11 @@ find_package(rosidl_typesupport_interface REQUIRED) @@ -14,7 +17,29 @@ index cfc424a..1808ad5 100644 # Get a list of typesupport implementations from valid rmw implementations. rosidl_generator_py_get_typesupports(_typesupport_impls) -@@ -146,10 +151,13 @@ add_dependencies( +@@ -136,6 +141,21 @@ set_property( + ${_generated_extension_files} ${_generated_py_files} ${_generated_c_files} + PROPERTY GENERATED 1) + ++# ament_python_install_package() copies (or symlinks) the package directory ++# into the build directory and runs `setup.py egg_info` on it. Do that only ++# after the Python code has been generated, otherwise the egg-info (e.g. ++# SOURCES.txt) lists only __init__.py. Fixed upstream in rolling by ++# ament/ament_cmake#587 and ros2/rosidl_python#254. ++if(NOT rosidl_generate_interfaces_SKIP_INSTALL) ++ foreach(_copy_target ++ ament_cmake_python_copy_${PROJECT_NAME} ++ ament_cmake_python_symlink_${PROJECT_NAME}) ++ if(TARGET ${_copy_target}) ++ add_dependencies(${_copy_target} ${rosidl_generate_interfaces_TARGET}${_target_suffix}) ++ endif() ++ endforeach() ++endif() ++ + set(_target_name_lib "${rosidl_generate_interfaces_TARGET}__rosidl_generator_py") + add_library(${_target_name_lib} SHARED ${_generated_c_files}) + target_link_libraries(${_target_name_lib} PRIVATE +@@ -146,10 +166,13 @@ add_dependencies( ${rosidl_generate_interfaces_TARGET}__rosidl_typesupport_c ) @@ -29,7 +54,22 @@ index cfc424a..1808ad5 100644 ) target_include_directories(${_target_name_lib} PRIVATE -@@ -243,9 +251,22 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) +@@ -189,9 +212,12 @@ foreach(_typesupport_impl ${_typesupport_impls}) + # TODO(sloretz) use target_compile_options when python extension passes -Wpedantic + set_target_properties(${_target_name} PROPERTIES COMPILE_OPTIONS "${_extension_compile_flags}") + ++ # Multi-config generators append a per-configuration subdirectory unless the ++ # output directory contains a generator expression. That subdirectory would ++ # end up in the Python package, which is installed as a whole. + set_target_properties(${_target_name} PROPERTIES +- LIBRARY_OUTPUT_DIRECTORY ${_output_path} +- RUNTIME_OUTPUT_DIRECTORY ${_output_path}) ++ LIBRARY_OUTPUT_DIRECTORY "$<1:${_output_path}>" ++ RUNTIME_OUTPUT_DIRECTORY "$<1:${_output_path}>") + + target_link_libraries( + ${_target_name} PRIVATE +@@ -243,9 +269,22 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) LIBRARY DESTINATION lib RUNTIME DESTINATION bin) diff --git a/distros/jazzy/patch/ros2-rosidl-generator-type-description.patch b/distros/jazzy/patch/ros2-rosidl-generator-type-description.patch new file mode 100644 index 00000000..85bdfe78 --- /dev/null +++ b/distros/jazzy/patch/ros2-rosidl-generator-type-description.patch @@ -0,0 +1,19 @@ +Type descriptions out of date on incremental builds: https://github.com/ros2/rosidl/pull/1018 + +diff --git a/cmake/rosidl_generator_type_description_generate_interfaces.cmake b/cmake/rosidl_generator_type_description_generate_interfaces.cmake +index ed29cda..5375a3a 100644 +--- a/cmake/rosidl_generator_type_description_generate_interfaces.cmake ++++ b/cmake/rosidl_generator_type_description_generate_interfaces.cmake +@@ -52,6 +52,12 @@ foreach(_pkg_name ${rosidl_generate_interfaces_DEPENDENCY_PACKAGE_NAMES}) + set(_include_path "${${_pkg_name}_DIR}/..") + normalize_path(_include_path "${_include_path}") + list(APPEND _dependency_paths "${_pkg_name}:${_include_path}") ++ # The generator reads the type descriptions of referenced types from the ++ # .json files installed next to the dependency's .idl files ++ foreach(_idl_file ${${_pkg_name}_IDL_FILES}) ++ string(REGEX REPLACE "\\.idl$" ".json" _json_file "${_idl_file}") ++ list(APPEND _dependency_files "${_include_path}/${_json_file}") ++ endforeach() + endforeach() + + # Export __DESCRIPTION_TUPLES variable for use by dependent generators diff --git a/distros/jazzy/patch/ros2-rosidl-typesupport-introspection-c.patch b/distros/jazzy/patch/ros2-rosidl-typesupport-introspection-c.patch new file mode 100644 index 00000000..725ff6ab --- /dev/null +++ b/distros/jazzy/patch/ros2-rosidl-typesupport-introspection-c.patch @@ -0,0 +1,15 @@ +Generated .c/.cpp files installed into include/: https://github.com/ros2/rosidl/pull/1019 + +diff --git a/cmake/rosidl_typesupport_introspection_c_generate_interfaces.cmake b/cmake/rosidl_typesupport_introspection_c_generate_interfaces.cmake +index dfad37a..0155ed6 100644 +--- a/cmake/rosidl_typesupport_introspection_c_generate_interfaces.cmake ++++ b/cmake/rosidl_typesupport_introspection_c_generate_interfaces.cmake +@@ -163,7 +163,7 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) + install( + DIRECTORY ${_output_path}/ + DESTINATION "include/${PROJECT_NAME}/${PROJECT_NAME}" +- PATTERN "*.h" ++ PATTERN "*.c" EXCLUDE + ) + install( + TARGETS ${rosidl_generate_interfaces_TARGET}${_target_suffix} diff --git a/distros/jazzy/patch/ros2-rosidl-typesupport-introspection-cpp.patch b/distros/jazzy/patch/ros2-rosidl-typesupport-introspection-cpp.patch new file mode 100644 index 00000000..55e7a719 --- /dev/null +++ b/distros/jazzy/patch/ros2-rosidl-typesupport-introspection-cpp.patch @@ -0,0 +1,15 @@ +Generated .c/.cpp files installed into include/: https://github.com/ros2/rosidl/pull/1019 + +diff --git a/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake b/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake +index daedc90..a44c8ee 100644 +--- a/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake ++++ b/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake +@@ -157,7 +157,7 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) + install( + DIRECTORY ${_output_path}/ + DESTINATION "include/${PROJECT_NAME}/${PROJECT_NAME}" +- PATTERN "*.hpp" ++ PATTERN "*.cpp" EXCLUDE + ) + + install( diff --git a/distros/jazzy/pkg_additional_info.yaml b/distros/jazzy/pkg_additional_info.yaml index abcf91cd..7a44d5e8 100644 --- a/distros/jazzy/pkg_additional_info.yaml +++ b/distros/jazzy/pkg_additional_info.yaml @@ -135,6 +135,18 @@ ament_cmake_gtest: # uses conda-forge's gtest instead of gtest_vendor's sources build_number: 28 gz_ogre_next_vendor: build_number: 28 +rosidl_generator_c: + build_number: 29 +rosidl_generator_cpp: + build_number: 29 +rosidl_generator_py: + build_number: 29 +rosidl_generator_type_description: + build_number: 29 +rosidl_typesupport_introspection_c: + build_number: 29 +rosidl_typesupport_introspection_cpp: + build_number: 29 rviz_ogre_vendor: additional_cmake_args: "-DRVIZ_OGRE_VENDOR_MANGLE_NAME_OF_LIBRARIES_USED_BY_RVIZ=ON" build_number: 28 # built without the EXR codec (ros2-rviz-ogre-vendor.patch) diff --git a/distros/lyrical/patch/ros2-rosidl-generator-c.patch b/distros/lyrical/patch/ros2-rosidl-generator-c.patch new file mode 100644 index 00000000..610a0b62 --- /dev/null +++ b/distros/lyrical/patch/ros2-rosidl-generator-c.patch @@ -0,0 +1,30 @@ +Type descriptions out of date on incremental builds: https://github.com/ros2/rosidl/pull/1018 +Generated .c/.cpp files installed into include/: https://github.com/ros2/rosidl/pull/1019 + +diff --git a/cmake/rosidl_generator_c_generate_interfaces.cmake b/cmake/rosidl_generator_c_generate_interfaces.cmake +index 8bab169..7ac96d2 100644 +--- a/cmake/rosidl_generator_c_generate_interfaces.cmake ++++ b/cmake/rosidl_generator_c_generate_interfaces.cmake +@@ -78,6 +78,13 @@ foreach(dep ${target_dependencies}) + endif() + endforeach() + ++# The generated code embeds the type descriptions of this package, which are ++# only generated at build time, so add them after the existence check ++foreach(_tuple ${${rosidl_generate_interfaces_TARGET}__DESCRIPTION_TUPLES}) ++ string(REGEX REPLACE "^[^:]*:(.*)$" "\\1" _type_description_file "${_tuple}") ++ list(APPEND target_dependencies "${_type_description_file}") ++endforeach() ++ + get_target_property(_target_sources ${rosidl_generate_interfaces_TARGET} SOURCES) + set(generator_arguments_file "${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_c__arguments.json") + rosidl_write_generator_arguments( +@@ -185,7 +192,7 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) + install( + DIRECTORY ${_output_path}/ + DESTINATION "include/${PROJECT_NAME}/${PROJECT_NAME}" +- PATTERN "*.h" ++ PATTERN "*.c" EXCLUDE + ) + + # Export old-style CMake variables diff --git a/distros/lyrical/patch/ros2-rosidl-generator-cpp.patch b/distros/lyrical/patch/ros2-rosidl-generator-cpp.patch new file mode 100644 index 00000000..0e80c0b9 --- /dev/null +++ b/distros/lyrical/patch/ros2-rosidl-generator-cpp.patch @@ -0,0 +1,20 @@ +Type descriptions out of date on incremental builds: https://github.com/ros2/rosidl/pull/1018 + +diff --git a/cmake/rosidl_generator_cpp_generate_interfaces.cmake b/cmake/rosidl_generator_cpp_generate_interfaces.cmake +index 864ed78..570a044 100644 +--- a/cmake/rosidl_generator_cpp_generate_interfaces.cmake ++++ b/cmake/rosidl_generator_cpp_generate_interfaces.cmake +@@ -82,6 +82,13 @@ foreach(dep ${target_dependencies}) + endif() + endforeach() + ++# The generated code embeds the type hashes of this package, which are only ++# generated at build time, so add them after the existence check ++foreach(_tuple ${${rosidl_generate_interfaces_TARGET}__DESCRIPTION_TUPLES}) ++ string(REGEX REPLACE "^[^:]*:(.*)$" "\\1" _type_description_file "${_tuple}") ++ list(APPEND target_dependencies "${_type_description_file}") ++endforeach() ++ + set(generator_arguments_file "${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_cpp__arguments.json") + rosidl_write_generator_arguments( + "${generator_arguments_file}" diff --git a/distros/lyrical/patch/ros2-rosidl-generator-py.patch b/distros/lyrical/patch/ros2-rosidl-generator-py.patch index e6fcb610..af5573fd 100644 --- a/distros/lyrical/patch/ros2-rosidl-generator-py.patch +++ b/distros/lyrical/patch/ros2-rosidl-generator-py.patch @@ -1,5 +1,7 @@ +Duplicate extension modules in Release/ on Windows: https://github.com/ros2/rosidl_python/pull/272 + diff --git a/cmake/rosidl_generator_py_generate_interfaces.cmake b/cmake/rosidl_generator_py_generate_interfaces.cmake -index 2fe245b..24eb493 100644 +index 2fe245b..3f1be8c 100644 --- a/cmake/rosidl_generator_py_generate_interfaces.cmake +++ b/cmake/rosidl_generator_py_generate_interfaces.cmake @@ -35,6 +35,11 @@ set(Python3_FIND_UNVERSIONED_NAMES FIRST) @@ -29,7 +31,22 @@ index 2fe245b..24eb493 100644 ) target_include_directories(${_target_name_lib} PRIVATE -@@ -257,9 +265,22 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) +@@ -207,9 +215,12 @@ foreach(_typesupport_impl ${_typesupport_impls}) + # TODO(sloretz) use target_compile_options when python extension passes -Wpedantic + set_target_properties(${_target_name} PROPERTIES COMPILE_OPTIONS "${_extension_compile_flags}") + ++ # Multi-config generators append a per-configuration subdirectory unless the ++ # output directory contains a generator expression. That subdirectory would ++ # end up in the Python package, which is installed as a whole. + set_target_properties(${_target_name} PROPERTIES +- LIBRARY_OUTPUT_DIRECTORY ${_output_path} +- RUNTIME_OUTPUT_DIRECTORY ${_output_path}) ++ LIBRARY_OUTPUT_DIRECTORY "$<1:${_output_path}>" ++ RUNTIME_OUTPUT_DIRECTORY "$<1:${_output_path}>") + + target_link_libraries( + ${_target_name} PRIVATE +@@ -257,9 +268,22 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) LIBRARY DESTINATION lib RUNTIME DESTINATION bin) diff --git a/distros/lyrical/patch/ros2-rosidl-generator-type-description.patch b/distros/lyrical/patch/ros2-rosidl-generator-type-description.patch new file mode 100644 index 00000000..88f8da69 --- /dev/null +++ b/distros/lyrical/patch/ros2-rosidl-generator-type-description.patch @@ -0,0 +1,19 @@ +Type descriptions out of date on incremental builds: https://github.com/ros2/rosidl/pull/1018 + +diff --git a/cmake/rosidl_generator_type_description_generate_interfaces.cmake b/cmake/rosidl_generator_type_description_generate_interfaces.cmake +index 0e420f1..67d6b91 100644 +--- a/cmake/rosidl_generator_type_description_generate_interfaces.cmake ++++ b/cmake/rosidl_generator_type_description_generate_interfaces.cmake +@@ -52,6 +52,12 @@ foreach(_pkg_name ${rosidl_generate_interfaces_DEPENDENCY_PACKAGE_NAMES}) + set(_include_path "${${_pkg_name}_DIR}/..") + normalize_path(_include_path "${_include_path}") + list(APPEND _dependency_paths "${_pkg_name}:${_include_path}") ++ # The generator reads the type descriptions of referenced types from the ++ # .json files installed next to the dependency's .idl files ++ foreach(_idl_file ${${_pkg_name}_IDL_FILES}) ++ string(REGEX REPLACE "\\.idl$" ".json" _json_file "${_idl_file}") ++ list(APPEND _dependency_files "${_include_path}/${_json_file}") ++ endforeach() + endforeach() + + # Export __DESCRIPTION_TUPLES variable for use by dependent generators diff --git a/distros/lyrical/patch/ros2-rosidl-typesupport-introspection-c.patch b/distros/lyrical/patch/ros2-rosidl-typesupport-introspection-c.patch new file mode 100644 index 00000000..f26fd368 --- /dev/null +++ b/distros/lyrical/patch/ros2-rosidl-typesupport-introspection-c.patch @@ -0,0 +1,15 @@ +Generated .c/.cpp files installed into include/: https://github.com/ros2/rosidl/pull/1019 + +diff --git a/cmake/rosidl_typesupport_introspection_c_generate_interfaces.cmake b/cmake/rosidl_typesupport_introspection_c_generate_interfaces.cmake +index aaf9254..2812af3 100644 +--- a/cmake/rosidl_typesupport_introspection_c_generate_interfaces.cmake ++++ b/cmake/rosidl_typesupport_introspection_c_generate_interfaces.cmake +@@ -172,7 +172,7 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) + install( + DIRECTORY ${_output_path}/ + DESTINATION "include/${PROJECT_NAME}/${PROJECT_NAME}" +- PATTERN "*.h" ++ PATTERN "*.c" EXCLUDE + ) + install( + TARGETS ${rosidl_generate_interfaces_TARGET}${_target_suffix} diff --git a/distros/lyrical/patch/ros2-rosidl-typesupport-introspection-cpp.patch b/distros/lyrical/patch/ros2-rosidl-typesupport-introspection-cpp.patch new file mode 100644 index 00000000..c4830f82 --- /dev/null +++ b/distros/lyrical/patch/ros2-rosidl-typesupport-introspection-cpp.patch @@ -0,0 +1,15 @@ +Generated .c/.cpp files installed into include/: https://github.com/ros2/rosidl/pull/1019 + +diff --git a/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake b/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake +index ed1a3a6..ddb3b7b 100644 +--- a/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake ++++ b/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake +@@ -166,7 +166,7 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) + install( + DIRECTORY ${_output_path}/ + DESTINATION "include/${PROJECT_NAME}/${PROJECT_NAME}" +- PATTERN "*.hpp" ++ PATTERN "*.cpp" EXCLUDE + ) + + install( diff --git a/distros/lyrical/pkg_additional_info.yaml b/distros/lyrical/pkg_additional_info.yaml index 4b86a893..d8af4e01 100644 --- a/distros/lyrical/pkg_additional_info.yaml +++ b/distros/lyrical/pkg_additional_info.yaml @@ -113,6 +113,18 @@ urdfdom_headers: zenoh_cpp_vendor: additional_cmake_args: "-DAMENT_VENDOR_POLICY=NEVER_VENDOR_IGNORE_SATISFIED_CHECK -DUSE_SYSTEM_ZENOH=ON" # Remove build_number fields below on new full rebuild +rosidl_generator_c: + build_number: 32 +rosidl_generator_cpp: + build_number: 32 +rosidl_generator_py: + build_number: 32 +rosidl_generator_type_description: + build_number: 32 +rosidl_typesupport_introspection_c: + build_number: 32 +rosidl_typesupport_introspection_cpp: + build_number: 32 rviz_ogre_vendor: additional_cmake_args: "-DRVIZ_OGRE_VENDOR_MANGLE_NAME_OF_LIBRARIES_USED_BY_RVIZ=ON" build_number: 31 # built without the EXR codec (ros2-rviz-ogre-vendor.patch) diff --git a/distros/rolling/patch/ros2-rosidl-generator-c.patch b/distros/rolling/patch/ros2-rosidl-generator-c.patch new file mode 100644 index 00000000..610a0b62 --- /dev/null +++ b/distros/rolling/patch/ros2-rosidl-generator-c.patch @@ -0,0 +1,30 @@ +Type descriptions out of date on incremental builds: https://github.com/ros2/rosidl/pull/1018 +Generated .c/.cpp files installed into include/: https://github.com/ros2/rosidl/pull/1019 + +diff --git a/cmake/rosidl_generator_c_generate_interfaces.cmake b/cmake/rosidl_generator_c_generate_interfaces.cmake +index 8bab169..7ac96d2 100644 +--- a/cmake/rosidl_generator_c_generate_interfaces.cmake ++++ b/cmake/rosidl_generator_c_generate_interfaces.cmake +@@ -78,6 +78,13 @@ foreach(dep ${target_dependencies}) + endif() + endforeach() + ++# The generated code embeds the type descriptions of this package, which are ++# only generated at build time, so add them after the existence check ++foreach(_tuple ${${rosidl_generate_interfaces_TARGET}__DESCRIPTION_TUPLES}) ++ string(REGEX REPLACE "^[^:]*:(.*)$" "\\1" _type_description_file "${_tuple}") ++ list(APPEND target_dependencies "${_type_description_file}") ++endforeach() ++ + get_target_property(_target_sources ${rosidl_generate_interfaces_TARGET} SOURCES) + set(generator_arguments_file "${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_c__arguments.json") + rosidl_write_generator_arguments( +@@ -185,7 +192,7 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) + install( + DIRECTORY ${_output_path}/ + DESTINATION "include/${PROJECT_NAME}/${PROJECT_NAME}" +- PATTERN "*.h" ++ PATTERN "*.c" EXCLUDE + ) + + # Export old-style CMake variables diff --git a/distros/rolling/patch/ros2-rosidl-generator-cpp.patch b/distros/rolling/patch/ros2-rosidl-generator-cpp.patch new file mode 100644 index 00000000..0e80c0b9 --- /dev/null +++ b/distros/rolling/patch/ros2-rosidl-generator-cpp.patch @@ -0,0 +1,20 @@ +Type descriptions out of date on incremental builds: https://github.com/ros2/rosidl/pull/1018 + +diff --git a/cmake/rosidl_generator_cpp_generate_interfaces.cmake b/cmake/rosidl_generator_cpp_generate_interfaces.cmake +index 864ed78..570a044 100644 +--- a/cmake/rosidl_generator_cpp_generate_interfaces.cmake ++++ b/cmake/rosidl_generator_cpp_generate_interfaces.cmake +@@ -82,6 +82,13 @@ foreach(dep ${target_dependencies}) + endif() + endforeach() + ++# The generated code embeds the type hashes of this package, which are only ++# generated at build time, so add them after the existence check ++foreach(_tuple ${${rosidl_generate_interfaces_TARGET}__DESCRIPTION_TUPLES}) ++ string(REGEX REPLACE "^[^:]*:(.*)$" "\\1" _type_description_file "${_tuple}") ++ list(APPEND target_dependencies "${_type_description_file}") ++endforeach() ++ + set(generator_arguments_file "${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_cpp__arguments.json") + rosidl_write_generator_arguments( + "${generator_arguments_file}" diff --git a/distros/rolling/patch/ros2-rosidl-generator-py.patch b/distros/rolling/patch/ros2-rosidl-generator-py.patch index 0cf05c62..206641ec 100644 --- a/distros/rolling/patch/ros2-rosidl-generator-py.patch +++ b/distros/rolling/patch/ros2-rosidl-generator-py.patch @@ -1,5 +1,7 @@ +Duplicate extension modules in Release/ on Windows: https://github.com/ros2/rosidl_python/pull/272 + diff --git a/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake b/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake -index 2fe245b..24eb493 100644 +index 2fe245b..3f1be8c 100644 --- a/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake +++ b/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake @@ -35,6 +35,11 @@ set(Python3_FIND_UNVERSIONED_NAMES FIRST) @@ -29,7 +31,22 @@ index 2fe245b..24eb493 100644 ) target_include_directories(${_target_name_lib} PRIVATE -@@ -257,9 +265,22 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) +@@ -207,9 +215,12 @@ foreach(_typesupport_impl ${_typesupport_impls}) + # TODO(sloretz) use target_compile_options when python extension passes -Wpedantic + set_target_properties(${_target_name} PROPERTIES COMPILE_OPTIONS "${_extension_compile_flags}") + ++ # Multi-config generators append a per-configuration subdirectory unless the ++ # output directory contains a generator expression. That subdirectory would ++ # end up in the Python package, which is installed as a whole. + set_target_properties(${_target_name} PROPERTIES +- LIBRARY_OUTPUT_DIRECTORY ${_output_path} +- RUNTIME_OUTPUT_DIRECTORY ${_output_path}) ++ LIBRARY_OUTPUT_DIRECTORY "$<1:${_output_path}>" ++ RUNTIME_OUTPUT_DIRECTORY "$<1:${_output_path}>") + + target_link_libraries( + ${_target_name} PRIVATE +@@ -257,9 +268,22 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) LIBRARY DESTINATION lib RUNTIME DESTINATION bin) diff --git a/distros/rolling/patch/ros2-rosidl-generator-type-description.patch b/distros/rolling/patch/ros2-rosidl-generator-type-description.patch new file mode 100644 index 00000000..88f8da69 --- /dev/null +++ b/distros/rolling/patch/ros2-rosidl-generator-type-description.patch @@ -0,0 +1,19 @@ +Type descriptions out of date on incremental builds: https://github.com/ros2/rosidl/pull/1018 + +diff --git a/cmake/rosidl_generator_type_description_generate_interfaces.cmake b/cmake/rosidl_generator_type_description_generate_interfaces.cmake +index 0e420f1..67d6b91 100644 +--- a/cmake/rosidl_generator_type_description_generate_interfaces.cmake ++++ b/cmake/rosidl_generator_type_description_generate_interfaces.cmake +@@ -52,6 +52,12 @@ foreach(_pkg_name ${rosidl_generate_interfaces_DEPENDENCY_PACKAGE_NAMES}) + set(_include_path "${${_pkg_name}_DIR}/..") + normalize_path(_include_path "${_include_path}") + list(APPEND _dependency_paths "${_pkg_name}:${_include_path}") ++ # The generator reads the type descriptions of referenced types from the ++ # .json files installed next to the dependency's .idl files ++ foreach(_idl_file ${${_pkg_name}_IDL_FILES}) ++ string(REGEX REPLACE "\\.idl$" ".json" _json_file "${_idl_file}") ++ list(APPEND _dependency_files "${_include_path}/${_json_file}") ++ endforeach() + endforeach() + + # Export __DESCRIPTION_TUPLES variable for use by dependent generators diff --git a/distros/rolling/patch/ros2-rosidl-typesupport-introspection-c.patch b/distros/rolling/patch/ros2-rosidl-typesupport-introspection-c.patch new file mode 100644 index 00000000..f26fd368 --- /dev/null +++ b/distros/rolling/patch/ros2-rosidl-typesupport-introspection-c.patch @@ -0,0 +1,15 @@ +Generated .c/.cpp files installed into include/: https://github.com/ros2/rosidl/pull/1019 + +diff --git a/cmake/rosidl_typesupport_introspection_c_generate_interfaces.cmake b/cmake/rosidl_typesupport_introspection_c_generate_interfaces.cmake +index aaf9254..2812af3 100644 +--- a/cmake/rosidl_typesupport_introspection_c_generate_interfaces.cmake ++++ b/cmake/rosidl_typesupport_introspection_c_generate_interfaces.cmake +@@ -172,7 +172,7 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) + install( + DIRECTORY ${_output_path}/ + DESTINATION "include/${PROJECT_NAME}/${PROJECT_NAME}" +- PATTERN "*.h" ++ PATTERN "*.c" EXCLUDE + ) + install( + TARGETS ${rosidl_generate_interfaces_TARGET}${_target_suffix} diff --git a/distros/rolling/patch/ros2-rosidl-typesupport-introspection-cpp.patch b/distros/rolling/patch/ros2-rosidl-typesupport-introspection-cpp.patch new file mode 100644 index 00000000..c4830f82 --- /dev/null +++ b/distros/rolling/patch/ros2-rosidl-typesupport-introspection-cpp.patch @@ -0,0 +1,15 @@ +Generated .c/.cpp files installed into include/: https://github.com/ros2/rosidl/pull/1019 + +diff --git a/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake b/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake +index ed1a3a6..ddb3b7b 100644 +--- a/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake ++++ b/cmake/rosidl_typesupport_introspection_cpp_generate_interfaces.cmake +@@ -166,7 +166,7 @@ if(NOT rosidl_generate_interfaces_SKIP_INSTALL) + install( + DIRECTORY ${_output_path}/ + DESTINATION "include/${PROJECT_NAME}/${PROJECT_NAME}" +- PATTERN "*.hpp" ++ PATTERN "*.cpp" EXCLUDE + ) + + install( diff --git a/distros/rolling/pkg_additional_info.yaml b/distros/rolling/pkg_additional_info.yaml index 9f59fbcc..220ed04e 100644 --- a/distros/rolling/pkg_additional_info.yaml +++ b/distros/rolling/pkg_additional_info.yaml @@ -71,6 +71,18 @@ urdfdom_headers: override_version: '3.0.0' zenoh_cpp_vendor: additional_cmake_args: "-DAMENT_VENDOR_POLICY=NEVER_VENDOR_IGNORE_SATISFIED_CHECK -DUSE_SYSTEM_ZENOH=ON" +rosidl_generator_c: + build_number: 34 +rosidl_generator_cpp: + build_number: 34 +rosidl_generator_py: + build_number: 34 +rosidl_generator_type_description: + build_number: 34 +rosidl_typesupport_introspection_c: + build_number: 34 +rosidl_typesupport_introspection_cpp: + build_number: 34 rviz_ogre_vendor: additional_cmake_args: "-DRVIZ_OGRE_VENDOR_MANGLE_NAME_OF_LIBRARIES_USED_BY_RVIZ=ON" build_number: 33 # built without the EXR codec (ros2-rviz-ogre-vendor.patch)