cmake-init
cmake-init is a Python-based project scaffolding tool that generates opinionated CMake 3.14+ projects with modern best practices built in. It automates boilerplate setup for executables, libraries (header-only, static, shared), testing, CI/CD, static analysis, and package manager integration.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | friendlyanon/cmake-init |
| Owner | friendlyanon |
| Primary language | CMake |
| License | GPL-3.0 — OSI-approved |
| Stars | 2.5k |
| Forks | 95 |
| Open issues | 24 |
| Latest release | Unknown |
| Last updated | 2026-04-15 |
| Source | https://github.com/friendlyanon/cmake-init |
What cmake-init is
The tool generates CMake projects that are FetchContent-ready, separate developer and consumer targets, include install rules with relocatable packages, and integrate clang-tidy, cppcheck, clang-format, code coverage (gcov/LCOV), and optional Conan/vcpkg support. Requires Python 3.8+, CMake 3.20+, and optional tool binaries for static analysis and documentation.
Get the cmake-init source
Clone the repository and explore it locally.
git clone https://github.com/friendlyanon/cmake-init.gitcd cmake-init# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Requires Python 3.8+, CMake 3.20+, git, and optional tool dependencies (clang-tidy 18, cppcheck, LCOV, clang-format 18, codespell). Windows users needing static analysis must install Ninja.
- Generated projects use CMake presets for IDE integration (VSCode, CLion); ensure your toolchain supports CMakePresets.json (CMake 3.21+).
- Package manager integration (Conan or vcpkg) is optional; choose based on existing dependency management strategy.
- Doxygen documentation generation requires version 1.8.x (not 1.9+) due to m.css compatibility; document this constraint in your team's setup guide.
- Generated CI assumes GitHub Actions and includes example secrets/deployment configs; adaptation required for GitLab CI, Jenkins, or other platforms.
When to avoid it — and what to weigh
- GPL-3.0 License Incompatibility — Generated projects inherit GPL-3.0 terms. Do not use if your organization prohibits strong copyleft licenses or requires proprietary/permissive licensing.
- Non-Standard Project Structures — Tool targets common patterns (single executable, library, or header-only project). Complex monorepos, polyglot builds, or bespoke architectures require manual CMake expertise.
- Windows-Only or Non-GitHub Workflows — Generated CI workflows are GitHub Actions–specific; clang-tidy/cppcheck on Windows require Ninja generator. Non-GitHub platforms need adaptation.
- Minimal Dependency on External Tools — Full feature utilization (static analysis, coverage, formatting) requires installing clang-tidy 18, cppcheck, LCOV, clang-format 18, and optional package managers—significant environment setup.
License & commercial use
GPL-3.0 (GNU General Public License v3.0). This is a strong copyleft license requiring derivative works and distributed copies to also be GPL-3.0. Generated projects inherit this licensing requirement.
Requires careful review. GPL-3.0 permits commercial use but requires source disclosure and propagates the copyleft obligation to all derivative works. Distributing closed-source software built with or derived from cmake-init–generated projects is likely non-compliant. Consult legal counsel before using in proprietary products.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Good |
| Assessment confidence | High |
Generated projects include static analysis (clang-tidy, cppcheck) and dynamic analysis (sanitizers, coverage) tooling integration to aid vulnerability detection during development. No documented supply-chain security, dependency pinning, or build reproducibility guarantees. Verify tool versions (clang-tidy 18, clang-format 18) in CI and locally match to avoid silent discrepancies.
Alternatives to consider
Boost.Cpp.Build
B2/Bjam build system alternative; less IDE-friendly than CMake; steeper learning curve for teams standardizing on CMake.
Manual CMake Boilerplate (Modern CMake by Dominik Berner, CppCon talks)
No tooling overhead; full control; requires deep CMake expertise; no automation for CI/code quality setup.
Cookiecutter (generic Python template tool) + custom CMake template
More flexible; requires authoring your own CMake template; lacks cmake-init's opinionated best practices and tool integrations.
Build on cmake-init with DEV.co software developers
Generate standards-compliant, production-ready CMake projects in seconds. Includes pre-configured CI, static analysis, testing, and package manager integration—ideal for libraries and executables. Note: GPL-3.0 licensed; review commercial implications before use.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
cmake-init FAQ
Can I use cmake-init for proprietary/closed-source software?
Does cmake-init support Meson, Bazel, or other build systems?
What if I can't install all optional tools (clang-tidy 18, LCOV, Doxygen)?
Are generated projects automatically compatible with vcpkg and Conan?
Software development & web development with DEV.co
Adopting cmake-init is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate open-source testing software in production.
Accelerate C/C++ Project Setup with cmake-init
Generate standards-compliant, production-ready CMake projects in seconds. Includes pre-configured CI, static analysis, testing, and package manager integration—ideal for libraries and executables. Note: GPL-3.0 licensed; review commercial implications before use.