An open API service indexing awesome lists of open source software.

awesome-cmake

A curated list of awesome CMake resources, scripts, modules and examples.
https://github.com/onqtam/awesome-cmake

Last synced: about 18 hours ago
JSON representation

  • Community

  • Resources

    • Latest Documentation
    • FAQ
    • Wiki
    • 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).
    • Basic CMake usage
    • Basic CMake, part 2: libraries
    • Lecture - Introduction to CMake - by Florent Castelli, C++ Sweden 2018.
    • 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]```][CC0-1.0]
    • Lecture - More Modern CMake ([slides & examples](https://github.com/Bagira80/More-Modern-CMake))- by Deniz Bahadir, Meeting C++ 2018.
    • Lecture - Oh No! More Modern CMake ([slides](https://github.com/Bagira80/More-Modern-CMake/raw/master/OhNoMoreModernCMake.pdf))- by Deniz Bahadir, Meeting C++ 2019.
    • Article - Modifying the default CMake build types/flags, toolchains and patches - Oh my! - by Cristian Adam.
    • Article - Some nice and accurate CMake tips.
    • Web Book - CGold: The Hitchhiker’s [Guide](https://cgold.readthedocs.io) to the CMake. [```[BSD2]```][BSD-2-Clause]
    • Modern CMake - Modern CMake **PDF** and samples by the creator of [cmakepp](https://github.com/toeb/cmakepp). [```[MIT]```][MIT]
    • Article - Building Cross-Platform CUDA Applications with CMake.
    • Tutorial - Tutorial and Example on How to Properly Use Modern CMake.
    • Article - A list of common CMake antipatterns (from 2013 but still relevant).
  • Package Management / Build Systems

    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • vcpkg - A tool to acquire and build C++ open source libraries. Uses CMake internally as a build script language. [```[MIT]```][MIT]
    • conan - Conan C++ Package Manager, implemented in Python and has a CMake integration backend. [```[MIT]```][MIT]
    • cpm - C++ Package Manager based on CMake and Git. [```[MIT]```][MIT]
    • Ninja - 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. [```[APACHE2]```][APACHE2]
    • hunter - Cross-platform package manager for C++ (based on CMake ExternalProject). [```[BSD2]```][BSD-2-Clause]
    • cget - CMake package retrieval. This can be used to download and install CMake packages. [```[BOOST]```][BOOST]
    • fips - High-level build system/dependency management for distributed, multi-platform C/C++ projects. [```[MIT]```][MIT]
    • cppan - C++ Archive Network - C++ Package Manager based on CMake, implemented in C++14. [```[APACHE2]```][APACHE2]
    • pmm - PMM is a module for CMake that manages... package managers. [```[MIT]```][MIT]
    • FetchDependency - Configuration-time retrieval, configuration and building of dependencies. [```[MIT]```][MIT]
  • Toolchains

    • cmake - Collection of CMake toolchain files, mostly for static linking. [```[APACHE2]```][APACHE2]
    • dockcross - Cross compiling toolchains in Docker images. [```[MIT]```][MIT]
    • ios-cmake - Toolchain file and examples using CMake for iOS development. [```[BSD3]```][BSD-3-Clause]
    • toolchains - For cross-compiling with CMake. They are meant to be mainly used on ArchLinux. ```[NO LICENSE]```
    • polly - Collection of CMake toolchain files and scripts for cross-platform build and CI testing. [```[BSD2]```][BSD-2-Clause]
    • Arduino-CMake-Toolchain - CMake toolchain for all official and 3rd party Arduino platforms. [```[MIT]```][MIT]
    • android-cmake - CMake toolchain file and other scripts for the Android NDK. [```[BSD3]```][BSD-3-Clause]
    • qt-android-cmake - For building and deploying Qt based apps on Android without QtCreator. [```[LICENSE]```](https://github.com/LaurentGomila/qt-android-cmake/blob/master/license.txt)
    • cmake-avr - CMake toolchain for AVR. [```[LICENSE]```](https://github.com/mkleemann/cmake-avr/blob/master/LICENSE)
    • arduino-cmake - This is the CMake project settings for the Arduino platform. [```[MPL]```][MPL]
  • Other

    • UseLATEX - Collection of CMake macros to simplify building LaTeX files. [```[BSD3]```][BSD-3-Clause]
    • catkin - CMake-based build system that is used to build all packages in Robot Operating System (ROS). [```[BSD3]```][BSD-3-Clause]
    • cmake-language-server - CMake Language Server Protocol Implementation. [```[MIT]```][MIT]
    • configure-cmake - configure-cmake is an autotools-style configure script for CMake-based projects. [```[CC0-1.0]```][CC0-1.0]
    • cmake-d - CMake for D2. [```[MIT]```][MIT]
    • scikit-build - Improved build system generator for CPython C extensions. [```[MIT]```][MIT]
    • suitesparse-metis-for-windows - CMake scripts for painless usage of SuiteSparse+METIS. [```[BSD3]```][BSD-3-Clause]
    • cmakeprojectmanager2 - Enhanced CMake Project Manager plugin for Qt Creator. ```[NO LICENSE]```
    • SoCMake - CMake based build system for hardware (ASIC, FPGA) and System-on-Chip build automation. [```[LGPL]```][LGPL]
    • node-cmake - CMake-based build system for node.js native modules. [```[ISC]```][ISC]
    • cmake-font-lock - Advanced syntax coloring support for CMake scripts inside Emacs. [```[GPL]```][GPL]
    • autovala - Program that automatically generates CMake configuration files for your Vala project. [```[GPL]```][GPL]
    • osg-3rdparty-cmake - CMake scripts for building OpenSceneGraph third party libraries. ```[MIXED LICENSE]```
    • cmake-lint - Check for coding style issues in CMake files. cmakelint requires Python. [```[APACHE2]```][APACHE2]
    • git-cmake-format - Integrate clang-format into your CMake project hosted in a git repository. [```[LICENSE]```](https://github.com/kbenzie/git-cmake-format/blob/master/license.txt)
    • cmake-ast - Python module to reduce a CMake file to an AST. [```[MIT]```][MIT]
    • cmake-checks-cache - CMake checks cache helper modules. [```[MIT]```][MIT]
    • cmake_check - Static analysis (linter) for the CMake language (e.g. to enforce modern CMake rules). [```[MIT]```][MIT]
    • version-from-git - Bake git information into your binary. [```[MIT]```][MIT]
    • cmake-maven-plugin - CMake integration for Maven builds. [```[APACHE2]```][APACHE2]
    • autocmake - Using a autocmake.yml file [Autocmake](http://autocmake.readthedocs.io/en/latest/) 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. [```[BSD3]```][BSD-3-Clause]
  • Examples / Templates

    • cpp-project - Boiler plate for C++ projects - tests, CI, coverage, docs. [```[UNLICENSE]```][UNLICENSE]
    • cmake-init - Template for reliable, cross-platform C++ project setup using CMake. [```[LICENSE]```](https://github.com/cginternals/cmake-init/blob/master/LICENSE)
    • ModernCppStarter - A template for modern C++ projects using CMake, CI, code coverage, clang-format, reproducible dependency management, tests using [doctest](https://github.com/onqtam/doctest) and much more. [```[UNLICENSE]```][UNLICENSE]
    • cmake-cookbook - A huge CMake cookbook full of recipes. [```[MIT]```][MIT]
    • cmake-examples - Useful CMake examples in a tutorial format. [```[MIT]```][MIT]
    • cmake-examples - A collection of as simple as possible, modern CMake projects. [```[MIT]```][MIT]
    • cmake-example - Example project which demonstrates various CMake features. [```[BSD3]```][BSD-3-Clause]
    • SeeMake - A feature-packed, ready-to-use CMake template with testing, static and dynamic checks, coverage reports, and more. [```[MIT]```][MIT]
    • mini-cmake-qt - Minimal CMake template for Qt 5 projects. [```[LICENSE]```](https://github.com/euler0/mini-cmake-qt/blob/master/LICENSE)
    • pitchfork - A set of conventions for native C and C++ projects. [```[MIT]```][MIT]
    • cmake_snippets - Short copy-pasteable CMake snippets. [```[BSD3]```][BSD-3-Clause]
    • 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]```][MIT]
    • android-cmake - Examples of using [ruslo/hunter](https://github.com/ruslo/hunter) package manager for an Android application. [```[BSD2]```][BSD-2-Clause]
    • package-example - Config mode of find_package (examples for [this](http://stackoverflow.com/questions/20746936/cmake-of-what-use-is-find-package-if-you-need-to-specify-cmake-module-path-an) Stack Overflow question). ```[NO LICENSE]```
    • minimal_cmake_example - Minimal CMake example, that covers dependencies and packaging. [```[CC0-1.0]```][CC0-1.0]
    • BASIS - CMake [BASIS](https://cmake-basis.github.io) makes it easy to create sharable software and libraries that work together. [```[BSD2]```][BSD-2-Clause]
    • cpp-boilerplate - Template that aims to be a reference for modern CMake and CI. [```[MIT]```][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]```][CC0-1.0]
    • cmake_templates - Templates for creating C++ libraries and executables (including conan). ```[NO LICENSE]```
    • cpp-template - A template C++ repository, using CMake and Catch. ```[NO LICENSE]```
  • Modules

    • cmake-modules - This is a collection of additional CMake modules. Most of them are from Ryan Pavlik. [```[BOOST]```][BOOST]
    • cmake-modules - [Ryan Pavlik](https://github.com/rpavlik)'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]```][BOOST]
    • CMake - [Eyescale](https://github.com/Eyescale)'s common CMake modules. [```[BSD3]```][BSD-3-Clause]
    • Metabench - CMake module for compile-time microbenchmarks. [```[BOOST]```][BOOST]
    • cmake-modules - CMake modules for some scientific libraries. [```[BSD2]```][BSD-2-Clause]
    • cgcmake - CMake modules for common applications related to computer graphics. [```[MIT]```][MIT]
    • FindMathematica - CMake module for Mathematica. [```[MIT]```][MIT]
    • extra-cmake-modules - [KDE](https://github.com/KDE)'s extra modules and scripts for CMake. [```[BSD3]```][BSD-3-Clause]
    • FindICU.cmake - CMake module to find International Components for Unicode (ICU) Library. [```[BSD2]```][BSD-2-Clause]
    • FindTBB - CMake find module for Intel Threading Building Blocks. [```[MIT]```][MIT]
    • FindWiX - CMake module for building [Windows Installer](https://en.wikipedia.org/wiki/Windows_Installer) packages with [WiX toolset](http://wixtoolset.org). [```[BSD3]```][BSD-3-Clause]
    • FindIDL - CMake module for building [IDL](https://docs.microsoft.com/en-us/windows/win32/midl/interface-definition-idl-file) files with MIDL and generating CLR DLL using [Tlbimp](https://docs.microsoft.com/en-us/dotnet/framework/tools/tlbimp-exe-type-library-importer). [```[MIT]```][MIT]
    • cmake-modules - [hanjianwei](https://github.com/hanjianwei)'s CMake module collection. [```[MIT]```][MIT]
    • CMakeCM - CMake Community Modules. ```[NO LICENSE]```
  • Utility Scripts

    • CMakePCHCompiler - CMake precompiled headers via custom compiler extension - with reuse support! [```[MIT]```][MIT]
    • compatibility - Improved version of cmake-compile-features. [```[LICENSE]```](https://github.com/foonathan/compatibility/blob/master/LICENSE)
    • sanitizers-cmake - CMake module to enable sanitizers for binary targets. [```[MIT]```][MIT]
    • ucm - For managing compiler/linker flags, collecting sources, precompiled headers, unity builds and others. [```[MIT]```][MIT]
    • cotire - 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++. [```[MIT]```][MIT]
    • cmakepp - Enhancement Suite for the CMake Build System. [```[MIT]```][MIT]
    • cmake-get - Get dependencies in config or script mode. ```[NO LICENSE]```
    • coveralls-cmake - Coveralls JSON coverage generator and uploader for CMake. [```[MIT]```][MIT]
    • sugar - CMake tools and examples: collecting source files, warnings suppression, etc. [```[BSD2]```][BSD-2-Clause]
    • DownloadProject - CMake module for downloading an external project's source at configure time. [```[MIT]```][MIT]
    • buildem - Modular CMake-based system that leverages ExternalProject to simplify builds. [```[LICENSE]```](https://github.com/janelia-flyem/buildem/blob/master/LICENSE.txt)
    • cmake-modules - LibFindMacros development repository and other cool CMake stuff. [```[LICENSE]```](https://github.com/Tronic/cmake-modules/blob/master/LibFindMacros.cmake#L2)
    • GreatCMakeCookOff - This is a repository of useful and less than useful CMake recipes. [```[MIT]```][MIT]
    • cppcheck-target-cmake - Per-target CPPCheck for CMake. [```[MIT]```][MIT]
    • clang-tidy-target-cmake - Add clang-tidy checks to a target using CMake. [```[MIT]```][MIT]
    • cmake-unit - Unit testing framework for CMake. [```[MIT]```][MIT]
    • cmake-header-language - CMake macro to determine the language of a header file. [```[MIT]```][MIT]
    • tooling-cmake-util - Utility and common library for all polysquare CMake tools. [```[MIT]```][MIT]
    • iwyu-target-cmake - CMake integration for include-what-you-use. [```[MIT]```][MIT]
    • cmake-precompiled-header - Visual Studio and GCC precompiled header macro. [```[LICENSE]```](https://github.com/larsch/cmake-precompiled-header/blob/master/PrecompiledHeader.cmake#L31)
    • CMake-codecov - Enables code coverage and generates coverage reports with CMake targets. [```[GPL]```][GPL]
    • ixm - Make CMake less painful when trying to write Modern Flexible CMake. [```[MIT]```][MIT]
    • fetch_paths.cmake - Lightweight utility to simplify file/directory path retrieval in CMake, supporting dynamic searches and flexible output formats. [```[MIT]```](https://github.com/XiaoLey/fetch_paths.cmake/blob/main/LICENSE)
    • ixm - Make CMake less painful when trying to write Modern Flexible CMake. [```[MIT]```][MIT]