skip to content
Ivan's wiki
Site Tools
Search
Tools
Show pagesource
Backlinks
Recent Changes
Media Manager
Sitemap
>
Recent Changes
Media Manager
Sitemap
cmake
This page is read only. You can view the source, but not change it.
# CMake **CMake** is a build system generator. It reads a project description in `CMakeLists.txt` and generates native build files (Makefiles, Ninja, Visual Studio projects, etc.) for your platform. This solves portability—describe targets and dependencies abstractly, and CMake generates platform-specific build recipes. CMake is the de facto standard in HPC, embedded, and scientific computing. Most numerical libraries (Eigen, OpenCV, CUDA, MPI) ship with `CMakeLists.txt` and expect to be consumed via `find_package`. Knowing CMake is about reading and extending others' build scripts, not writing elaborate ones from scratch. ```bash $ mkdir build && cd build # out-of-source build $ cmake .. # generate build system $ cmake --build . # invoke generator (make, ninja, ...) $ cmake --build . --target test # run tests ``` CMake separates configuration (reading `CMakeLists.txt`, finding libraries) from building. The configuration step generates build files; the build step invokes the underlying tool. This two-step process lets you use the same CMakeLists.txt with different generators. ## Concepts 1. [Basics](/cmake-basics) 2. [CMakeLists.txt](/cmake-cmakelists-txt) 3. [Projects and targets](/cmake-projects-and-targets) 4. [Executables and libraries](/cmake-executables-and-libraries) 5. [Variables](/cmake-variables) 6. [Conditionals and loops](/cmake-conditionals-and-loops) 7. [Functions and macros](/cmake-functions-and-macros) 8. [Finding dependencies](/cmake-finding-dependencies) 9. [Linking](/cmake-linking) 10. [Installation](/cmake-installation) 11. [Testing](/cmake-testing) 12. [Generators](/cmake-generators) 13. [Modern practices](/cmake-modern-practices) 14. [Subdirectories](/cmake-subdirectories)
Page Tools
Show pagesource
Backlinks
Back to top