This template implements a modern multi-repo approach for modern C++ libraries and executables and can easily be adapted to a mono-repo if single target is desired.
Every multi-repo subproject is self-contained and can be isolated with no changes needed (except the preamble.cmake module).
cmake -S . -B build -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
ninja -C build
./build/<subproject>/*_test --gtest_color=true
cmake -S <path_to_subproject> -B build -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
Project layouts are based on the pitchfork proposal.
CMakelist file architecture inspired by the great talk by Daniel Pfeifer Effective Cmake.