Ask Your Question

Revision history [back]

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.