Skip to content

e-gleba/cmake_template

cmake_template

cmake_template logo

CI C++ Standard CMake License Contributing Guide

Production-ready C++ template with Android NDK, cross-compilation to Windows, Docker, CPack, and one-command CI pipelines. Targets C++23/26. Ninja Multi-Config, CPM, code-quality tooling — zero friction from clone to package.

Quick Start

cmake --preset=gcc
cmake --build --preset=gcc-release
ctest --preset=gcc-release

Full pipeline (configure → build → test → package):

cmake --workflow --preset=gcc-full

Why this template?

Most CMake starters stop at "it builds on my machine". This template goes further with first-class cross-compilation and packaging.

  • Android NDK out of the box — 4 presets (arm64, arm32, x64, x86) with API 24.
  • Linux → Windows cross-compile — 3 llvm-mingw presets (x86_64, i686, aarch64).
  • Reproducible builds — Docker images for CI and local development.
  • One-command pipelinescmake --workflow handles configure → build → test → package.
  • Modern standards — C++23/26 with clang-tidy, clang-format, IWYU-ready structure.
  • Professional documentation — upgraded CONTRIBUTING.md and consolidated Presets/Platforms guide.

Comparison

Feature cmake_template cpp-best-practices kigster district10 pamplejuce
Pitch Generic C++ starter with cross-compile Opinionated best-practice starter Minimal C/C++ starter Qt / Boost / OpenCV examples JUCE audio plugins
C++ Standard 23 / 26 17 / 20 unspecified 11 unspecified
CMake Presets 10+ with workflows basic JUCE-oriented
Android NDK
Android instrumentation (tests)
Linux → Windows cross ✅ llvm-mingw
WebAssembly planned (#2) ✅ + GitHub Pages deploy
Docker / CI-ready ✅ Dockerfile + GitHub Actions ✅ Docker + Actions ✅ GitHub Actions
CPack packaging ✅ tar.gz / zip / tar.xz
CTest test runner
Dependency manager CPM + prebuilt/air-gapped (#8) CPM
vcpkg compatibility planned (#3)
Sanitizers (ASan/UBSan) planned (#9)
Fuzz testing ✅ libFuzzer
Codecov / CodeQL planned (#10)
Steam Runtime / Steam Deck planned (#11)
Qt / OpenGL
Audio / JUCE
C++20 modules planned (#5)
macOS / iOS (Xcode presets) planned (#20) Limited Specialized

Honest notes: this template is intentionally generic — it does not include Qt, OpenGL, audio scaffolding, or fuzz testing. Those are well covered by specialized starters above. We focus on cross-platform build engineering and packaging. See the new consolidated presets.md for current platform support and detailed macOS/iOS roadmap.

Consulting

Need help with CMake architecture, cross-compilation pipelines, CI/CD for C++, or packaging with CPack? I help teams reduce build friction and ship faster.

  • 🌐 e-gleba.github.io — contacts, portfolio, and blog
  • 📧 i@egleba.ru — direct inquiries (fastest response)
  • 💼 Open for freelance and contract work (up to $150/hr depending on scope)
  • 🛠️ Services: CMake audits, toolchain setup, Docker/CI optimization, custom presets, onboarding workshops

For inquiries, reach out via email or through the website above, or open a Discussion.


More details

Roadmap note: macOS/iOS Xcode support is now prominently planned in #20. Many other enhancements tracked in open issues.

About

Production-ready C++ project template with modern standards, cross-platform builds, and integrated tooling

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors