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

Revision history [back]

click to hide/show revision 1
initial version

What you ask for is impossible, as the message generation targets are only created upon a successful CMake configuration phase run.

Success of that phase depends on the find_package(..) and other statements in the CMakeLists.txt of all pkgs in a workspace to succeed. That can only happen if all dependencies are present (which would appear to be exactly your problem: "package_A and package_B won't build because of various dependencies, for example").

The targets are defined in the Makefile that CMake generates after all this succeeds. At that point it would be trivial to invoke only the message generation target:

catkin_make package_A_generate_messages

or:

catkin build --make-args package_A_generate_messages

I'm not aware of any option to CMake (which Catkin will invoke) to make it ignore failing commands, so editing the CMakeLists.txt of package_A and package_B would seem to be your only option.