Sets up a minimalist C++20 CMake executable project with a few basic add-ons.
- Dotfiles
.clang-format.editorconfig.gitignore.gitattributes
- CMake scripts:
CMakeLists.txt: project script, also sets up git commit hash / option to update submodules,compile_commands.jsonexport, etccmake/interface.cmake: sets up interface library with compile flags etccmake/build.cmake: configures, builds, and installs a ninja/clang build using a desired build configurationcmake/CMakePresets.json: ninja/clang and inherited presets (copy/symlink to project root to use)config.cmake.in: package config file input
- GitHub CI integration:
.github/workflows/ci.yml: runs a matrix build on Windows and Ubuntu, invokingcmake/build.cmake
- Clone repo / use as template
- Modify the
project parameterssection inCMakeLists.txtproject_name: name to use for root project and prefix for interface library${project_name}_version_file: version file to configure (optional)${project_name}_version,${project_name}_soversion: used for versioningcxx_standard: compile feature on interface library
- Make any other changes if desired
- Configure
- If using Ninja + clang and CMake 3.20+, use presets eg:
cmake -S . --preset=nc-debugforDebug
- If using Ninja + clang and CMake 3.20+, use presets eg:
- Build and debug/run