Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix missing target dependency on rosidl_runtime_c #220

Merged

Conversation

dirk-thomas
Copy link
Member

@dirk-thomas dirk-thomas commented Apr 22, 2020

Related to ros2/ros2#904.

Needed for

#include "rosidl_runtime_c/message_bounds_struct.h"
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_runtime_c/service_type_support_struct.h"
.

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
@dirk-thomas
Copy link
Member Author

CI builds up to rclcpp, testing only the touched packages (for CMake linters):

  • Linux Build Status (unrelated compiler warnings)
  • Linux-aarch64 Build Status (unrelated compiler warnings)
  • macOS Build Status
  • Windows Build Status

@dirk-thomas dirk-thomas merged commit 2da4c2d into master Apr 23, 2020
@delete-merged-branch delete-merged-branch bot deleted the dirk-thomas/ament_target_dependencies-interface-keyword branch April 23, 2020 01:33
# since a build dependency for the rosidl_runtime_c targets is undesired
# they are being added to the rmw interface library here instead
ament_target_dependencies(rmw::rmw INTERFACE
rosidl_runtime_c)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't compatible with CMake versions < 3.13. See the last bullet in https://cmake.org/cmake/help/v3.16/release/3.13.html#commands (https://cmake.org/cmake/help/v3.16/policy/CMP0079.html).

The error message looks like this:

CMake Error at install/ament_cmake_target_dependencies/share/ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake:96 (target_link_libraries):
  Cannot specify link libraries for target "rmw::rmw" which is not built by
  this project.

Depending on what is being built it can happen in different packages:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants