Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. CMake
  3. cmake-init

cmake-init

MITCMake

A sophisticated CMake template for modern C and C++ projects, providing best practices for cross-platform development.

GitHubGitHub
941 stars115 forks0 contributors

What is cmake-init?

cmake-init is a sophisticated copy-and-paste template for setting up modern C and C++ projects using CMake. It provides a collection of CMake best practices to handle all aspects of software development, including programming, testing, quality assurance, deployment, and documentation. The template is designed to be modular, flexible, and idiomatic, ensuring reliable and cross-platform project setups.

Target Audience

C and C++ developers and teams who need a robust, standardized starting point for new projects, especially those targeting Windows, macOS, and Linux platforms.

Value Proposition

Developers choose cmake-init because it encapsulates years of CMake expertise into a ready-to-use template, saving time and reducing errors. Its modular design allows customization while enforcing best practices, and it supports the entire development lifecycle out of the box.

Overview

Template for reliable, cross-platform C++ project setup using cmake.

Use Cases

Best For

  • Starting a new cross-platform C++ library or application
  • Standardizing CMake configurations across a team or organization
  • Projects requiring integrated testing with Google Test
  • Setting up continuous integration for C++ projects
  • Generating project metadata and version headers automatically
  • Learning CMake best practices through a well-documented template

Not Ideal For

  • Projects that need to combine multiple subprojects into a single CMake super-build
  • Developers who prefer a high-level, simplified configuration language over direct CMake syntax
  • Very small or experimental projects where the comprehensive development lifecycle support is overkill
  • Teams that rely heavily on automatic source file detection via globbing

Pros & Cons

Pros

Cross-Platform Reliability

Explicitly supports Windows, macOS, and GNU/Linux with CMake 3.20+, ensuring consistent builds across major desktop and server environments as stated in the README.

Modular and Flexible Design

Core, maintainer, and development modules can be included or excluded independently, allowing customization while maintaining a clean project structure.

Integrated Development Lifecycle

Includes testing with Google Test, linting, documentation, CI, deployment, and packaging, reducing setup time for full project management.

Explicit Source Management

Avoids file globbing and uses explicit source lists, preventing errors when adding or removing files and adhering to CMake best practices.

Cons

No Super-Build Support

Explicitly listed as a non-goal in the README, making it unsuitable for projects that need to manage multiple interdependent CMake projects as a single build.

Steep Learning Curve

Requires familiarity with CMake idioms and best practices, as it avoids high-level abstractions, which can be daunting for beginners despite being a template.

External Testing Dependency

Assumes an external installment of Google Test (e.g., via package managers), which adds setup complexity and may not align with projects using other testing frameworks.

Frequently Asked Questions

Quick Stats

Stars941
Forks115
Contributors0
Open Issues23
Last commit17 days ago
CreatedSince 2014

Tags

#template#deployment#c-plus-plus-11#project-template#continuous-integration#cmake#c-plus-plus#build-system#testing#cross-platform#software-development#c-plus-plus-17

Built With

C
CMake
D
Docker
G
Google Test
C
C++

Included in

CMake5.4k
Auto-fetched 1 day ago

Related Projects

cmake-examplescmake-examples

Useful CMake Examples

Stars13,075
Forks2,522
Last commit2 years ago
ModernCppStarterModernCppStarter

🚀 Kick-start your C++! A template for modern C++ projects using CMake, CI, code coverage, clang-format, reproducible dependency management and much more.

Stars5,389
Forks491
Last commit2 months ago
cmake-cookbookcmake-cookbook

CMake Cookbook recipes.

Stars2,849
Forks711
Last commit5 years ago
pitchforkpitchfork

Pitchfork is a Set of C++ Project Conventions

Stars1,255
Forks64
Last commit2 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub