Add rosidl_get_typesupport_target and deprecate rosidl_target_interfaces#606
Add rosidl_get_typesupport_target and deprecate rosidl_target_interfaces#606
Conversation
Also deprecate rosidl_target_interfaces(). Getting the target name allows consumers to choose the keyword arguments that they pass to target_link_libraries() Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
|
CI (repos: |
|
CI (repos: |
Signed-off-by: Shane Loretz <sloretz@openrobotics.org>
|
Warning on windows is caused by ros2/rclcpp#1731 |
clalancette
left a comment
There was a problem hiding this comment.
One nit, but I'll approve anyway.
CI is green, but that is dependent on a number of other changes so downstream packages don't start spitting warnings. I'll assume you'll merge all of them at once.
|
|
||
| set("${var}" "${output_target}" PARENT_SCOPE) | ||
| endfunction() | ||
|
|
There was a problem hiding this comment.
Extra trailing space at the end of the file.
|
Oh, can I also request that you add a changelog note to https://github.com/ros2/ros2_documentation/blob/rolling/source/Releases/Release-Humble-Hawksbill.rst , since this will cause a bunch of warnings on packages outside of the core? |
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
|
Added a note to the changelog in ros2/ros2_documentation#1798 |
|
CI (repos: |
|
CI Green and all linked PRs approved. I'll coordinate merging all at once with the libstatistics_collector maintainers. |
|
@sloretz The nightlies went yellow from this. It looks like there is one more use of the deprecated |
This adds
rosidl_get_typesupport_target()which returns the name of a typesupport target. This can be used in atarget_link_libraries()call to make a target depend on generated code for interfaces generated in the same CMake project.This PR also deprecates
rosidl_target_interfaces()which inconveniently wrapstarget_link_libraries()and has what appears to be extra unnecessaryadd_dependencies()andtarget_include_directories()calls.Adding
rosidl_get_typesupport_target()is in support of ros2/python_cmake_module#6 , specifically replacing a good bit ofFindPythonExtrawithPython3_add_library().Python3_add_library()callstarget_link_libraries()internally on the given target with a Keyword argument, but that conflicts withrosidl_target_interfaces()which uses the non-keyword version oftarget_link_libraries()internally. CMake won't allow those two styles to mix on the same target (without using theOLDpolicy of CMP0023). This PR allows more control over which version oftarget_link_libraries()is used, and that should allowrosidl_generator_pyto usePython3_add_library()