Skip to content
Open
Show file tree
Hide file tree
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
15 changes: 15 additions & 0 deletions distros/humble/patch/ros2-rosidl-generator-c.patch
Original file line number Diff line number Diff line change
@@ -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
38 changes: 31 additions & 7 deletions distros/humble/patch/ros2-rosidl-generator-py.patch
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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})
Expand All @@ -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
)

Expand Down Expand Up @@ -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}")

Expand All @@ -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(
Expand Down Expand Up @@ -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})
Expand All @@ -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)

Expand Down
15 changes: 15 additions & 0 deletions distros/humble/patch/ros2-rosidl-typesupport-introspection-c.patch
Original file line number Diff line number Diff line change
@@ -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}
Original file line number Diff line number Diff line change
@@ -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(
8 changes: 8 additions & 0 deletions distros/humble/pkg_additional_info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
30 changes: 30 additions & 0 deletions distros/jazzy/patch/ros2-rosidl-generator-c.patch
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions distros/jazzy/patch/ros2-rosidl-generator-cpp.patch
Original file line number Diff line number Diff line change
@@ -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}"
46 changes: 43 additions & 3 deletions distros/jazzy/patch/ros2-rosidl-generator-py.patch
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
)

Expand All @@ -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)

Expand Down
19 changes: 19 additions & 0 deletions distros/jazzy/patch/ros2-rosidl-generator-type-description.patch
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions distros/jazzy/patch/ros2-rosidl-typesupport-introspection-c.patch
Original file line number Diff line number Diff line change
@@ -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}
Original file line number Diff line number Diff line change
@@ -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(
12 changes: 12 additions & 0 deletions distros/jazzy/pkg_additional_info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
30 changes: 30 additions & 0 deletions distros/lyrical/patch/ros2-rosidl-generator-c.patch
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions distros/lyrical/patch/ros2-rosidl-generator-cpp.patch
Original file line number Diff line number Diff line change
@@ -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}"
Loading
Loading