CMake Build System

  1. Build Configuration and Toolchains
    1. Build Types
      1. Standard Configurations
        1. Debug Configuration
          1. Release Configuration
            1. RelWithDebInfo Configuration
              1. MinSizeRel Configuration
              2. Setting the Build Type
                1. CMAKE_BUILD_TYPE Variable
                  1. Command-Line Options
                    1. Default Build Type
                    2. Multi-Configuration Generators
                      1. Visual Studio Generators
                        1. Xcode Generator
                          1. Configuration Selection
                          2. Per-Configuration Properties
                            1. Setting Properties for Each Build Type
                              1. Configuration-Specific Variables
                            2. Compiler and Linker Configuration
                              1. Global Compiler Flags
                                1. CMAKE_C_FLAGS Variable
                                  1. CMAKE_CXX_FLAGS Variable
                                    1. Language-Specific Flags
                                    2. Global Linker Flags
                                      1. CMAKE_EXE_LINKER_FLAGS Variable
                                        1. CMAKE_SHARED_LINKER_FLAGS Variable
                                          1. CMAKE_STATIC_LINKER_FLAGS Variable
                                          2. Per-Configuration Flags
                                            1. CMAKE_CXX_FLAGS_DEBUG Variable
                                              1. CMAKE_CXX_FLAGS_RELEASE Variable
                                                1. Other Configuration Variables
                                                2. Compiler Detection
                                                  1. CMAKE_C_COMPILER_ID Variable
                                                    1. CMAKE_CXX_COMPILER_ID Variable
                                                      1. Compiler-Specific Logic
                                                    2. Cross-Compilation
                                                      1. Cross-Compilation Concepts
                                                        1. Host vs. Target Platforms
                                                          1. Cross-Compilation Challenges
                                                          2. Toolchain Files
                                                            1. Purpose of Toolchain Files
                                                              1. Structure of a Toolchain File
                                                                1. CMAKE_TOOLCHAIN_FILE Variable
                                                                2. System Information
                                                                  1. CMAKE_SYSTEM_NAME Variable
                                                                    1. CMAKE_SYSTEM_PROCESSOR Variable
                                                                      1. CMAKE_SYSTEM_VERSION Variable
                                                                      2. Specifying Compilers and Tools
                                                                        1. CMAKE_C_COMPILER Variable
                                                                          1. CMAKE_CXX_COMPILER Variable
                                                                            1. CMAKE_ASM_COMPILER Variable
                                                                              1. CMAKE_AR Variable
                                                                                1. CMAKE_RANLIB Variable
                                                                                2. Find Root Path
                                                                                  1. CMAKE_FIND_ROOT_PATH Variable
                                                                                    1. CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
                                                                                      1. CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
                                                                                        1. CMAKE_FIND_ROOT_PATH_MODE_INCLUDE
                                                                                        2. Sysroot Configuration
                                                                                          1. CMAKE_SYSROOT Variable
                                                                                            1. Cross-Compilation Examples