Useful Links
Computer Science
Other Tools and Technologies
CMake Build System
1. Introduction to Build Systems and CMake
2. Getting Started with CMake
3. CMake Language Fundamentals
4. Projects, Targets, and Properties
5. Managing Dependencies
6. Build Configuration and Toolchains
7. Advanced CMake Topics
8. Testing with CTest
9. Packaging with CPack
10. CMake Best Practices and Patterns
Getting Started with CMake
Installation and Verification
Downloading CMake
Installing on Windows
Installer Packages
Adding to PATH
Installing on macOS
Homebrew Installation
MacPorts Installation
Installing on Linux
Using Package Managers
Building from Source
Verifying Installation
Checking Version Output
Troubleshooting Installation Issues
The Basic CMakeLists.txt File
Structure of a CMakeLists.txt File
cmake_minimum_required Command
Specifying Minimum CMake Version
Version Policy Implications
project Command
Naming the Project
Setting Project Version
Setting Project Languages
add_executable Command
Adding Source Files
Naming the Executable
The CMake Workflow
Configuration Step
Source and Build Directory Separation
Specifying Generator and Options
Command-Line Syntax
Generation Step
Generating Native Build Files
Understanding Output Files
Build Step
Building Targets
Parallel Builds
Command-Line Options
Installation Step
Installing Binaries and Files
Customizing Install Locations
Common CMake Generators
Unix Makefiles
Features and Limitations
Ninja
Speed and Parallelism
Installation Requirements
Visual Studio
Solution and Project Files
Version Support
Xcode
Workspace and Project Integration
Previous
1. Introduction to Build Systems and CMake
Go to top
Next
3. CMake Language Fundamentals