Simple CMake project template for C++, supports macOS, Linux, and Windows.
- Package Manager: Conan
- Language: C++23
- Build: CMake 4+, Ninja
- Static analysis & formatting: clang-format, clang-tidy
Note
For Package Manager use VCPKG, please refer to the feature/vcpkg branch.
- CMake 4+
- Conan 2+
- Ninja
- clang-format
- clang-tidy (optional)
# macOS
brew install conan
# Windows
pip install conan- Create a Conan profile for your platform if you haven't done so.
conan profile detect./build.sh # Debug (default)
./build.sh Release # Release
./build.sh --clean # Clean build
./build.sh --format # Format code
./build.sh --tidy # Run clang-tidy.\build.ps1 # Debug (default)
.\build.ps1 -Preset Release # Release
.\build.ps1 -Clean # Clean build
.\build.ps1 -Format # Format code
.\build.ps1 -Tidy # Run clang-tidy# Install dependencies
conan install . --output-folder=build/Debug --build=missing -s build_type=Debug
# Configure
cmake --preset Debug
# Build
cmake --build --preset Debug./run_test.sh.\run_test.ps1cd build/Debug
ctest --output-on-failure- Sanitizers (ASan, UBSan, TSan)
- Code coverage (gcov / llvm-cov)
- Benchmarking (Google Benchmark)
- Documentation (Doxygen)
- Package export (CMake install / Conan create)
- Pre-commit hooks