CMake 3.25 Release Notes

Changes made since CMake 3.24 include the following.

New Features






  • The add_subdirectory() command gained a SYSTEM option to enable the SYSTEM directory property in the subdirectory.

  • The block() and endblock() commands were added to manage specific scopes (policy or variable) for a contained block of commands.

  • The cmake_language() command gained a new GET_MESSAGE_LOG_LEVEL sub-command. It can be used to query the current message logging level.

  • The find_file(), find_path(), find_library(), and find_program() commands gained a VALIDATOR option to specify a function to be called for each candidate item to validate it.

  • The find_package() command now considers paths of the form <prefix>/<name>*/(cmake|CMake)/<name>*/ when searching for package configuration files.

  • The return() command gained a PROPAGATE option to propagate variables to the scope to which control returns. See policy CMP0140.

  • The try_compile() and try_run() commands gained new signatures that more consistently use keyword dispatch and do not require a binary directory to be specified. Additionally, these signatures use a unique directory for each invocation, which allows multiple outputs to be preserved when using cmake --debug-trycompile.

  • The try_compile() and try_run() commands gained the option NO_CACHE to store results in normal variables.

  • The try_run() command gained RUN_OUTPUT_STDOUT_VARIABLE and RUN_OUTPUT_STDERR_VARIABLE options to capture stdout and stderr separately from the output of the compiled program.



  • The <LANG>_COMPILER_LAUNCHER target property now supports generator expressions.

  • The EXPORT_NO_SYSTEM target property was added to specify that install(EXPORT) and export() commands will generate na imported target with SYSTEM property OFF.

  • The SYSTEM target property was added to specify whether a target should be treated as a system library (i.e. its include directories are automatically SYSTEM when compiling consumers). If not set, the default is the previous behavior: on for imported targets and off for other targets.

  • The SYSTEM directory property was added to initialize the SYSTEM target property for targets created in that directory.


  • The FetchContent module FetchContent_Declare() command gained a SYSTEM option to enable the SYSTEM directory property in the subdirectory.

  • The FindCUDAToolkit module now provides a target for nvtx3 for CUDA 10.0+, which supersedes nvToolsExt. A deprecation warning is emitted when using nvToolsExt if the project requires CMake 3.25 and CUDA 10.0+ is used.

  • The FindDoxygen module's version handling has been improved:

    • Multiple candidate installations will now be considered, if needed, to satisfy version constraints. Previously, only the first one encountered would be considered.

    • Version ranges are supported.

    • Variations in the version format reported by Doxygen are now tolerated (e.g. a trailing git commit hash).

  • The FindOpenAL module now provides an imported target.

  • The FindOpenSP module was added to find the OpenSP library.

  • The FindVulkan module gained support for new components:


    DirectX Shader Compiler.


    Volk open-source vulkan meta-loader.


Deprecated and Removed Features

Other Changes

  • On Windows, when targeting the MSVC ABI, the find_library() command now accepts .a file names after first considering .lib. This is symmetric with existing behavior when targeting the GNU ABI, in which the command accepts .lib file names after first considering .a.

  • The SSL_CERT_FILE and SSL_CERT_DIR environment variables can now be used to override where to find certificate authorities for TLS/SSL operations.

  • If <LANG>_CLANG_TIDY includes a -p argument, the full compiler command line is no longer appended after --.

  • The Xcode generator no longer adds the per-config suffix $(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) to library search paths. See policy CMP0142.