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

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

Variables

Properties

Modules

Generator Expressions

  • The LINK_LIBRARY generator expression was added to manage how libraries are specified during the link step. The CMAKE_<LANG>_LINK_LIBRARY_USING_<FEATURE> and CMAKE_LINK_LIBRARY_USING_<FEATURE> variables are used to define features usable by the LINK_LIBRARY generator expression. Moreover, the LINK_LIBRARY_OVERRIDE and LINK_LIBRARY_OVERRIDE_<LIBRARY> target properties are available to resolve incompatible features.

    The LINK_LIBRARY generator expression can link frameworks in various ways when targeting Apple platforms. The following features were added:

    • FRAMEWORK

    • NEEDED_FRAMEWORK

    • REEXPORT_FRAMEWORK

    • WEAK_FRAMEWORK

    The LINK_LIBRARY generator expression can link libraries in various ways when targeting Apple platforms. The following features were added:

    • NEEDED_LIBRARY

    • REEXPORT_LIBRARY

    • WEAK_LIBRARY

    The LINK_LIBRARY generator expression gained the feature WHOLE_ARCHIVE to force load of all members in a static library. This feature is supported on the following target platforms:

    • all Apple variants

    • Linux

    • all BSD variants

    • SunOS

    • Windows

    • CYGWIN

    • MSYS

  • The LINK_GROUP generator expression was added to manage the grouping of libraries during the link step. The CMAKE_<LANG>_LINK_GROUP_USING_<FEATURE> and CMAKE_LINK_GROUP_USING_<FEATURE> 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

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.

Deprecated and Removed Features

Other Changes

Updates

Changes made since CMake 3.24.0 include the following.

3.24.1, 3.24.2

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

3.24.3

  • The LLVMFlang Fortran compiler support added in 3.24.0 has been extended:

    • It now supports mixed-language linking between Fortran and C or CXX.

    • It now supports the GNU ABI (MinGW) on Windows, but not yet the MSVC ABI.

  • Some implementation updates were made to support ecosystem changes and/or fix regressions.

3.24.4

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