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

catkin_make repeatedly cmakes

asked 2015-03-27 07:48:44 -0600

Hansg91 gravatar image

Hey,

Previously whenever I changed source code and ran catkin_make again, it would only compile the source files. I don't know where or what changed exactly, but nowadays it will run CMake every time I try to compile (increasing compilation time a lot).

Any idea how I can debug why it is running cmake again every time? Or perhaps why it is doing that?

Best regards, Hans

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-03-28 03:07:34 -0600

gvdhoorn gravatar image

updated 2015-03-28 06:48:58 -0600

As catkin wraps CMake, it should be possible to use 'all' the debug options cmake supports ('all' is in quotes, as it's not a lot). From the cmake manpage (this is for 3.0, but it's mostly the same for older versions):

-Wdev
    Enable developer warnings.
    Enable warnings that are meant for the author of the CMakeLists.txt files.

--debug-output
    Put cmake in a debug mode.
    Print extra stuff during the cmake run like stack traces with message(send_error )
    calls.

--trace
    Put cmake in trace mode.
    Print a trace of all calls made and from where with message(send_error ) calls.

Pass these either with --cmake-args .. through catkin_make, or do a mkdir build; cd build; cmake --DEBUG-OPTION ../src (the latter does not use Catkin, so you could use that to see whether catkin itself is perhaps doing something different / unexpected).

PS: afaik, CMake employs a system similar to plain make for checking whether it should re-run it's configuration step. The last time a CMakeLists.txt was changed is a factor in this. If filesystem timestamps are 'somehow' not in sync with your local system clock (ie: they are 'from the future'), I think CMake would keep rerunning its configuration step at each invocation. I can't think of a way where that would happen with each invocation though (unless someone/something is changing the clock all the time).

The above is probably not happening on your system, but I wanted to mention it just in case.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-03-27 07:48:44 -0600

Seen: 334 times

Last updated: Mar 28 '15