awesome-cmake

CMake resource hub

A curated collection of CMake resources, scripts, modules, and examples for building and managing C++ projects.

A curated list of awesome CMake resources, scripts, modules and examples.

GitHub

5k stars
194 watching
489 forks
last commit: 3 months ago
Linked from 7 awesome lists

awesomeawesome-listcmakecmake-examplescmake-modulescmake-resourcescmake-scriptscmake-toolchainslist

Awesome CMake / Community

#cmake on Freenode
/r/cmake on Reddit
/r/cpp on Reddit
Official Discourse Forum
Stack Overflow

Awesome CMake / Resources

Latest Documentation
FAQ
Wiki
Webinars
Web Book 525 over 1 year ago CGold: The Hitchhiker’s to the CMake
Modern CMake 231 about 8 years ago Modern CMake and samples by the creator of
Tutorial Modern CMake tutorials part1: CMake basics
Article Easily supporting CMake install and find_package()
Article Easy dependency management for C++ with CMake and Git
Article Opt-in header-only libraries with CMake
Article Ultimate Guide to Modern CMake
Article A list of common CMake antipatterns (from 2013 but still relevant)
Article How to Build a CMake-Based Project
Article Learn CMake's Scripting Language in 15 Minutes
Article The architecture of CMake
Lecture Effective CMake - by Daniel Pfeifer, C++Now 2017
Article Building Cross-Platform CUDA Applications with CMake
Tutorial 61 almost 3 years ago A step-by-step guide for understanding CMake
Article + Lecture Embracing Modern CMake - by Stephen Kelly
Lecture Modern CMake for Modular Design - by Mathieu Ropert, CppCon 2017
Article It's Time To Do CMake Right (one of the best articles about CMake)

Awesome CMake / Resources / Articles

Basic CMake usage
Basic CMake, part 2: libraries

Awesome CMake / Resources

Lecture Introduction to CMake - by Florent Castelli, C++ Sweden 2018
Article Some nice and accurate CMake tips
Article Modern CMake for Library Developers
Article Effective Modern CMake: a great summary of most good practices - by Manuel Binna
Book Professional CMake: A Practical Guide (paid)
Book Effective CMake: Practical Advice to Write Better CMake (not fully written yet)
Web Book An Introduction to Modern CMake
YouTube Series How to CMake Good
Lecture More Modern CMake ( )- by Deniz Bahadir, Meeting C++ 2018
Lecture Oh No! More Modern CMake ( )- by Deniz Bahadir, Meeting C++ 2019
Article Modifying the default CMake build types/flags, toolchains and patches - Oh my! - by Cristian Adam
Tutorial 33 over 4 years ago Tutorial and Example on How to Properly Use Modern CMake

Awesome CMake / Package Management / Build Systems

hunter 1,871 almost 5 years ago Cross-platform package manager for C++ (based on CMake ExternalProject)
cget 453 7 months ago CMake package retrieval. This can be used to download and install CMake packages
cppan C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14
cpm 746 about 3 years ago C++ Package Manager based on CMake and Git
conan 8,271 8 days ago Conan C++ Package Manager, implemented in Python and has a CMake integration backend
fips 470 7 months ago High-level build system/dependency management for distributed, multi-platform C/C++ projects
Ninja 11,259 9 days ago Build system that differs from others in two major respects: it is designed to have its input files generated by a higher-level build system (like CMake), and it is designed to run builds as fast as possible
vcpkg 23,263 5 days ago A tool to acquire and build C++ open source libraries. Uses CMake internally as a build script language
pmm 15 almost 4 years ago PMM is a module for CMake that manages... package managers
cpm 3,035 3 months ago A setup-free CMake + git dependency manager

Awesome CMake / Modules

