Ask Your Question

How to exclude one package from the catkin_make build?

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

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 -0600

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 imageTommyP ( 2013-02-04 02:04:52 -0600 )edit

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

dornhege gravatar imagedornhege ( 2013-02-04 04:15:58 -0600 )edit

ccmake, cmake-gui and such

KruseT gravatar imageKruseT ( 2013-02-04 04:23:39 -0600 )edit

Also, "cmake -L | grep CATKIN"

KruseT gravatar imageKruseT ( 2013-02-04 04:26:33 -0600 )edit

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

TommyP gravatar imageTommyP ( 2013-02-04 10:57:15 -0600 )edit

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

dornhege gravatar image

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

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 imagekalectro ( 2013-02-04 04:26:56 -0600 )edit

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

dornhege gravatar imagedornhege ( 2013-02-04 04:32:42 -0600 )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 imagecubeloid ( 2015-02-23 19:57:54 -0600 )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 imagepotAito ( 2015-04-03 08:51:56 -0600 )edit

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

wdg-5 gravatar imagewdg-5 ( 2019-05-21 01:06:05 -0600 )edit

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

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 imagedornhege ( 2013-02-04 04:14:22 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


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

Seen: 19,113 times

Last updated: Feb 04 '13