Skip to content

CMake

September 29, 2023
May 31, 2023

CMake is an extensible, open-source system that manages the build process in an operating system and in a compiler-independent manner.

CMake
CMake Tutorial — CMake Documentation
CMake Reference Documentation — CMake Documentation
FAQ · Wiki · CMake / Community · GitLab
Home · Wiki · CMake / Community · GitLab

Webinars | CMake
Introduction to CMake on Vimeo
How to CMake Good - Recommended Order - YouTube
Akagi201/learning-cmake: learning cmake
cmake_host_system_information — CMake 3.26.4 Documentation

  --debug-output               = Put cmake in a debug mode.
  --debug-find                 = Put cmake find in a debug mode.
  --debug-find-pkg=<pkg-name>[,...]
                               = Limit cmake debug-find to the
                                 comma-separated list of packages
  --debug-find-var=<var-name>[,...]
                               = Limit cmake debug-find to the
                                 comma-separated list of result variables
  --trace                      = Put cmake in trace mode.
  --trace-expand               = Put cmake in trace mode with variable
                                 expansion.
  --trace-format=<human|json-v1>

cmake and the Windows CMake GUI will prompt for config

make VERBOSE=1

Cross-Platform Software Development Using CMake | Linux Journal
unbornchikken-cmake-js · GitHub
Learning CMake: A beginner's guide · GitBook
The Architecture of Open Source Applications: CMake
An Introduction to CMake
CMake and FIND PACKAGE - Wiki for iCub and Friends

c++ - Debug vs Release in CMake - Stack Overflow

mkdir Release
cd Release
cmake -DCMAKE_BUILD_TYPE=Release ..
make

mkdir Debug
cd Debug
cmake -DCMAKE_BUILD_TYPE=Debug ..
make

CMakeLists.txt

Examples | CMake
VariablesListsStrings · Wiki · CMake / Community · GitLab

cmake-variables(7) — CMake Documentation
cmake-properties(7) — CMake Documentation

project(HELLO) => ${HELLO_SOURCE_DIR} and ${HELLO_BINARY_DIR} available

Tips and Tricks

Cmake does not generate 64bit project when setting x64-Debug/Release in CMakeSettings.json - Developer Community