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

The whitelist mentioned by @Delb will work. But catkin_make_isolated directly supports this use-case with command line arguments:

[...]
  --pkg PKGNAME [PKGNAME ...]
                        Process only specific packages (only after
                        catkin_make_isolated has been invoked before with the
                        same install flag)
  --from-pkg PKGNAME    Restart catkin_make_isolated at the given package
                        continuing from there (do not change CMake arguments,
                        add/move/remove packages or toggle the install flag
                        when using this option since this may result in an
                        inconsistent workspace state).
  --only-pkg-with-deps ONLY_PKG_WITH_DEPS [ONLY_PKG_WITH_DEPS ...]
                        Only consider the specific packages and their
                        recursive dependencies and ignore all other packages
                        in the workspace (only works together with --merge or
                        --install)
[...]

So to build only your newPkg, I would use:

catkin_make_isolated --only-pkg-with-deps newPkg

Note: your question title asks about catkin_make, but your question is really about catkin_make_isolated. They're both binaries having to do something with Catkin, but they're not identical and their behaviour can and does vary.

The whitelist mentioned by @Delb will work. But catkin_make_isolated directly supports this use-case with command line arguments:

[...]
  --pkg PKGNAME [PKGNAME ...]
                        Process only specific packages (only after
                        catkin_make_isolated has been invoked before with the
                        same install flag)
  --from-pkg PKGNAME    Restart catkin_make_isolated at the given package
                        continuing from there (do not change CMake arguments,
                        add/move/remove packages or toggle the install flag
                        when using this option since this may result in an
                        inconsistent workspace state).
  --only-pkg-with-deps ONLY_PKG_WITH_DEPS [ONLY_PKG_WITH_DEPS ...]
                        Only consider the specific packages and their
                        recursive dependencies and ignore all other packages
                        in the workspace (only works together with --merge or
                        --install)
[...]

So to build only your newPkg, I would use:

catkin_make_isolated --only-pkg-with-deps newPkg

Note: your question title asks about catkin_make, but your question is really about catkin_make_isolated. They're both binaries having to do something with Catkin, but they're not identical and their behaviour can and does vary.


Edit: I just noticed that you're managing a 'base' source build. If you're trying to do 'normal' development after having built your base ROS, I would recommend to use an overlay workspace to store your own packages in. That way only the pkgs in that workspace will be built, removing the need to explicitly limit the packages.

The whitelist mentioned by @Delb will work. But catkin_make_isolated directly supports this use-case with command line arguments:

[...]
  --pkg PKGNAME [PKGNAME ...]
                        Process only specific packages (only after
                        catkin_make_isolated has been invoked before with the
                        same install flag)
  --from-pkg PKGNAME    Restart catkin_make_isolated at the given package
                        continuing from there (do not change CMake arguments,
                        add/move/remove packages or toggle the install flag
                        when using this option since this may result in an
                        inconsistent workspace state).
  --only-pkg-with-deps ONLY_PKG_WITH_DEPS [ONLY_PKG_WITH_DEPS ...]
                        Only consider the specific packages and their
                        recursive dependencies and ignore all other packages
                        in the workspace (only works together with --merge or
                        --install)
[...]

So to build only your newPkg, I would use:

catkin_make_isolated --only-pkg-with-deps newPkg

Note: your question title asks about catkin_make, but your question is really about catkin_make_isolated. They're both binaries having to do something with Catkin, but they're not identical and their behaviour can and does vary.

"catkin_making" is not a thing. catkin_make is a wrapper around CMake, just as catkin_make_isolated is. Even though you invoke it using catkin_make, in the end it just runs make (or ninja, depending on the generator you've chosen).


Edit: I just noticed that you're managing a 'base' source build. If you're trying to do 'normal' development after having built your base ROS, I would recommend to use an overlay workspace to store your own packages in. That way only the pkgs in that workspace will be built, removing the need to explicitly limit the packages.