We are pleased to announce that CMake 3.25.0 is now available for download.
https://cmake.org/download/
Documentation is available at:
https://cmake.org/cmake/help/v3.25
Release notes appear below and are also published at
https://cmake.org/cmake/help/v3.25/release/3.25.html
Some of the more significant changes in CMake 3.25 are:
* 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 "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 "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 "return()" command gained a "PROPAGATE" option to propagate
variables to the scope to which control returns. See policy
"CMP0140".
* The "BSD" and "CMAKE_HOST_BSD" variables are now set to a string
value when the target or host system is BSD, respectively.
* The "LINUX" and "CMAKE_HOST_LINUX" variables are now set to true
when the target or host system is Linux, respectively.
* The "CMAKE_MSVC_DEBUG_INFORMATION_FORMAT" variable and
"MSVC_DEBUG_INFORMATION_FORMAT" target property were introduced to
select the debug information format for compilers targeting the MSVC
ABI. See policy "CMP0141".
CMake 3.25 Release Notes
Changes made since CMake 3.24 include the following.
New Features
Presets
---
* The "cmake-presets(7)" schema version has been bumped to "6".
* The "cmake-presets(7)" format now supports a "packagePresets" field
to specify presets for "cpack --preset".
* The "cmake-presets(7)" format now supports a "workflowPresets" field
to specify presets for "cmake --workflow".
* The "cmake-presets(7)" format now supports an "outputJUnitFile" field
to specify JUnit output in test presets
Languages
-
* The "Compile Features" functionality is now aware of C++26, and
defines a "cxx_std_26" meta-feature. C++26 compiler modes may also
be specified via the "CXX_STANDARD", "CUDA_STANDARD",
"HIP_STANDARD", or "OBJCXX_STANDARD" target properties.
* "CUDA" language support now includes device link-time optimization
when using "nvcc". The "CMAKE_INTERPROCEDURAL_OPTIMIZATION"
variable and the associated "INTERPROCEDURAL_OPTIMIZATION" target
property will activate device LTO.
Command-Line
* A "cmake --workflow --preset" mode was added to drive sequences of
configure, build, test, and package operations through a single
command.
* The "cmake -E capabilities" command gained a new "tls" field that
tells whether or not TLS is enabled.
* The "cmake -E env" command-line tool gained a "--modify" flag to
support "ENVIRONMENT_MODIFICATION" operations.
* The "cmake --debug-trycompile" option now prints log messages
reporting the directory in which each try-compile check is done.
Compilers
-
* Support for the Tasking compiler toolsets (SmartCode, TriCore,
Standalone: ARM, MCS, 8051) was added with compiler id "Tasking".
See the "CMAKE_TASKING_TOOLSET" variable.
Commands
* 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
"/*/(cmake|CMake)/*/" 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
"R