CMake 3.22 Release Notes

Changes made since CMake 3.21 include the following.

New Features

Commands

Variables

Properties

Modules

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

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.

Updates

Changes made since CMake 3.22.0 include the following.

3.22.1

  • This version made no changes to documented features or interfaces. Some implementation updates were made to support ecosystem changes and/or fix regressions.

3.22.2

  • The OLD behavior of CMP0128 was fixed to add flags even when the specified standard matches the compiler default.

3.22.3

  • The while() command again ignores errors in condition evaluation as CMake 3.21 and below did. This bug was fixed in 3.22.0, but exposed errors in existing projects. The fix has been reverted to restore compatibility. The fix may be restored in a future version of CMake via a policy.

3.22.4, 3.22.5, 3.22.6

  • These versions made no changes to documented features or interfaces. Some implementation updates were made to support ecosystem changes and/or fix regressions.