CMake
$ cmake Official Low RiskIndustry-standard meta-build system generating Ninja, Make, Xcode, and Visual Studio build trees for C and C++ projects. Includes cmake -E capabilities JSON introspection and --list-presets, though stateful CMakeCache.txt directories and verbose compiler logs require disciplined agent flags.
brew install cmake Inspects host compilers and generates local build graphs; requires direct local shell execution.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Non-interactive CLI with cmake -E capabilities JSON and --list-presets, but configure/build output is verbose text and lacks a simple dry-run.
cmake -E capabilitiesreturns JSON metadata- Configure/build streams verbose compiler diagnostics without
--json
Local-only tool, though running cmake . in-source pollutes the repository and CMakeLists.txt executes arbitrary configure-time commands.
- Out-of-source
-B buildisolates build artifacts - Stateful
CMakeCache.txtcan cause subtle stale-variable bugs
Available via Homebrew, PyPI, and official binaries across macOS, Linux, and Windows, though depends on external compilers/Ninja.
- Cross-platform binary, requires host C/C++ toolchain
De-facto standard across C/C++ ecosystems with unified cmake --build and ctest drivers.
- Abstracts Ninja, Make, MSVC, and Xcode backends
Maintained by Kitware under BSD-3-Clause with multi-decade stability.
- Official
kitware/cmakeproject
Comprehensive documentation, though legacy vs modern target-based idioms create noisy search results.
- Complete command reference at cmake.org/documentation
Security, Auth & Guardrails
No credentials stored; writes build configuration state into CMakeCache.txt inside the build directory.
BSD-3-Clause open-source binary; completely free.
# CMake (cmake) Agent Rules - Always use out-of-source builds (`-S . -B build`)—never run `cmake .` in the repo root. - Check `cmake --list-presets` first if `CMakePresets.json` exists. - Pass `--output-on-failure` when running `ctest --test-dir build`.
Agent-Ready Command Recipes
Safe Read-Only Queries
cmake -E capabilities
Outputs supported generators, version, and file-API capabilities in JSON without touching any project.
cmake --list-presets
Prints available configure presets defined in the repository.
Controlled Writes & Previews
cmake -S . -B build -G Ninja && cmake --build build
Keeps generated artifacts confined to build/ using out-of-source builds.
Strengths for Agents
- +
cmake --buildandctestgive a consistent cross-platform build/test interface. - +
CMakePresets.json(--list-presets) standardizes complex toolchain flags. - + Supported by virtually every C/C++ library and IDE.
Caveats & Pitfalls
- ! Stateful
CMakeCache.txtoften forces agents to wipebuild/when changing toolchain flags. - ! Verbose configure/build text logs can quickly consume context windows on large C++ projects.