Ask Your Question
0

CMake compiles executable before generating message libraries

asked 2015-09-16 12:26:15 -0500

chrisb gravatar image

Hello,

I face the problem that I get an compiling error while compiling something that is for example using a custom service. The error is that it can't find the headerfile or library that should be generated during catkin_make. If I compile it with one core (catkin_make -j1) it works fine. If it is compiled once the error does not occur again cause the library exists - till the next clean

I guess I defined something wrong in the CMakeList or is it a general problem?

Thanks in advance

Chris

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-09-16 12:54:01 -0500

Dirk Thomas gravatar image

Please see the catkin documentation for instructions: http://docs.ros.org/api/catkin/html/h...

You are missing a dependency between your executable target and the message generation step.

edit flag offensive delete link more

Comments

Thank you, I haven't had the dependency in one of my libraries, this line solved my problem:

add_dependencies(your_library ${catkin_EXPORTED_TARGETS})

chrisb gravatar image chrisb  ( 2015-09-16 13:18:00 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-09-16 12:26:15 -0500

Seen: 79 times

Last updated: Sep 16 '15