cmake-modules 1,019 4 months ago 's collection of CMake modules. There are a number of find modules, especially for virtual reality and physical simulation, some utility modules, and some patches or workarounds for CMake itself
cmake-modules 548 10 months ago This is a collection of additional CMake modules. Most of them are from Ryan Pavlik
CMake 156 12 months ago 's common CMake modules
cmake-modules 87 about 4 years ago CMake modules for some scientific libraries
cgcmake 129 over 3 years ago CMake modules for common applications related to computer graphics
FindMathematica 60 11 months ago CMake module for Mathematica
extra-cmake-modules 135 7 days ago 's extra modules and scripts for CMake
FindICU.cmake 30 almost 8 years ago CMake module to find International Components for Unicode (ICU) Library
FindTBB 90 over 6 years ago CMake find module for Intel Threading Building Blocks
FindWiX 18 about 2 years ago CMake module for building packages with
FindIDL 27 about 2 months ago CMake module for building files with MIDL and generating CLR DLL using
cmake-modules 30 over 9 years ago 's CMake module collection
YCM 52 12 days ago Extra CMake Modules for and friends
CMakeCM 2 over 2 years ago CMake Community Modules
Metabench 183 over 3 years ago CMake module for compile-time microbenchmarks
Oranges 's library of CMake modules and toolchains

Awesome CMake / Utility Scripts

cotire 1,301 almost 5 years ago Cotire (compile time reducer) is a CMake module that speeds up the build process of CMake based build systems by fully automating techniques as precompiled headers and unity builds for C and C++
ucm 211 over 1 year ago For managing compiler/linker flags, collecting sources, precompiled headers, unity builds and others
cmakepp 437 almost 3 years ago Enhancement Suite for the CMake Build System
sugar 98 almost 5 years ago CMake tools and examples: collecting source files, warnings suppression, etc
DownloadProject 442 about 1 year ago CMake module for downloading an external project's source at configure time
buildem 27 over 2 years ago Modular CMake-based system that leverages ExternalProject to simplify builds
coveralls-cmake 85 over 4 years ago Coveralls JSON coverage generator and uploader for CMake
compatibility 74 almost 8 years ago Improved version of cmake-compile-features
cmake-modules 45 about 2 years ago LibFindMacros development repository and other cool CMake stuff
GreatCMakeCookOff 42 over 1 year ago This is a repository of useful and less than useful CMake recipes
cppcheck-target-cmake 18 over 8 years ago Per-target CPPCheck for CMake
clang-tidy-target-cmake 16 over 8 years ago Add clang-tidy checks to a target using CMake
cmake-unit 36 over 7 years ago Unit testing framework for CMake
cmake-header-language 4 over 8 years ago CMake macro to determine the language of a header file
tooling-cmake-util 3 over 8 years ago Utility and common library for all polysquare CMake tools
iwyu-target-cmake 10 over 8 years ago CMake integration for include-what-you-use
sanitizers-cmake 377 about 2 months ago CMake module to enable sanitizers for binary targets
cmake-precompiled-header 160 about 5 years ago Visual Studio and GCC precompiled header macro
CMakePCHCompiler 103 about 5 years ago CMake precompiled headers via custom compiler extension - with reuse support!
CMake-codecov 89 4 months ago Enables code coverage and generates coverage reports with CMake targets
cmake-get 63 almost 6 years ago Get dependencies in config or script mode
ixm 106 about 2 years ago Make CMake less painful when trying to write Modern Flexible CMake
CMakeCooking Flexible development environments for CMake projects with external dependencies

Awesome CMake / Toolchains

dockcross 3,312 11 days ago Cross compiling toolchains in Docker images
android-cmake 1,222 almost 7 years ago CMake toolchain file and other scripts for the Android NDK
ios-cmake 314 about 4 years ago Toolchain file and examples using CMake for iOS development
qt-android-cmake 243 over 2 years ago For building and deploying Qt based apps on Android without QtCreator
mingw-w64-cmake CMake-based MinGW-w64 Cross Toolchain - to build Windows binaries of mpv
cmake-avr 174 over 2 years ago CMake toolchain for AVR
arduino-cmake 61 almost 4 years ago This is the CMake project settings for the Arduino platform
polly 862 over 3 years ago Collection of CMake toolchain files and scripts for cross-platform build and CI testing
toolchains 91 about 1 month ago For cross-compiling with CMake. They are meant to be mainly used on ArchLinux
cmake 9 over 5 years ago Collection of CMake toolchain files, mostly for static linking
Arduino-CMake-Toolchain 137 over 1 year ago CMake toolchain for all official and 3rd party Arduino platforms

Awesome CMake / Examples / Templates

