# CMake 3.24.0-rc2 is ready for testing

**URL:** https://discourse.cmake.org/t/cmake-3-24-0-rc2-is-ready-for-testing/5921
**Category:** Announcements
**Created:** [June 23, 2022, 7:16pm UTC](https://discourse.cmake.org/t/cmake-3-24-0-rc2-is-ready-for-testing/5921 "2022-06-23T19:16:12Z")
**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: [June 23, 2022, 7:16pm UTC](https://discourse.cmake.org/t/cmake-3-24-0-rc2-is-ready-for-testing/5921/1 "2022-06-23T19:16:13Z")

</div>

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

Documentation is available at:  
[https://cmake.org/cmake/help/v3.24](https://cmake.org/cmake/help/v3.24)

Release notes appear below and are also published at  
[https://cmake.org/cmake/help/v3.24/release/3.24.html](https://cmake.org/cmake/help/v3.24/release/3.24.html)

Some of the more significant changes in CMake 3.24 are:

- The “FetchContent” module and the “find\_package()” command now  
support integration capabilities.

- The “LINK\_LIBRARY” generator expression was added to manage how  
libraries are specified during the link step.

- The Visual Studio Generators now support “SYSTEM” headers when using  
VS 2019 Update 11 or later.

- “cmake(1)” gained the “–fresh” command-line option to remove any  
existing “CMakeCache.txt” file and associated “CMakeFiles/”  
directory, when configuring a build tree, thus starting a new  
configuration as if the build tree were freshly created.

- The “CMAKE\_COMPILE\_WARNING\_AS\_ERROR” variable and corresponding  
“COMPILE\_WARNING\_AS\_ERROR” target property were added to enable  
compilation with a compiler-specific flag to treat warnings as  
errors, such as “-Werror”.

- The “find\_file()”, “find\_path()”, “find\_library()”,  
“find\_program()”, and “find\_package()” commands gained the  
“NO\_CMAKE\_INSTALL\_PREFIX” option to control searching  
“CMAKE\_INSTALL\_PREFIX”.

- The “find\_file()”, “find\_path()”, “find\_library()”,  
“find\_program()”, and “find\_package()” commands gained the ability  
to specify which Windows Registry views must be queried.

CMake 3.24 Release Notes

* * *

Changes made since CMake 3.23 include the following.

# New Features

## Presets

- “cmake-presets(7)” files now support schema version “5”.

- “cmake-presets(7)” files now support a “${pathListSep}” macro, which  
expands to “:” or “;” based on the platform.

- “cmake-presets(7)” files gained support for specifying a  
“testOutputTruncation” field in test presets, which specifies the  
truncation mode once the maximum test output size has been reached.

## Generators

- The “Green Hills MULTI” generator now generates build rules to re-  
run CMake if any CMake files are updated.

- The Visual Studio Generators now support “SYSTEM” headers when using  
VS 2019 Update 11 or later.

## Command-Line

- “cmake(1)” gained the “–fresh” command-line option to remove any  
existing “CMakeCache.txt” file and associated “CMakeFiles/”  
directory, when configuring a build tree, thus starting a new  
configuration as if the build tree were freshly created.

- “cmake(1)” gained the “–compile-no-warning-as-error” command-line  
option which causes the effects of the “COMPILE\_WARNING\_AS\_ERROR”  
target property and “CMAKE\_COMPILE\_WARNING\_AS\_ERROR” variable to be  
ignored.

- The “cmake(1)” “–trace=json-v1” trace format gained fields  
“global\_frame” and “line\_end”.

- The “cmake(1)” “-E” commands “cat” and “env” learned to respect a  
double dash (“–”) argument that acts as a delimiter indicating the  
end of options. Any following arguments are treated as  
operands/positional arguments, even if they begin with a dash “-”  
character.

- The “cmake(1)” “-E tar” command gained the “–touch” option to keep  
the current local timestamp instead of extracting file timestamps  
from the archive.

## Compilers

- LLVM’s flang Fortran compiler is now supported on some platforms,  
with compiler id “LLVMFlang”.

- ADSP compiler support (SHARC and Blackfin) now covers both CCES and  
VDSP++ installations, with required configuration now done in the  
compiler module itself rather than the “Generic-ADSP” platform  
module.

## Platforms

- A dedicated “ADSP” platform has been added to replace the existing  
“Generic-ADSP” implementation. This features automatic detection of  
the latest CCES/VDSP++ install and compiler selection (“cc21k” vs.  
“ccblkfn”) based off of the “CMAKE\_SYSTEM\_PROCESSOR” variable.

## Commands

- The “cmake\_host\_system\_information()” command, on Windows, gained a  
“QUERY WINDOWS\_REGISTRY” mode. See its Query Windows registry  
section.

- The “cmake\_language()” command gained a new  
“SET\_DEPENDENCY\_PROVIDER” sub-command. When a dependency provider  
is set, calls to “find\_package()” and “FetchContent\_MakeAvailable()”  
can be redirected through a custom command, which can choose to  
fulfill the request directly, modify how the request is processed,  
or leave it to be fulfilled by the built-in implementation. See  
Dependency Providers.

- The “file(DOWNLOAD)” command gained options “RANGE\_START” and  
“RANGE\_END” to specify a range of bytes to download. This can be  
useful for downloading parts of big binary files.

- The “find\_file()”, “find\_path()”, “find\_library()”,  
“find\_program()”, and “find\_package()” commands gained the  
“NO\_CMAKE\_INSTALL\_PREFIX” option to control searching  
“CMAKE\_INSTALL\_PREFIX”.

- The “find\_file()”, “find\_path()”, “find\_library()”,  
“find\_program()”, and “find\_package()” commands gained the ability  
to specify which Windows Registry views must be queried.

- The “find\_package()” command gained a “GLOBAL” option that allows  
for the promotion of imported targets to global scope for the  
duration of the “find\_package()” call.

- The “if()” command gained the capability to compare paths by using  
the “PATH\_EQUAL” operator. See policy “CMP0139”.

## Variables

- The “CMAKE\_COLOR\_DIAGNOSTICS” variable was added to control color  
diagnostics generated by compilers. This variable also controls  
color build system messages with Makefile Generators, replacing  
“CMAKE\_COLOR\_MAKEFILE”.

- The “CMAKE\_COMPILE\_WARNING\_AS\_ERROR” variable and corresponding  
“COMPILE\_WARNING\_AS\_ERROR” target property were added to enable  
compilation with a compiler-specific flag to treat warnings as  
errors, such as “-Werror”.

- The “CMAKE\_CUDA\_ARCHITECTURES” variable and associated  
“CUDA\_ARCHITECTURES” target property now support the special  
“native” value to compile for the architectures(s) of the host’s  
GPU(s).

- The “CMAKE\_FIND\_PACKAGE\_TARGETS\_GLOBAL” variable was added to toggle  
behavior of the “find\_package()” command’s new “GLOBAL” option.

- The “CMAKE\_FIND\_USE\_INSTALL\_PREFIX” variable was added to toggle  
behavior of the “find\_file()”, “find\_library()”, “find\_path()”,  
“find\_package()”, and “find\_program()” commands’ new  
“NO\_CMAKE\_INSTALL\_PREFIX” option.

- The “CMAKE\_PROJECT\_TOP\_LEVEL\_INCLUDES” variable was added to allow  
injecting custom code at the site of the first “project()” call,  
after the host and target platform details have been determined.

- The “CMAKE\_TRY\_COMPILE\_NO\_PLATFORM\_VARIABLES” variable was added to  
tell the “try\_compile()” command not to pass any platform variables  
to the test project.

- The “CMAKE\_VERIFY\_INTERFACE\_HEADER\_SETS” variable and corresponding  
“VERIFY\_INTERFACE\_HEADER\_SETS” target property were added to enable  
build rules that verify all headers in header sets can be used on  
their own.

- The “CMAKE\_VS\_NO\_COMPILE\_BATCHING” variable and corresponding  
“VS\_NO\_COMPILE\_BATCHING” target property were added to tell Visual  
Studio Generators whether to disable compiler parallelism and call  
the compiler with one source file at a time.

- The “CMAKE\_WATCOM\_RUNTIME\_LIBRARY” variable and  
“WATCOM\_RUNTIME\_LIBRARY” target property were introduced to select  
the runtime library used by compilers targeting the Watcom ABI. See  
policy “CMP0136”.

- The “CMAKE\_XCODE\_XCCONFIG” variable and corresponding  
“XCODE\_XCCONFIG” target property were added to tell the “Xcode”  
generator to handle “xcconfig” files.

## Properties

- The “INTERFACE\_LINK\_LIBRARIES\_DIRECT” and  
“INTERFACE\_LINK\_LIBRARIES\_DIRECT\_EXCLUDE” target properties were  
added to express usage requirements affecting a consumer’s direct  
link dependencies.

- The “INTERFACE\_HEADER\_SETS\_TO\_VERIFY” target property was added to  
specify which header sets should be verified by  
“VERIFY\_INTERFACE\_HEADER\_SETS”.

- The “LINK\_LIBRARIES” target property now supports the  
“$\<LINK\_ONLY:…\>” generator expression. See policy “CMP0131”.

- The “VS\_DOTNET\_STARTUP\_OBJECT” target property was added to tell  
Visual Studio Generators which startup class shall be used when the  
program or project is executed. This is necessary when more than one  
“static void Main(string)” function signature is available in a  
managed .NET project.

## Modules

- The “ExternalProject” module “ExternalProject\_Add()” command gained  
a new “DOWNLOAD\_EXTRACT\_TIMESTAMP” option for controlling whether  
the timestamps of extracted contents are set to match those in the  
archive when the “URL” download method is used. Policy “CMP0135” was  
added to enable the option by default.

- The “FetchContent” module and the “find\_package()” command now  
support integration capabilities:

- The “FindJNI” module now provides imported targets.

- The “FindMatlab” module “matlab\_add\_mex()” function gained a  
“NO\_IMPLICIT\_LINK\_TO\_MATLAB\_LIBRARIES” option to disable automatic  
linking of MATLAB libraries.

- The “FindZLIB” gained a new “ZLIB\_USE\_STATIC\_LIBS” variable to  
search only for static libraries.

## Generator Expressions

- The “LINK\_LIBRARY” generator expression was added to manage how  
libraries are specified during the link step. The  
“CMAKE\__LINK\_LIBRARY\_USING_” and  
“CMAKE\_LINK\_LIBRARY\_USING\_” variables are used to define  
features usable by the “LINK\_LIBRARY” generator expression.  
Moreover, the “LINK\_LIBRARY\_OVERRIDE” and  
“LINK\_LIBRARY\_OVERRIDE\_” target properties are available to  
resolve incompatible features.

- The “LINK\_GROUP” generator expression was added to manage the  
grouping of libraries during the link step. The  
“CMAKE\__LINK\_GROUP\_USING_” and  
“CMAKE\_LINK\_GROUP\_USING\_” variables are used to define  
features usable with the “LINK\_GROUP” generator expression. This  
release defines the “RESCAN” feature, which can be used to handle  
circular references among static libraries when using toolchains for  
Linux, BSD, SunOS and GNU toolchains for Windows.

- The “PATH” generator expression was added to manage paths.

- The “PATH\_EQUAL” generator expression was added to manage path  
comparisons.

- The “TARGET\_BUNDLE\_DIR\_NAME” generator expression was added to  
evaluate to the name of the bundle directory for a given bundle  
target.

## CTest

- “ctest(1)” gained a “–test-output-truncation” option (and  
corresponding “CTEST\_CUSTOM\_TEST\_OUTPUT\_TRUNCATION” variable) to  
specify the truncation mode once the maximum test output size has  
been reached. Possible values are “tail” (default), “middle” or  
“head”.

## CPack

- The “CPack WIX Generator” gained a new variable,  
“CPACK\_WIX\_ARCHITECTURE”, to specify the installer architecture in  
order to support computers running Windows for ARM.

- CPack now supports the “CPACK\_THREADS” option for “zstd” compression  
when compiled with libarchive 3.6 or higher. It is supported by  
official CMake binaries available on [cmake.org](http://cmake.org).

# Deprecated and Removed Features

- The “CPack” module no longer enables the SLA by default in the  
“CPack DragNDrop Generator”. See policy “CMP0133” and the  
“CPACK\_DMG\_SLA\_USE\_RESOURCE\_FILE\_LICENSE” variable.

- The deprecated “CPack PackageMaker Generator” has been removed.

- The “FindGLUT” module no longer provides the undocumented  
“GLUT\_LIBRARY” and “GLUT\_INCLUDE\_PATH” result variables.

# Other Changes

- CMake no longer sets environment variables like “CC”, “CXX”, etc.  
when enabling the corresponding language during the first CMake run  
in a build directory. See policy “CMP0132”.

- The “CheckIPOSupported” module “check\_ipo\_supported()” command now  
uses the caller’s “CMAKE\__FLAGS" and  
"CMAKE__FLAGS_” values. See policy “CMP0138”.

- The “MSYS Makefiles” and “MinGW Makefiles” generators, when a  
compiler is not explicitly specified, now select the first compiler  
(of any name) found in directories listed by the “PATH” environment  
variable.

- The “try\_compile()” command whole-project signature now propagates  
platform variables. See policy “CMP0137”.

- The “while()” command now diagnoses errors during condition  
evaluation. See policy “CMP0130”.

- The precompiled macOS binaries provided on [cmake.org](http://cmake.org) no longer  
attach a SLA to the “.dmg” packages. This was removed because macOS  
12 deprecated the tools used to attach “.dmg” resources.

- A precompiled Windows “arm64” binary is now provided on [cmake.org](http://cmake.org).

* * *

Changes made since CMake 3.24.0-rc1:

Brad King (9):

- gitlab-ci: Add jobs to package and upload Windows arm64 nightly binaries
- ci: Rebuild Qt 6.3.0 windows-arm64 dependency with LLVM/Clang
- ci: Add OpenAL to Debian and Fedora base images
- ExternalProject: Fix regression in stamp creation for Xcode+iOS
- FindPkgConfig: Revert "Populate \_STATIC\_LINK\_LIBRARIES. Add
- STATIC\_TARGET."
- Help: Add release note for windows-arm64 binary
- Help: Improve formatting in VS\_NO\_COMPILE\_BATCHING docs
- VS: Add variable to to turn off Visual Studio compile batching
- CMake 3.24.0-rc2

Cristian Adam (1):

- Utilities/Release: Simplify script to build Qt 6.3.0 Windows binaries

Gregor Jasny (2):

- cm\_cxx\_features: filter out warnings from Xcode 14
- Xcode: automatically create Info.plist for signing during compiler id

Linus Dierheimer (1):

- IPO: Use -flto=auto if compiler is GCC \>= 10.1

Markus Mützel (1):

- FindMPI: Parse ‘-l:’ flags in pkg-config output

Tommy Vercetti (1):

- VS: Prefer ARM64 MSBuild on Windows ARM64 host

pigeon (1):

- FetchContent: Fix example code in documentation
