Know the useful commands#
Last Updated on 2024-01-29
With your project properly forked->renamed->cloned, here are a couple of useful commands you can immediately try out to see the project in action. Many of these commands will be extensively documented in later chapters.
- List all available cmake presets
❯ cmake --list-presets Available configure presets: "dev-windows" "rel-windows"
Tip
on a Linux or macOS system, the list of available presets will change. For example on Linux, the list would like like this:
Available configure presets: "dev-linux" "dev-clang" "dev-gcc" "dev-valgrind" "dev-sanitizers" "dev-sanitizers-thread" "rel-linux"
- Configure the project
cmake --preset=dev-windows
- Build the project (default targets)
cmake --build --preset=dev-windows
- Build specific target
cmake --build --preset=dev-windows --target=asap_common_test
- Build and run all tests
cmake --build --preset=dev-windows --target=do-all-tests
- Build doxygen and sphinx documentation
cmake --build --preset=dev-windows --target=dox --target=sphinx
- Open a browser with the documentation (Windows)
start out/build/dev-windows/sphinx/index.html
- Run tests with ctest
cmake --build --preset=dev-windows --target=test
- Clean the project build
cmake --build --preset=dev-windows --target=clean