CMake Build System

  1. CMake Language Fundamentals
    1. Syntax and Commands
      1. Command Structure
        1. Command Names
          1. Argument Parsing
            1. Parentheses and Brackets
            2. Comments
              1. Single-Line Comments
                1. Multi-Line Comments
                  1. Bracket Comments
                  2. Case Insensitivity of Commands
                    1. Command Name Rules
                      1. Best Practices
                    2. Variables
                      1. Setting Variables
                        1. set Command Syntax
                          1. Variable Types
                            1. Overwriting Variables
                            2. Unsetting Variables
                              1. unset Command
                                1. Removing Variables
                                2. Variable Scopes
                                  1. Local Scope
                                    1. Directory Scope
                                      1. Cache Scope
                                        1. Parent Scope
                                        2. Dereferencing Variables
                                          1. Variable Expansion Syntax
                                            1. Nested Variable References
                                            2. Environment Variables
                                              1. Accessing Environment Variables
                                                1. Setting Environment Variables
                                                2. Quoted vs. Unquoted Arguments
                                                  1. Effects on Argument Parsing
                                                    1. Escaping Special Characters
                                                  2. Lists
                                                    1. Creating Lists
                                                      1. List Syntax
                                                        1. Semicolon Separation
                                                        2. List Commands
                                                          1. APPEND Operation
                                                            1. GET Operation
                                                              1. LENGTH Operation
                                                                1. FIND Operation
                                                                  1. REMOVE_ITEM Operation
                                                                    1. SORT Operation
                                                                      1. REVERSE Operation
                                                                        1. FILTER Operation
                                                                        2. Splitting and Joining Lists
                                                                          1. string Command for Lists
                                                                          2. Iterating Over Lists
                                                                            1. foreach Loops with Lists
                                                                          3. Control Flow
                                                                            1. Conditional Statements
                                                                              1. if Statement Syntax
                                                                                1. elseif Clauses
                                                                                  1. else Clauses
                                                                                    1. endif Termination
                                                                                      1. Boolean Expressions
                                                                                        1. String Comparisons
                                                                                          1. Numeric Comparisons
                                                                                            1. File and Directory Checks
                                                                                              1. Target Existence Checks
                                                                                              2. Looping with foreach
                                                                                                1. Iterating Over Lists
                                                                                                  1. Range Loops
                                                                                                    1. Loop Variables
                                                                                                    2. Looping with while
                                                                                                      1. Loop Conditions
                                                                                                        1. Breaking and Continuing Loops
                                                                                                      2. Functions and Macros
                                                                                                        1. Defining Functions
                                                                                                          1. function Command Syntax
                                                                                                            1. Function Arguments
                                                                                                              1. Return Values
                                                                                                                1. Local Variable Scope
                                                                                                                2. Defining Macros
                                                                                                                  1. macro Command Syntax
                                                                                                                    1. Macro Expansion
                                                                                                                      1. Variable Scope Differences
                                                                                                                      2. Handling Arguments
                                                                                                                        1. ARGC Variable
                                                                                                                          1. ARGV Variable
                                                                                                                            1. ARGN Variable
                                                                                                                              1. Named Arguments
                                                                                                                              2. Advanced Argument Handling
                                                                                                                                1. cmake_parse_arguments Command
                                                                                                                                  1. Optional Arguments
                                                                                                                                    1. Multi-Value Arguments