- Compiling a single source file into an executable
- Switching Generators
- Building and Linking Static and Shared Libraries
- Controlling Compilation with Conditionals
- How to Present Options to the User
- How to Specify 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
- 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 the HDF5 Libraries
- Writing CMake Code to Detect External Libraries
- 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
- Probing compiler flags
- Probing execution
- Fine-tuning 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
- 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
- Defining a macro with named arguments
- 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
- 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 build with CMake/CFFI via PyPI
- Distributing a simple project as Conda package
- Distributing a project with dependencies as Conda package