# CMake 3.22.0-rc3 is ready for testing

**URL:** https://discourse.cmake.org/t/cmake-3-22-0-rc3-is-ready-for-testing/4474
**Category:** Announcements
**Created:** [November 12, 2021, 4:53pm UTC](https://discourse.cmake.org/t/cmake-3-22-0-rc3-is-ready-for-testing/4474 "2021-11-12T16:53:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Tom\_Osika](https://discourse.cmake.org/user_avatar/discourse.cmake.org/tom_osika/32/1101_2.png) [@Tom\_Osika](https://discourse.cmake.org/u/Tom_Osika)
#### Post date: [November 12, 2021, 4:53pm UTC](https://discourse.cmake.org/t/cmake-3-22-0-rc3-is-ready-for-testing/4474/1 "2021-11-12T16:53:08Z")

</div>

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

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

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

Some of the more significant changes in CMake 3.22 are:

- The “Compile Features” functionality now correctly disables or  
enables compiler extensions when no standard level is specified and  
avoids unnecessarily adding language standard flags if the requested  
settings match the compiler’s defaults. See “CMP0128”.

- The “cmake\_host\_system\_information()” command can now query OS  
identification variables from the “/etc/os-release” file.

- The “CMAKE\_BUILD\_TYPE” environment variable was added to provide a  
default value for the “CMAKE\_BUILD\_TYPE” variable.

- The “CMAKE\_REQUIRE\_FIND\_PACKAGE\_\<PackageName\>” variable was added to  
turn a non-REQUIRED “find\_package()” call into a REQUIRED one.

- The “FetchContent” module now passes through the “CMAKE\_TLS\_VERIFY”,  
“CMAKE\_TLS\_CAINFO”, “CMAKE\_NETRC” and “CMAKE\_NETRC\_FILE” variables  
(when defined) to the underlying “ExternalProject” sub-build.  
Previously, those variables were silently ignored by “FetchContent”.

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

# CMake 3.22 Release Notes

#### Changes made since CMake 3.21 include the following.

## New Features

### Commands

- The “cmake\_host\_system\_information()” command can now query OS  
identification variables from the “/etc/os-release” file.

- The “string(TIMESTAMP)” command now supports the “%V” specifier for  
ISO 8601 week numbers.

### Variables

- The “CMAKE\_BUILD\_TYPE” environment variable was added to provide a  
default value for the “CMAKE\_BUILD\_TYPE” variable.

- The “CMAKE\_CONFIGURATION\_TYPES” environment variable was added to  
provide a default value for the “CMAKE\_CONFIGURATION\_TYPES”  
variable.

- The “CMAKE\_INSTALL\_MODE” environment variable was added to tell  
“install()” rules (implemented by “file(INSTALL)”) to install  
symbolic links instead of copying of files.

- The “CMAKE\_\<LANG\>\_LINK\_WHAT\_YOU\_USE\_FLAG” and  
“CMAKE\_LINK\_WHAT\_YOU\_USE\_CHECK” variables were added to control the  
linker flag and check used by the “LINK\_WHAT\_YOU\_USE” target  
property.

- The “CMAKE\_REQUIRE\_FIND\_PACKAGE\_\<PackageName\>” variable was added to  
turn a non-REQUIRED “find\_package()” call into a REQUIRED one.

### Properties

- The “\<LANG\>\_EXTENSIONS” target property is now initialized to  
“CMAKE\_\<LANG\>\_EXTENSIONS\_DEFAULT”, detected from the compiler. See  
“CMP0128”.

- The “VS\_SETTINGS” source file property is now supported for all  
source file types. Previously it worked only for non-built sources.

### Modules

- The “CMakeDependentOption” module “cmake\_dependent\_option()” macro  
now supports full Condition Syntax. See policy “CMP0127”.

- The “FetchContent” module now passes through the “CMAKE\_TLS\_VERIFY”,  
“CMAKE\_TLS\_CAINFO”, “CMAKE\_NETRC” and “CMAKE\_NETRC\_FILE” variables  
(when defined) to the underlying “ExternalProject” sub-build.  
Previously, those variables were silently ignored by “FetchContent”.

- The “FindBLAS” and “FindLAPACK” modules gained a  
“BLA\_SIZEOF\_INTEGER” option to find a BLAS/LAPACK whose ABI uses a  
specific integer size.

- The “FindJasper” module now provides an imported target.

- The “FindMatlab” module now provides imported targets.

- The “FindPkgConfig” module gained a “PKG\_CONFIG\_ARGN” variable to  
specify arguments to “pkg-config” calls.

- The “GoogleTest” module “gtest\_discover\_tests()” function gained a  
“TEST\_FILTER” option to filter tests using “–gtest\_filter” during  
test discovery.

- The “UseSWIG” module, for Visual Studio Generators, can now use the  
“swig” tool to generate implicit dependencies.

### CTest

- “ctest(1)” learned to recognize labels attached to a test at run  
time. Previously it was only possible to attach labels to tests at  
configure time by using the “LABELS” test property. See Additional  
Test Measurements for more information.

- “ctest(1)” learned to be able to modify the environment for a test  
through the “ENVIRONMENT\_MODIFICATION” property. This is allows for  
updates to environment variables based on the environment present at  
test time.

- The “ctest\_memcheck()” command now also generates a  
“DynamicAnalysis-Test.xml” file which may be used to submit test  
results to CDash.

### CPack

- The “CPack DEB Generator” gained the option to set  
“CPACK\_DEBIAN\_COMPRESSION\_TYPE” to “zstd”, which enables Zstandard  
compression for deb packages.

- The “CPack NSIS Generator” gained a new  
“CPACK\_NSIS\_IGNORE\_LICENSE\_PAGE” variable to suppress the license  
page in the installer.

- The “CPack RPM Generator” gained the  
“CPACK\_RPM\_REQUIRES\_EXCLUDE\_FROM” option to avoid scanning specific  
paths for dependencies.

## Deprecated and Removed Features

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

## Other Changes

- The “Compile Features” functionality now correctly disables or  
enables compiler extensions when no standard level is specified and  
avoids unnecessarily adding language standard flags if the requested  
settings match the compiler’s defaults. See “CMP0128”.

- The “Compile Features” functionality now ignores features for  
languages that are not enabled.

- The Ninja Generators now implement the “edit\_cache” target using  
“ccmake(1)” if available.

- The “Ninja” and “NMake Makefiles” generators now use the MSVC  
“-external:I” flag for system includes. This became available as of  
VS 16.10 (toolchain version 14.29.30037).

- The “CPack NSIS Generator” now requires NSIS 3.03 or later.

* * *

Changes made since CMake 3.22.0-rc2:

Alex Turbov (1):

- Help: Add `versionadded` for `CPACK_RPM_REQUIRES_EXCLUDE_FROM` variable

Ben Boeckel (5):

- cmCTestRunTest: get the default value from the environment
- Tests/Environment: also test modifying ambient values
- FindHDF5: fix variable name when querying `hdf5_hl`’s implib
- FindHDF5: clear library output variables at the top of the module
- FindHDF5: clear language-specific libraries list before discovery

Brad King (21):

- MSVC: Refactor C compile features table for C90, C99, and C11
- MSVC: Tolerate c\_std\_17 and c\_std\_23 features on older compiler versions
- MSVC: Add support for C17
- Help: Fix versionadded for VS 15 2017 instance selection
- FindMPI: Fix finding PkgConfg for fallback
- Help: Use lower-case names of sphinx directives
- cmNinjaTargetGenerator: Replace “their” with “there” in comment
- Ninja: Fix creation of Windows import library directory
- GNUtoMS: Add search path for VS 2022 environment scripts
- cmScanDepFormat: Accept P1689r4 files with version 1
- cmGlobalVisualStudio8Generator: Refactor SetGeneratorPlatform
- Help: Clarify TARGET\_RUNTIME\_DLLS behavior on imported targets
- Ninja Multi-Config: Fix cross-config custom command dependency tracing
- Ninja Multi-Config: Fix internal cross-config target dependency ordering
- Ninja Multi-Config: Fix custom command target dependencies in cross-configs
- cmVisualStudio10TargetGenerator: Refactor target framework selection
- VS: Model a default target framework
- VS: Default TargetFrameworkVersion to v4.7.2 for VS 2022
- gitlab-ci: Re-organize Windows job tags
- gitlab-ci: Update Windows jobs to VS 2022
- CMake 3.22.0-rc3

Craig Scott (4):

- Help: Clarify how PKG\_CONFIG env var initializes cache vars
- Help: Clarify valid versus supported values for CUDA\_STANDARD
- Help: Correct inaccuracies in wording for CMP0128
- TI: Recognize invalid compiler option warning during try\_compile()

Cristian Adam (2):

- PCH: Fix REUSE\_FROM when Debug and RelWithDebInfo configs differ
- PCH: Fixed Ninja Multi-Config and REUSE\_FROM for MSVC

Marc Aldorasi (1):

- Help: Document that configure\_file can create directories

Raul Tambre (2):

- Help: Better explain CMAKE\_\<LANG\>\_EXTENSIONS\_DEFAULT
- CMP0128: Enable/disable extensions if standard same as default

Robert Maynard (1):

- NVHPC: Support SYSTEM include directories

Thomas Dickerson (1):

- CheckLinkerFlag: Set policies needed by the implementation

William R. Dieter (2):

- IntelLLVM: Use MSVC linker with MSVC frontend variant
- Fortran: Save frontend variant persistently for IntelLLVM

Yonggang Luo (1):

- Help: Use stronger wording in rule about preset inheritance
