ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Good day.
Seems like we have the similar issue. We have core project 'sybo_base' that defines some messages and nodes ('broadcaster', 'feeder') that use this message, and several other projects in the workspace that depend on sybo_base.
We've specified all the sort of dependencies for target (tried all of mentioned variants):
add_executable(broadcaster broadcaster.cpp utils.cpp)
add_dependencies(broadcaster ${${PROJECT_NAME}_EXPORTED_TARGETS})
And it anyways tries to build target 'broadcaster' before 'sybo_base_generate_messages_cpp' I've tried to check actual contents of mentioned variables
message(STATUS "broadcaster needs the following targets ${${PROJECT_NAME}_EXPORTED_TARGETS}")
target_link_libraries(broadcaster ${catkin_LIBRARIES} sybo_base)
CMake has produced the following output:
-- sybo_base: 5 messages, 2 services
-- sybo_base includes :/opt/ros/indigo/include;/usr/include
-- broadcaster needs the following targets sybo_base_generate_messages_cpp;sybo_base_generate_messages_lisp;sybo_base_generate_messages_py
It looks ok, the necessary dependencies are listed. When i try to build sybo_base 'separately', like
cd catkin_ws/build
make -j4 sybo_base
it builds nice. But when I try to build full workspace (of ~12 catkin projects in it) - build fails because of building 'broadcaster' before generating messages for it