Skip to content

Commit 0902ad6

Browse files
Document deprecation of ament_target_dependencies in Kilted (#5232)
* Document deprecation of ament_target_dependencies in Kilted Signed-off-by: Shane Loretz <sloretz@intrinsic.ai> * depenencies -> dependencies Co-authored-by: Christophe Bedard <bedard.christophe@gmail.com> Signed-off-by: Shane Loretz <shane.loretz@gmail.com> --------- Signed-off-by: Shane Loretz <sloretz@intrinsic.ai> Signed-off-by: Shane Loretz <shane.loretz@gmail.com> Co-authored-by: Christophe Bedard <bedard.christophe@gmail.com>
1 parent bafa035 commit 0902ad6

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

source/Releases/Release-Kilted-Kaiju.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,29 @@ TODO
4141
New features in this ROS 2 release
4242
----------------------------------
4343

44+
Changes since the Jazzy release
45+
-------------------------------
46+
47+
ament_target_dependencies is deprecated
48+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49+
50+
The CMake macro ``ament_target_dependencies()`` has been deprecated in favor of ``target_link_libraries()`` with modern CMake targets.
51+
The macro still works, but it emits a CMake deprecation warning at build time like this:
52+
53+
.. code-block::
54+
55+
CMake Deprecation Warning at [...]/ament_cmake_target_dependencies/share/ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake:89 (message):
56+
ament_target_dependencies() is deprecated. Use target_link_libraries()
57+
with modern CMake targets instead. Try replacing this call with:
58+
59+
target_link_libraries([...] PUBLIC
60+
[...]
61+
)
62+
63+
Try replacing the ``ament_target_dependencies()`` call with the ``target_link_libraries()`` call suggested by the warning.
64+
65+
For more information see `ament/ament_cmake#572 <https://github.com/ament/ament_cmake/pull/572>`__ and `ament/ament_cmake#292 <https://github.com/ament/ament_cmake/issues/292>`__.
66+
4467
Development progress
4568
--------------------
4669

0 commit comments

Comments
 (0)