Build Options
The options below are defined in .cmake/config.cmake. Pass them to the first cmake call (-DNAME=VALUE); the
values are cached in the build directory.
Option |
Default |
Meaning |
|---|---|---|
|
ON |
Build the modules as shared libraries. Most of CI uses it; the static builds are separate jobs. |
|
ON |
Build the GoogleTest unit tests ( |
|
OFF |
MPI support, needed for ring polymer MD. CI has its own |
|
OFF |
Python bindings. CI builds them in the |
|
OFF |
Run include-what-you-use during the build. |
|
OFF |
Coverage with |
|
ON |
The documentation targets ( |
|
ON |
Draw the dot graphs in the Doxygen output. Off in the pull request builds because it is slow. |
|
OFF |
The Google Benchmark suite in |
|
ON |
ASE integration, which the QM runner programs use. |
|
OFF |
Singularity container build. |
|
OFF |
Link-time optimisation for Release builds. |
|
ON |
|
|
OFF |
The fixed-work benchmarks in |
Two things are wired in automatically when they are found on the PATH: ccache as compiler launcher and
mold or ld.lld as linker. A build that is much slower than usual often has neither; check the start of the
CMake output.
Typical combinations:
# what the CI Debug job does (strict warnings with -Werror)
$ cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_WITH_NATIVE=OFF
# fast local Release build without the documentation targets
$ cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_DOCS=OFF
# compile database for clangd and clangd-tidy
$ cmake -S . -B build -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
The Debug build type enables the strict warning set described on Static Checks and Conventions. A Release build does not, so a
warning can show up for the first time in CI.