Deprecate ament_target_dependencies() #572
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Draft until these two prerequisite PRs are merged:
Requires #571
Requires ros2/system_tests#566This PR deprecates
ament_target_dependencies()
in favor oftarget_link_libraries()
. This PR also adds a deprecation warning that suggests atarget_link_libraries()
call to be used instead.For example, I inserted a call to
ament_target_dependencies
into my local copy oftf2_ros
:I got the following deprecation warning when I built it.
The suggested
target_link_libraries()
call matches the real call (minus a difference in sorting)https://github.com/ros2/geometry2/blob/d60e39d663e21d2e426a2a7ff3e3d266df6f8c9a/tf2_ros/CMakeLists.txt#L37-L44
#292