CMake 3.30 Release Notes

Changes made since CMake 3.29 include the following.

New Features

Presets

  • cmake-presets(7) files now support schema version 9. include fields now expand all macros except $env{} and preset-specific macros, i.e., those derived from the fields inside a preset's definition.

File-Based API

  • The cmake-file-api(7) "cmakeFiles" version 1 object's version field has been updated to 1.1. It gained a globsDependent field to report file(GLOB) calls using CONFIGURE_DEPENDS.

Generators

  • Visual Studio Generators now add UseDebugLibraries indicators to .vcxproj files to denote which configurations are debug configurations. See policy CMP0162.

Languages

  • The Compile Features functionality now implements support for the cxx_std_26 and cuda_std_26 meta-features to indicate that the compiler mode must be at least C++26. These meta-features were first documented by CMake 3.25, but were not fully implemented.

Commands

  • The add_library() command, on platforms that do not support shared libraries, now rejects creation of shared libraries instead of automatically converting them to static libraries. See policy CMP0164.

  • The enable_language() command now fails with an error if it is called before the first project() call. See policy CMP0165.

  • The file(DOWNLOAD) and file(UPLOAD) commands gained a TLS_VERSION <min> option to specify the minimum TLS version for connections to https:// URLs.

Variables

Properties

Modules

  • The ExternalProject module's ExternalProject_Add() command gained a TLS_VERSION <min> option, and support for the CMAKE_TLS_VERSION variable and CMAKE_TLS_VERSION environment variable, to specify the minimum TLS version for connections to https:// URLs.

  • The FindBacktrace module now provides an imported target.

  • The FindBLAS and FindLAPACK modules gained support for libblastrampoline.

  • The FindCUDAToolkit module now provides a target for libnvfatbin and libnvfatbin_static, if found.

  • The FindCUDAToolkit module now searches the CMAKE_CUDA_COMPILER variable and the CUDACXX environment variable even when the CUDA language isn't enabled.

  • The FindOpenMP module gained an OpenMP_RUNTIME_MSVC option to control the OpenMP runtime used with MSVC.

  • The FindPython and FindPython3 modules gained support for the free threaded Python version.

  • The FindPython, FindPython2, and FindPython3 modules, on Windows, now offer better support for the Python debug variant:

    • new variables:

      • Python_EXECUTABLE_DEBUG

      • Python_INTERPRETER

      • Python_DEBUG_POSTFIX

    • new targets:

      • Python::InterpreterDebug

      • Python::InterpreterMultiConfig

    The python_add_library() command now manages the DEBUG_POSTFIX target property based on the value of the Python_DEBUG_POSTFIX variable.

Generator Expressions

CTest

CPack

Deprecated and Removed Features

Other Changes

  • The precompiled Windows .msi installers provided on cmake.org, when performing a fresh installation, now modify the system-wide PATH by default. When replacing an existing installation of 3.30 or later, the PATH modification preference is preserved by default.

  • The official .zip source archive provided on cmake.org now uses LF newlines, instead of CRLF newlines, for consistency with modern conventions.

  • The durations printed after "Configuring done" and "Generating done" messages now reflect time spent in generator-specific steps, and in a code model evaluation step at the beginning of generation that was not previously captured. Printed durations may appear longer than in previous versions of CMake, but are more accurate.

  • FetchContent now prefers to populate content directly rather than using a separate sub-build. This may significantly improve configure times on some systems (Windows especially, but also on macOS when using the Xcode generator). cmake --fresh also forces the download, update, and patch steps of directly populated dependencies to be re-executed. Policy CMP0168 provides backward compatibility for those projects that still rely on using a sub-build for content population.

  • When FETCHCONTENT_FULLY_DISCONNECTED is set to true, FetchContent_MakeAvailable() and the single-argument form of FetchContent_Populate() require that the dependency's source directory has already been populated. CMake 3.29 and earlier did not check this requirement, but it is now enforced, subject to policy CMP0170.