CPM.cmake is a dependency manager and package resolver for C and C++ projects that integrates directly into the CMake build system. It automates the process of fetching, configuring, and managing external libraries by resolving dependencies through system-wide package managers or by downloading source code from remote repositories.
The system ensures reproducible builds by locking transitive dependency versions and verifying the authenticity of downloaded source archives using cryptographic hash checksums. It allows for development flexibility through local filesystem overrides, which redirect remote dependencies to local paths, and sequential source patching to modify dependency behavior without altering the original codebase.
Broad capabilities include version resolution via semantic tags or commit hashes, local caching of dependency sources to reduce network overhead, and the application of custom build flags and options during the configuration of third-party projects.