Files
webcoredesktop/content/software/cmake.md
T
2026-10-28 15:08:48 -06:00

28 lines
1.1 KiB
Markdown

---
title: "CMake"
category: "Languages and runtimes"
tagline: "The cross-platform build system generator most C and C++ projects use."
source: "pacman"
package: "cmake"
command: "cmake"
website: "https://cmake.org/"
code: "https://gitlab.kitware.com/cmake/cmake"
---
## What it is
CMake describes how to build a C or C++ project in a `CMakeLists.txt` file, then generates the build files for whatever tool does the compiling, such as make or Ninja. The same project builds on Linux, macOS and Windows.
## Why it's here
- **The common standard.** Most open-source C and C++ projects build with it.
- **Needed for installs.** Some Python and Rust packages run CMake to compile their native parts.
## On CoreDesktop
CMake is installed from pacman. CoreDesktop includes it, with [Clang](/software/clang/), because Hermes Agent's Matrix support builds python-olm, which needs it; when `update` updates Hermes, it tells CMake how to build python-olm's older build files. `update` keeps CMake current with the rest of the pacman packages.
```
cmake -B build && cmake --build build
```