We recommend, and assume below, that development is done under Linux. Developers on another operating system will need to adapt the commands.
Install the source-build and developer prerequisites. Clang-format is not controlled by the build system and must be run manually.
See the source-build instructions and the Continuous Integration setup in .gitlab-ci.yml.
Create and enter an out-of-source build directory, then configure with Ninja and ccache:
mkdir build
cd build
cmake .. -GNinja \
-DPython3_EXECUTABLE=/path/to/venv/bin/python \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DDEV=ON
DEV=ON enables generated-file configuration, warnings as errors, and
developer checks. It also regenerates tracked files under auto/ when their
sources change.