- Compiling a single source file into an executable
- Switching generators
- Building and linking static and shared libraries
- Controlling compilation with conditionals
- Presenting options to the user
- Specifying the compiler
- Switching the build type
- Controlling compiler flags
- Setting the standard for the language
- Using control flow constructs
- Discovering the operating system
- Dealing with platform-dependent source code
- Dealing with compiler-dependent source code
- Discovering the host processor architecture
- Discovering the host processor instruction set
- Enabling vectorization for the Eigen library
- Detecting the Python interpreter
- Detecting the Python library
- Detecting Python modules and packages
- Detecting the BLAS and LAPACK math libraries
- Detecting the OpenMP parallel environment
- Detecting the MPI parallel environment
- Detecting the Eigen library
- Detecting the Boost libraries
- Detecting external libraries: I. Using pkg-config
- Detecting external libraries: II. Writing a find-module
- Creating a simple unit test example
- Define a unit test using the Catch2 library
- Define a unit test and link against Google test
- Define a unit test and link against Boost test
- Dynamic analysis to detect memory defects
- Testing expected failures
- Using timeouts for long tests
- Running tests in parallel
- Running a subset of tests
- Using test fixtures
- Using platform-independent file operations
- Running a custom command at configure-time
- Running a custom command at build-time I
- Running a custom command at build-time II
- Running custom commands for specific targets at build-time
- Probing compilation and linking
- Probing compiler flags
- Probing execution
- Fine-tuning configuration and compilation with generator expressions
- Generating sources at configure-time
- Generating source code at configure-time using Python
- Generating source code at build-time using Python
- Recording the project version information for reproducibility
- Recording the project version from a file
- Recording the Git hash at configure-time
- Recording the Git hash at build-time
- Code reuse with functions and macros
- Splitting CMake sources into modules
- Function to test and set compiler flags
- Defining a function or macro with named arguments
- Redefining functions and macros
- Deprecating functions, macros, and variables
- Limiting scope with add_subdirectory
- Avoiding global variables using target_sources
- Organizing Fortran projects
- Using the superbuild pattern
- Managing dependencies with a superbuild I. The Boost libraries
- Managing dependencies with a superbuild II. The FFTW library
- Managing dependencies with a superbuild III. The Eigen library
- Managing dependencies with a superbuild IV. The HDF5 library
- Managing your project as a superbuild
- Building Fortran projects that use C/C++ libraries
- Building C/C++ projects that use Fortran libraries
- Building C++ and Python projects using Cython
- Building C++ and Python projects using Boost.Python
- Building C++ and Python projects using pybind11
- Mixing C, C++, Fortran, and Python using Python CFFI
- Installing your project
- Installing following GNU standards
- Generating export headers
- Exporting your targets
- Installing a superbuild
- Generating source archives
- Generating binary archives
- Generating DEB packages
- Generating RPM packages
- Generating an NSIS installer for Windows
- Distributing a C++/Python project built with CMake/pybind11 via PyPI
- Distributing a C/Fortran/Python project built with CMake/CFFI via PyPI
- Distributing a simple project as Conda package
- Distributing a project with dependencies as Conda package