# CMake Mac 版：面向 C 和 C++ 项目的构建系统生成器

_As of 2026-11-27_

- **Version:** 4.5.1
- **Developer:** Kitware
- **macOS min:** 12
- **License:** Free

CMake 是 Kitware 推出的免费开源工具，它读取项目的 CMakeLists.txt 文件，并为 Xcode、Ninja 或 Make 生成构建文件。Mac 版下载包里包含一个图形界面应用和命令行工具。

CMake does not compile anything itself. It reads the CMakeLists.txt files that describe a project and generates build files for the tool you actually build with, so one description serves macOS, Windows and Linux.
What it does well

Generators. Produces Xcode projects, Ninja build files or Unix Makefiles from the same project description.
Graphical configuration. The CMake app lists a project's options with their values, so you can change them before you configure and generate.
Testing and packaging. ctest runs a project's tests, and cpack builds installers and archives.
Presets. A CMakePresets.json file stores named configurations that the command line, the app and IDEs can share.

Who it is for
C and C++ developers, and anyone who has to build an open-source project whose instructions begin with cmake.
Good to know
CMake needs a compiler, so on a Mac you also install Xcode or Apple's Command Line Tools. Its scripting language takes time to learn, and the app does not put cmake on your PATH until you do the last step below. If you would rather not run CMake by hand, Qt Creator and Visual Studio Code (with the CMake Tools extension) can drive it for you.
How to install

Open the downloaded disk image.
Drag CMake to Applications.
The first time you open it, macOS asks you to confirm an app downloaded from the internet; click Open.
To use cmake in Terminal, run sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install; it creates links in /usr/local/bin.

> Source: https://macsoftpark.net/zh/cmake/
