# CMake 3.25.0-rc3 is ready for testing

**URL:** https://discourse.cmake.org/t/cmake-3-25-0-rc3-is-ready-for-testing/6771
**Category:** Announcements
**Created:** [November 1, 2022, 8:53pm UTC](https://discourse.cmake.org/t/cmake-3-25-0-rc3-is-ready-for-testing/6771 "2022-11-01T20:53:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![johnwparent](https://discourse.cmake.org/user_avatar/discourse.cmake.org/johnwparent/32/2179_2.png) [@johnwparent](https://discourse.cmake.org/u/johnwparent)
#### Post date: [November 1, 2022, 8:53pm UTC](https://discourse.cmake.org/t/cmake-3-25-0-rc3-is-ready-for-testing/6771/1 "2022-11-01T20:53:29Z")

</div>

I am proud to announce the third CMake 3.25 release candidate.  
[https://cmake.org/download/](https://cmake.org/download/)

Documentation is available at:  
[https://cmake.org/cmake/help/v3.25](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](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  
“RUN\_OUTPUT\_STDERR\_VARIABLE” options to capture stdout and stderr  
separately from the output of the compiled program.

## Variables

- 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”.

- The “CMAKE\_XCODE\_SCHEME\_ENABLE\_GPU\_API\_VALIDATION” variable and  
corresponding “XCODE\_SCHEME\_ENABLE\_GPU\_API\_VALIDATION” target  
property were added to tell the “Xcode” generator what to put in the  
scheme’s “Metal: API Validation” setting.

- The “CMAKE\_XCODE\_SCHEME\_ENABLE\_GPU\_SHADER\_VALIDATION” variable and  
corresponding “XCODE\_SCHEME\_ENABLE\_GPU\_SHADER\_VALIDATION” target  
property were added to tell the “Xcode” generator what to put in the  
scheme’s “Metal: Shader Validation” setting.

- The “CMAKE\_XCODE\_SCHEME\_LAUNCH\_MODE” variable and corresponding  
“XCODE\_SCHEME\_LAUNCH\_MODE” target property were added to tell the  
“Xcode” generator what to put in the scheme’s “Launch” mode setting.

- The “CMAKE\_XCODE\_SCHEME\_LAUNCH\_CONFIGURATION” variable and  
corresponding “XCODE\_SCHEME\_LAUNCH\_CONFIGURATION” target property  
were added to tell the “Xcode” generator what configuration to put  
in the scheme’s Launch action.

## Properties

- The “\_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 an 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.

## Modules

- 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:

- 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:

## CPack

- The “CPack Archive Generator” gained a new  
“CPACK\_ARCHIVE\_FILE\_EXTENSION” variable to control the package file  
name extension.

- The “CPack NSIS Generator” gained two new variables  
“CPACK\_NSIS\_EXECUTABLE\_PRE\_ARGUMENTS” and  
“CPACK\_NSIS\_EXECUTABLE\_POST\_ARGUMENTS” to provide arguments to the  
nsis executable invocation.

- The “CPack” module gained the “CPACK\_READELF\_EXECUTABLE”,  
“CPACK\_OBJCOPY\_EXECUTABLE”, and “CPACK\_OBJDUMP\_EXECUTABLE” variables  
to control the locations of binutils used by “cpack(1)”.

# Deprecated and Removed Features

- The “IMPORTED\_NO\_SYSTEM” target property has been deprecated in  
favor of “SYSTEM” and “EXPORT\_NO\_SYSTEM”.

- The “Visual Studio 10 2010” generator has been removed.

- The “Visual Studio 11 2012” generator is now deprecated and will be  
removed in a future version of CMake.

# 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 “\_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”.

* * *

Changes made since CMake 3.25.0-rc2:

Alex Turbov (3):

- Help: Reformat find\_package search paths as Sphinx tables
- Help: Mention CMake version for a recently-added `find_package` search path
- Help: Add more CLI `:option:` references to various pages

Anthony Roberts (1):

- Tests: Fix RunCMake.VsDotnetSdk with VS \>= 17.3 on ARM64

Aurelien Regat-Barrel (1):

- file(DOWNLOAD): Fix LOG with EXPECTED\_HASH on download failure

Brad King (21):

- Tests: Explicitly allow usage of git file-based protocol in test cases
- cm/filesystem: Fix crash with pre-C++11 std::string GNU ABI in C++17
- Tests: Avoid running C++11 test on GNU \< 4.7
- Xcode: Evaluate Swift compile definitions separately
- VS: Fix crash finding vswhere on 32-bit Windows
- Ninja: Restore support for non-ascii paths on Windows with ninja\<=1.10
- Tests: Add case for ninja with non-ascii chars
- Xcode: Revert “Don’t set INSTALL\_PATH unless target is SHARED\_LIBRARY”
- FindGLUT: Fix regression when pkg-config is not available
- Xcode: Put object files in a place that Xcode cleans
- cmGeneratedFileStream: Add support for a temporary alternate encoding
- cm\_codecvt: Add support for the Windows console output code page
- Ninja: Match showIncludes dependencies using console output code page
- cmGeneratedFileStream: Drop unused WriteRaw method
- cmLocalGenerator: Factor out helper to compute MSVC\_DEBUG\_INFORMATION\_FORMAT
- cmLocalGenerator: Clarify name of local PDB type variable
- Tests: Drop redundant project init from RunCMake.PrecompileHeaders cases
- CMP0141: Fix PCH REUSE\_FROM under policy NEW behavior
- curl: Update script to get curl 7.86.0
- curl: Set build options the way we need for CMake
- CMake 3.25.0-rc3

Craig Scott (4):

- Help: Fix trivial typos related to presets
- Help: Use array consistently in presets manual
- Help: State default preset strategy for architecture and toolset
- Help: Minor formatting and cross-ref cleanup for \_POSTFIX

Curl Upstream (1):

- curl 2022-10-26 (cd95ee9f)

Kyle Edwards (6):

- cmake: Support --list-presets=workflow
- CPack: Require no argument for --trace and --trace-expand
- cmake --workflow: print usage message
- cmake --workflow: print usage and exit on unrecognized argument
- cmake::Workflow: Refactor to use enum class argument
- cmake --workflow: add --fresh option

Letu Ren (1):

- Linux: Avoid finding libraries using lib64 on ArchLinux

Markus Ferrell (1):

- Tutorial: Restore USE\_MYMATH in place of MY\_MATH

Michael Hirsch (1):

- Help: cmake(1), ctest(1), versionadded for key flags

Mis, Piotr (1):

- VS: Fix MSBuild property for nostdlib flag

Mojca Miklavec (1):

- CPack/NSIS: Document BOM mark for UTF-8 encoded LICENSE file

Robert Maynard (1):

- FindCUDAToolkit: Add nvptxcompiler\_static dependency on Threads::Threads

Sebastian Maisch (1):

- VS: Fix paths in multi-target SDK-style projects

Werner, Joerg (1):

- cmGlobalVisualStudioGenerator: Fix compiling as C++20 in VS 2022

مهدي شينون (Mehdi Chinoune) (1):

- LLVMFlang: Add a required line to define linking rules on Windows
