CMake version recommendations and install
Downloading the latest release of CMake is usually easy. Admin / sudo is not required.
- Linux:
snap install cmake - macOS: brew install cmake
- Windows:
winget install Kitware.CMake - PyPI CMake package:
python -m pip install cmake
For platforms where CMake binaries aren’t easily available, build CMake using scripts/build_cmake.cmake.
To see the merge requests for a certain release, use a URL like: https://gitlab.kitware.com/cmake/cmake/-/merge_requests?milestone_title=4.3.0&scope=all&state=all
Another CMake changelog summary we like.
CMake 4.5 additions include:
- CMake added rules via add_custom_rule as a much more convenient way to define outputs vs inputs - easier to understand and use than the classic combination of “add_custom_command” and “add_custom_target”
- CTest can run incrementally avoiding rerunning tests with unchanged source
- CMake target directive unused detection
- CMake can print all variables
- CTest can control how repeatedly run tests handle fixtures
- several generator expression new features
- CMAKE_SYSTEM_ENVIRONMENT_ID for a user or other program to indicate to CMake that a fresh configuration should be used.
- string(JSON … ARRAY_SPLIT) puts JSON arrays directly into CMake ;-list instead of manually iterating.
CMake 4.4 additions include:
- CMake can specify the presets file in the command line
- execute_process can specify ENVIRONMENT and/or ENVIRONMENT_MODIFICATION
CMake 4.3 additions include:
- Common Package Specification (CPS) officially supported. This provides a solution for the long-standing program of build system-agnostic JSON package configuration files, which can be generated by CMake’s
install(EXPORT)and consumable by other build systems. cmake --version=json-v1tells details of the libraries vendored into CMake, which is useful for debugging and reporting issues with CMake’s bundled dependencies. This is complementary to cmake -E capabilities which reports specific capabilities of the CMake.- CMake command line and file(ARCHIVE_CREATE) commands can specify compression level and algorithm in more detail
- numerous generator string expressions were added
CMake 4.2 additions include:
- Visual Studio 18 2026 generator added
- cmake_language(TRACE) enables tracing just selected nestable portions of CMake script, which is important for debugging CMake projects due to the large volume of trace output.
- Ability to force shorter paths on project builds, important for large or complex project on Windows where the 260 character path limit is a problem for some tools. This is done via CMAKE_INTERMEDIATE_DIR_STRATEGY which is a CMake environment variable as well as a CMake command-line option.
- FASTBuild generator has impressive benchmarks. FASTBuild supports more modern platforms including Windows, versus ccache or distcc.
- ExternalProject added options to modify environment variables at each step by CONFIGURE_ENVIRONMENT_MODIFICATION, BUILD_ENVIRONMENT_MODIFICATION, INSTALL_ENVIRONMENT_MODIFICATION, TEST_ENVIRONMENT_MODIFICATION
- Target property SPDX_LICENSE
CMake 4.1 additions include:
- project() added COMPAT_VERSION that propagates to subdirectories and can be queried for the top-level COMPAT_VERSION.
CMake 4.0 additions include:
- CMAKE_LINK_WARNING_AS_ERROR boolean option sets most compilers to error if a compile warning occurs, which is generally a good setting for CI systems.
- target_link_libraries()
can use a
LINKER:prefix to abstract options. - CMAKE_POLICY_VERSION_MINIMUM allows a user or project to call other projects that haven’t been updated to a newer CMake minimum version.
- SARIF output allows IDEs to better parse build status.
- CTest –interactive-debug-mode is particularly useful on Windows to enable/disable debug dumps and error popup windows.
Older CMake release changelogs: