Skip to content

Instantly share code, notes, and snippets.

@chapulina
Last active July 8, 2024 17:31
Show Gist options
  • Save chapulina/7400a708df655cbfba218e169fcad97f to your computer and use it in GitHub Desktop.
Save chapulina/7400a708df655cbfba218e169fcad97f to your computer and use it in GitHub Desktop.
Colcon cheatsheet

Only one package:

--packages-select <package>

Packages with regex:

--packages-select-regex <regex>

Verbose, print to console:

--event-handlers console_direct+

Run specific tests:

--ctest-args -R <part of test name>

Disable tests compilation:

--cmake-args -DBUILD_TESTING=false

Combine multiple CMake args:

--cmake-args ' -DBUILD_TESTING=false' ' -DENABLE_PROFILER=1'

Repeat test:

--retest-until-fail 10

Uninstall:

colcon build --packages-select <package> --cmake-target uninstall

Number of cores:

MAKEFLAGS="-j4" colcon build

Specific target, like codecheck:

--cmake-target codecheck

List all available targets for a project:

cd build/project_name
make help
@malga6en
Copy link

malga6en commented Dec 8, 2023

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment