ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Why can't I call cmake install like in the docs?

asked 2019-08-16 12:28:48 -0500

DanRose gravatar image

updated 2019-08-16 12:34:06 -0500

I'm trying to port a package to ROS2 using ament cmake hooks based on https://index.ros.org//doc/ros2/Tutor...

When I do something like the recommendation for target-based installs, I get an error about an unknown mode.

So is there a typo in that documentation? Also, when would I want a target-based install and when would I want a non-target-based install?

Cmake Fragment:

install(
  sba
  TARGETS sba
  EXPORT export_sba
  LIBRARY DESTINATION lib
  INCLUDES DESTINATION include
)

Error message

--- stderr: sparse_bundle_adjustment
CMake Error at /opt/ros/dashing/share/ament_cmake_core/cmake/symlink_install/install.cmake:43 (_install):
  _install called with unknown mode SBA
Call Stack (most recent call first):
  CMakeLists.txt:35 (install)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-08-16 12:39:03 -0500

Dirk Thomas gravatar image

updated 2019-08-16 12:39:56 -0500

The CMake function install() doesn't have a signature where the first argument is sba. The documentation enumerates a set of signatures - for each the first argument is a known keyword like TARGETS, DIRECTORY, etc. See https://cmake.org/cmake/help/latest/c...

The specific example in the documentation is certainly wrong. I would guess the first argument just needs to be removed.

edit flag offensive delete link more

Comments

1

The docs should be fixed by https://github.com/ros2/ros2_document...

Dirk Thomas gravatar image Dirk Thomas  ( 2019-08-16 12:46:34 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-08-16 12:28:48 -0500

Seen: 502 times

Last updated: Aug 16 '19