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

catkin debug subset of packages

asked 2018-08-13 07:44:21 -0500

Christian Rauch gravatar image

How do I use catkin_tools to build only a subset of packages from the current workspace in debug mode?

To build the whole workspace in debug mode, you would call catkin build --cmake-args -DCMAKE_BUILD_TYPE=Debug which sets the cmake variable CMAKE_BUILD_TYPE for all packages. But how can I set different variable values for different packages in the same workspace?

edit retag flag offensive close merge delete

Comments

I don't believe this is currently supported, unfortunately.

Or: it's not really supported. You could try to see whether you can setup two profiles with different CMAKE_BUILD_TYPE configured and different whilte/black lists for pkgs. I'm not sure it'll work (ie: have both sets available ..

gvdhoorn gravatar image gvdhoorn  ( 2018-08-13 14:34:29 -0500 )edit

.. at the same time) though.

Another option could be two workspaces overlaid. One with the debug pkgs, the other with the regular ones.

gvdhoorn gravatar image gvdhoorn  ( 2018-08-13 14:35:00 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-02-01 23:11:49 -0500

Fred C gravatar image

I have a similar situation and use a workaround way to do this. In my case, I need to build 2 sets, [packs1] in release and [packs2] in debug, and some of packages in [packs2] depends on some packs in [packs1] (not the other way around). I would do:

  1. catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
  2. catkin build [packs1]
  3. catkin config --blacklist [packs1]
  4. catkin config --cmake-args -DCMAKE_BUILD_TYPE=Debug
  5. catkin build [packs2]

The settings of the whole workspace changed after the [packs1] are built, but [packs1] will not be rebuilt since black-listed. I also considered not changing workspace settings and using catkin build [packs2] --cmake-args -DCMAKE_BUILD_TYPE=Debug, but in verbose mode you can see the argument list of cmake command has both -DCMAKE_BUILD_TYPE=Debug and -DCMAKE_BUILD_TYPE=Release, I don't know how this is defined, so for safety I change the ws settings. It turns out the [packs2] work properly.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-08-13 07:44:21 -0500

Seen: 406 times

Last updated: Aug 13 '18