CMake
Community
5_ENTRIESResources
34_ENTRIES- Modern CMake
Modern CMake PDF and samples by the creator of cmakepp.
[MIT] - 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
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).
- Articles - A series on CMake - by Mar...
Articles - A series on CMake - by Martin HořeňovskýBasic CMake usage.Basic CMake, part 2: libraries.
- 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.
[CC0-1.0] - Lecture
More Modern CMake (slides & examples)- by Deniz Bahadir, Meeting C++ 2018.
- Article
Modifying the default CMake build types/flags, toolchains and patches - Oh my! - by Cristian Adam.
- Tutorial
Tutorial and Example on How to Properly Use Modern CMake.
Package Management / Build Systems
11_ENTRIES- FetchDependency
Configuration-time retrieval, configuration and building of dependencies.
[MIT]
Modules
16_ENTRIES- cmake-modules
Ryan Pavlik'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.
[BOOST] - cmake-modules
This is a collection of additional CMake modules. Most of them are from Ryan Pavlik.
[BOOST] - cmake-modules
CMake modules for some scientific libraries.
[BSD2] - FindMathematica
CMake module for Mathematica.
[MIT] - FindICU.cmake
CMake module to find International Components for Unicode (ICU) Library.
[BSD2] - FindWiX
CMake module for building Windows Installer packages with WiX toolset.
[BSD3] - cmake-modules
hanjianwei's CMake module collection.
[MIT] - YCM
Extra CMake Modules for Yet Another Robot Platform and friends.
[BSD3] - CMakeCM
CMake Community Modules.
[NO LICENSE] - Oranges
Ben Vining's library of CMake modules and toolchains
[GPL]
Utility Scripts
24_ENTRIESThese provide a wide range of functionality - from dealing with compiler flags to using tools. Some also contain modules.
- DownloadProject
CMake module for downloading an external project's source at configure time.
[MIT] - coveralls-cmake
Coveralls JSON coverage generator and uploader for CMake.
[MIT] - compatibility
Improved version of cmake-compile-features.
[LICENSE] - cmake-modules
LibFindMacros development repository and other cool CMake stuff.
[LICENSE] - GreatCMakeCookOff
This is a repository of useful and less than useful CMake recipes.
[MIT] - cppcheck-target-cmake
Per-target CPPCheck for CMake.
[MIT] - clang-tidy-target-cmake
Add clang-tidy checks to a target using CMake.
[MIT] - cmake-unit
Unit testing framework for CMake.
[MIT] - cmake-header-language
CMake macro to determine the language of a header file.
[MIT] - tooling-cmake-util
Utility and common library for all polysquare CMake tools.
[MIT] - iwyu-target-cmake
CMake integration for include-what-you-use.
[MIT] - sanitizers-cmake
CMake module to enable sanitizers for binary targets.
[MIT] - cmake-precompiled-header
Visual Studio and GCC precompiled header macro.
[LICENSE] - CMakePCHCompiler
CMake precompiled headers via custom compiler extension - with reuse support!
[MIT] - CMake-codecov
Enables code coverage and generates coverage reports with CMake targets.
[GPL] - cmake-get
Get dependencies in config or script mode.
[NO LICENSE] - CMakeCooking
Flexible development environments for CMake projects with external dependencies .
[APACHE2] - fetch_paths.cmake
Lightweight utility to simplify file/directory path retrieval in CMake, supporting dynamic searches and flexible output formats.
[MIT]
Toolchains
11_ENTRIES- android-cmake
CMake toolchain file and other scripts for the Android NDK.
[BSD3] - qt-android-cmake
For building and deploying Qt based apps on Android without QtCreator.
[LICENSE] - mingw-w64-cmake
CMake-based MinGW-w64 Cross Toolchain - to build Windows binaries of mpv.
[ISC] - arduino-cmake
This is the CMake project settings for the Arduino platform.
[MPL] - toolchains
For cross-compiling with CMake. They are meant to be mainly used on ArchLinux.
[NO LICENSE] - Arduino-CMake-Toolchain
CMake toolchain for all official and 3rd party Arduino platforms.
[MIT]
Examples / Templates
23_ENTRIES- cmake-init
Template for reliable, cross-platform C++ project setup using CMake.
[LICENSE] - android-cmake
Examples of using ruslo/hunter package manager for an Android application.
[BSD2] - hunter-simple
Example of downloading/installing dependencies using ruslo/hunter package manager.
[BSD2] - package-example
Config mode of find_package (examples for this Stack Overflow question).
[NO LICENSE] - minimal_cmake_example
Minimal CMake example, that covers dependencies and packaging.
[CC0-1.0] - cmake-example
Example project which demonstrates various CMake features.
[BSD3] - cmake-examples
Useful CMake examples in a tutorial format.
[MIT] - mini-cmake-qt
Minimal CMake template for Qt 5 projects.
[LICENSE] - cpp-boilerplate
Template that aims to be a reference for modern CMake and CI.
[MIT] - how-to-export-cpp-library
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.
[MIT] - modern-cmake-sample
Best practices and proper usage of CMake by using targets.
[NO LICENSE] - CMakeInstallExample
Installation example for a C++ project (Windows) with Cmake.
[NO LICENSE] - cpp14-project-template
A C++14 template with CI, tests, code coverage, docs and static analysis integration.
[CC0-1.0] - cmake_templates
Templates for creating C++ libraries and executables (including conan).
[NO LICENSE] - cmake_snippets
Short copy-pasteable CMake snippets.
[BSD3] - cmake-cookbook
A huge CMake cookbook full of recipes.
[MIT] - cpp-template
A template C++ repository, using CMake and Catch.
[NO LICENSE] - cmake-examples
A collection of as simple as possible, modern CMake projects.
[MIT] - cpp-project
Boiler plate for C++ projects - tests, CI, coverage, docs.
[UNLICENSE] - ModernCppStarter
A template for modern C++ projects using CMake, CI, code coverage, clang-format, reproducible dependency management, tests using doctest and much more.
[UNLICENSE]
Other
21_ENTRIES- scikit-build
Improved build system generator for CPython C extensions.
[MIT] - node-cmake
CMake-based build system for node.js native modules.
[ISC] - cmake-font-lock
Advanced syntax coloring support for CMake scripts inside Emacs.
[GPL] - suitesparse-metis-for-windows
CMake scripts for painless usage of SuiteSparse+METIS.
[BSD3] - osg-3rdparty-cmake
CMake scripts for building OpenSceneGraph third party libraries.
[MIXED LICENSE] - cmakeprojectmanager2
Enhanced CMake Project Manager plugin for Qt Creator.
[NO LICENSE] - cmake-lint
Check for coding style issues in CMake files. cmakelint requires Python.
[APACHE2] - git-cmake-format
Integrate clang-format into your CMake project hosted in a git repository.
[LICENSE] - configure-cmake
configure-cmake is an autotools-style configure script for CMake-based projects.
[CC0-1.0] - cmake-checks-cache
CMake checks cache helper modules.
[MIT] - cmake_check
Static analysis (linter) for the CMake language (e.g. to enforce modern CMake rules).
[MIT] - cmake-language-server
CMake Language Server Protocol Implementation.
[MIT] - cmake-maven-plugin
CMake integration for Maven builds.
[APACHE2] - version-from-git
Bake git information into your binary.
[MIT]