CMake 3.21 Release Notes

Changes made since CMake 3.20 include the following.

New Features

Presets

Generators

Languages

Command-Line

Compilers

  • The Fujitsu compiler is now supported using compiler id Fujitsu in traditional (Trad) mode, and compiler id FujitsuClang in Clang mode.

Platforms

  • CMake now supports the MSYS runtime environment, much like CYGWIN.

File-Based API

  • The cmake-file-api(7) "codemodel" version 2 version field has been updated to 2.3.

  • The cmake-file-api(7) "codemodel" version 2 gained a new "directory" object containing directory-level information. This includes a list of installers generated by the install() command.

Commands

Variables

Properties

Modules

  • The FindBLAS and FindLAPACK modules learned to support the serial Fujitsu_SSL2 and parallel Fujitsu_SSL2BLAMP libraries.

  • The FindDevIL module now provides imported targets.

  • The FindIconv module now has version support.

  • The FindIntl module now has version support.

  • The FindMPI module learned to support Fujitsu and FujitsuClang in both host and cross compiling modes.

  • The FindMsys module was added to find MSYS installations. Like FindCygwin, it is used automatically by some other find modules to locate UNIX-style tools on Windows.

  • The FindOpenMP module learned to support Fujitsu and FujitsuClang.

  • The FindVulkan module gained imported targets Vulkan::Headers and Vulkan::glslangValidator.

  • The UseJava module command add_jar gained a RESOURCES option to allow explicit naming of resources with non-optional namespace.

  • The UseSWIG module use now standard library naming conventions for the CSharp language. See policy CMP0122.

  • The UseSWIG module now supports using the swig tool to generate implicit dependencies with the Xcode generator.

Generator Expressions

CTest

CPack

Deprecated and Removed Features

  • Undocumented CMAKE_SYSTEM_NAME version-stripping behavior has been removed entirely. If it is set by a -D flag or by a toolchain file, it is left unaltered, even if it still contains a version number. Similar CMAKE_HOST_SYSTEM_NAME version-stripping behavior, also undocumented, has been moved earlier, before project() or enable_language() is called.

  • ARMClang cpu/arch compile and link flags are no longer added automatically based on the CMAKE_SYSTEM_PROCESSOR variable or the undocumented CMAKE_SYSTEM_ARCH variable. They must be specified explicitly. See policy CMP0123.

Other Changes

Updates

Changes made since CMake 3.21.0 include the following.

3.21.1

  • The Visual Studio 17 2022 generator is now based on "Visual Studio 2022 Preview 2". Previously it was based on "Preview 1.1".

3.21.2

3.21.3

  • The Visual Studio 17 2022 generator is now based on "Visual Studio 2022 Preview 4". Previously it was based on "Preview 3.1".

  • The AMD ROCm Platform hipcc compiler was identified by CMake 3.21.0 through 3.21.2 as a distinct compiler with id ROCMClang. This has been removed because it caused regressions. Instead:

    • hipcc may no longer be used as a HIP compiler because it interferes with flags CMake needs to pass to Clang. Use Clang directly.

    • hipcc may once again be used as a CXX compiler, and is treated as whatever compiler it selects underneath, as CMake 3.20 and below did.

3.21.4

  • The Visual Studio 17 2022 generator is now based on the "Visual Studio 2022" release candidates. Previously it was based on preview versions.

3.21.5, 3.21.6, 3.21.7

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