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


asked 2014-12-18 06:57:56 -0600

jgdo gravatar image


according to the catkin tutorial I can specify the target location of the catkin package installation using the -DCMAKE_INSTALL_PREFIX flag:

catkin_make install  -DCMAKE_INSTALL_PREFIX=<path>

I noticed that the specified target location is only respected if some packaged have to be build first. If everything is already built, the specified location is ignored and instead the one from last successful build is used.

To make it always work you have add --force-cmake to catkin_make:

catkin_make --force-cmake install  -DCMAKE_INSTALL_PREFIX=<path>

Maybe it would be useful to mention that in the tutorial.

Regards - jgdo -

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-12-18 17:35:21 -0600

Dirk Thomas gravatar image

I would actually consider this to be a bug. Any change to other CMake arguments already triggered a re-invocation of CMake. The two arguments CMAKE_INSTALL_PREFIX and CATKIN_DEVEL_PREFIX are handled separately due to their special semantic meaning.

I have created a pull request ( ) to also check for those catkin_make as well as catkin_make_isolated. With this merged and released it shouldn't require any documentation update.

edit flag offensive delete link more

answered 2014-12-18 12:22:53 -0600

William gravatar image

updated 2014-12-18 18:28:05 -0600

EDIT: I agree with @Dirk Thomas's answer, this should be handled by catkin_make automatically.

This is a behavior of CMake, and is not something we can control in catkin_make. However, if you use catkin_make_isolated, it will detect that this has changed from a previous run and automatically add --force-cmake.

I think you're right though, a hint in the wiki about needing to make sure CMake runs again after passing a new install prefix to it would be a good idea. Please feel free to edit the tutorial and add the note. You can add a note in the wiki with something like this:

{{{#!wiki blue/solid
your note
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-12-18 06:57:56 -0600

Seen: 4,457 times

Last updated: Dec 18 '14