cmake-init 913 about 1 year ago Template for reliable, cross-platform C++ project setup using CMake
android-cmake 34 almost 8 years ago Examples of using package manager for an Android application
hunter-simple 49 almost 6 years ago Example of downloading/installing dependencies using package manager
package-example 398 over 3 years ago Config mode of find_package (examples for Stack Overflow question)
minimal_cmake_example 188 almost 6 years ago Minimal CMake example, that covers dependencies and packaging
cmake-example 142 almost 4 years ago Example project which demonstrates various CMake features
cmake-examples 12,419 9 months ago Useful CMake examples in a tutorial format
mini-cmake-qt 209 12 months ago Minimal CMake template for Qt 5 projects
BASIS 48 over 3 years ago CMake makes it easy to create sharable software and libraries that work together
cpp-boilerplate 313 8 months ago Template that aims to be a reference for modern CMake and CI
how-to-export-cpp-library 364 almost 4 years ago An OS-agnostic template project for exporting either shared, static or header-only C++ library, sporting ctest and CI support, written in plain CMake with line-by-line tutorial comments
modern-cmake-sample 667 over 3 years ago Best practices and proper usage of CMake by using targets
CMakeInstallExample 36 about 3 years ago Installation example for a C++ project (Windows) with Cmake
cpp14-project-template 65 about 6 years ago A C++14 template with CI, tests, code coverage, docs and static analysis integration
cmake_templates 128 over 2 years ago Templates for creating C++ libraries and executables (including conan)
cmake_snippets 53 over 5 years ago Short copy-pasteable CMake snippets
cmake-cookbook 2,723 over 3 years ago A huge CMake cookbook full of recipes
cpp-template 51 over 2 years ago A template C++ repository, using CMake and Catch
pitchfork 1,110 7 months ago A set of conventions for native C and C++ projects
cmake-examples 1,169 about 1 month ago A collection of as simple as possible, modern CMake projects
cpp-project 600 about 1 year ago Boiler plate for C++ projects - tests, CI, coverage, docs
ModernCppStarter 4,468 about 1 month ago A template for modern C++ projects using CMake, CI, code coverage, clang-format, reproducible dependency management, tests using and much more
SeeMake 4 about 2 months ago A feature-packed, ready-to-use CMake template with testing, static and dynamic checks, coverage reports, and more

Awesome CMake / Other

autocmake 42 almost 2 years ago Using a autocmake.yml file composes CMake building blocks into a CMake project and generates CMakeLists.txt as well as a setup script, which serves as a front-end to CMakeLists.txt
UseLATEX Collection of CMake macros to simplify building LaTeX files
scikit-build 491 3 days ago Improved build system generator for CPython C extensions
node-cmake 78 over 3 years ago CMake-based build system for node.js native modules
cmake-font-lock 44 7 months ago Advanced syntax coloring support for CMake scripts inside Emacs
autovala 105 over 6 years ago Program that automatically generates CMake configuration files for your Vala project
catkin 322 2 months ago CMake-based build system that is used to build all packages in Robot Operating System (ROS)
suitesparse-metis-for-windows 449 8 months ago CMake scripts for painless usage of SuiteSparse+METIS
osg-3rdparty-cmake 182 almost 2 years ago CMake scripts for building OpenSceneGraph third party libraries
cmake-d 66 over 1 year ago CMake for D2
cmakeprojectmanager2 74 10 months ago Enhanced CMake Project Manager plugin for Qt Creator
cmake-lint 103 over 5 years ago Check for coding style issues in CMake files. cmakelint requires Python
git-cmake-format 58 about 7 years ago Integrate clang-format into your CMake project hosted in a git repository
configure-cmake 86 over 7 years ago configure-cmake is an autotools-style configure script for CMake-based projects
cmake-ast 30 over 2 years ago Python module to reduce a CMake file to an AST
cmake-checks-cache 76 over 2 years ago CMake checks cache helper modules
cmake_check 20 over 4 years ago Static analysis (linter) for the CMake language (e.g. to enforce modern CMake rules)
cmake-language-server 339 about 1 month ago CMake Language Server Protocol Implementation
cmake-maven-plugin 76 21 days ago CMake integration for Maven builds
version-from-git 4 over 2 years ago Bake git information into your binary

Backlinks from these awesome lists:

More related projects: