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

How to exclude one package from the catkin_make build?

asked 2013-02-04 00:43:40 -0500

TommyP gravatar image

Suppose i have one package that do not compile. How can i exclude that package from the build? is there an easy way to tag a package to not be included in the catkin_make build?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2013-02-04 01:24:03 -0500

KruseT gravatar image

Like this:

# "List of ';' separated packages to build"
catkin_make -DCATKIN_BLACKLIST_PACKAGES="foo;bar"
edit flag offensive delete link more


Well, you have to to --force-cmake and you only have to do the above once I noticed. But it works. How do I list the current value of cmake CATKIN_* variables?

TommyP gravatar image TommyP  ( 2013-02-04 02:04:52 -0500 )edit

They are in CMakeCache.txt. Not sure if there is a nice method to get those.

dornhege gravatar image dornhege  ( 2013-02-04 04:15:58 -0500 )edit

ccmake, cmake-gui and such

KruseT gravatar image KruseT  ( 2013-02-04 04:23:39 -0500 )edit

Also, "cmake -L | grep CATKIN"

KruseT gravatar image KruseT  ( 2013-02-04 04:26:33 -0500 )edit

Aha, "ccmake ." did work if I was in build. Strange I thought I tested that before asking.

TommyP gravatar image TommyP  ( 2013-02-04 10:57:15 -0500 )edit

answered 2013-02-04 04:10:48 -0500

dornhege gravatar image

updated 2013-02-04 04:12:27 -0500

You can put a CATKIN_IGNORE file in the package similar to rosbuild. Worked for me and is described here:

I'm not sure if this is an abuse of the feature as it's meant to go into build/ or if it's intended to work like ROS_NOBUILD.

edit flag offensive delete link more


I like that solution but it is missing a way to show all packages that are not being built

kalectro gravatar image kalectro  ( 2013-02-04 04:26:56 -0500 )edit

It's not really a builtin, but does the job: find src -name "CATKIN_IGNORE" | awk 'BEGIN { FS = "/" } ; {print $(NF-1)}'

dornhege gravatar image dornhege  ( 2013-02-04 04:32:42 -0500 )edit

1st build on ubuntu 14.10 indigo and rviz would not build, so I used the CATKIN_IGNORE and it built and seems to run fine. I copied a CATKIN_IGNORE file, which looks like an empty text file from ros_catkin_ws/build_isolated to my ros_catkin_ws/src/rviz folder

cubeloid gravatar image cubeloid  ( 2015-02-23 19:57:54 -0500 )edit

This is the coolest and quickest way to ignore a package, thanks. Can confirm it still works on Ubuntu 14.10 and Ros Indigo (compiled from source).

potAito gravatar image potAito  ( 2015-04-03 08:51:56 -0500 )edit

This worked for me as well. The advantage is that you can use it with catkin build as well! Thanks :)

wdg-5 gravatar image wdg-5  ( 2019-05-21 01:06:05 -0500 )edit

Worked on ROS Melodic with catkin build, thanks. Just put CATKIN_IGNORE file (empty file, doesn't matter) in your ROS package. That's it.

askkvn gravatar image askkvn  ( 2021-07-02 06:32:28 -0500 )edit

answered 2013-02-04 04:05:21 -0500

kalectro gravatar image

I found this procedure to be easier and more transparent:

cd catkin_ws; mkdir donotbuild
mv src/package_I_dont_like donotbuild

catkin will only build packages located in the src folder

edit flag offensive delete link more



This will get quite problematic when working with source control systems. They'd either report the missing folder or always restore it.

dornhege gravatar image dornhege  ( 2013-02-04 04:14:22 -0500 )edit

Question Tools


Asked: 2013-02-04 00:43:40 -0500

Seen: 33,171 times

Last updated: Feb 04 '13