CMake 3.29 Release Notes

Changes made since CMake 3.28 include the following.

New Features

Command-Line

  • cmake(1) -E cat can now print the standard input by passing the - argument.

Generators

File-Based API

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

  • The cmake-file-api(7) "codemodel" version 2 "target" object gained a new "launchers" field.

Compilers

  • The LLVM/Clang GNU-like frontend on Windows (clang++) may now be used to compile CUDA language sources.

  • Compilers targeting the GNU ABI on Windows (MinGW) may now be used to compile Objective C (OBJC) and Objective C++ (OBJCXX). These include GNU compilers (gcc and g++) and the LLVM/Clang GNU-like frontends (clang and clang++).

  • TI Clang-based compilers are now supported with compiler id TIClang.

Commands

  • The add_custom_command(TARGET) signature now supports adding build events through Alias Targets.

  • The cmake_language(EXIT) sub-command was added to terminate cmake -P scripts with a specified exit code.

  • The export(SETUP) sub-command was added to configure export sets. Its TARGET option's XCFRAMEWORK_LOCATION setting specifies the location of a .xcframework that can be substituted for an installed target.

  • The if() command gained new tests IS_READABLE, IS_WRITABLE and IS_EXECUTABLE to check file or directory permissions.

Variables

Properties

Modules

CTest

CPack

Other Changes

  • CMake learned to de-duplicate libraries on link lines based on linker capabilities. See policy CMP0156.

  • The add_test() command now honors CMAKE_CROSSCOMPILING_EMULATOR only when cross-compiling. See policy CMP0158.

  • On Windows, when targeting the MSVC ABI, the find_library() command now accepts .a file names after first considering .lib. This is symmetric with existing behavior when targeting the GNU ABI, in which the command accepts .lib file names after first considering .a.

  • On Windows, when targeting the MSVC ABI, the find_library() command now considers .dll.lib file names before .lib. This is the default suffix for DLL import libraries created by Rust toolchains for the MSVC ABI.

  • The Ninja and NMake Makefiles generators now use the -external:I flag for system includes when using IntelLLVM as of version 2021.4. The -external:W0 flag is also used as of version 2022.2.

  • The create_test_sourcelist() command now provides a full path to the generated driver source file.

  • The CPACK_PRODUCTBUILD_DOMAINS variable now defaults to true. See policy CMP0161.

Updates

Changes made since CMake 3.29.0 include the following.

3.29.1

3.29.2, 3.29.3, 3.29.4

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

3.29.5

  • The CPack WIX Generator's CPACK_WIX_INSTALL_SCOPE variable, new in 3.29, now defaults to NONE. This restores compatibility with behavior of 3.28 and below: without a custom WiX template, it produces installers that only create start menu and uninstall entries for the current user, even though they install for all users.

    In 3.29.0 through 3.29.4, CPACK_WIX_INSTALL_SCOPE defaulted to perMachine. This created MSI installers that create start menu and uninstall entries for all users by default. While this behavior is better on its own, these installers do not cleanly replace existing installations created with MSI installers produced by 3.28 and below. 3.29.5 reverts the default for compatibility. Projects may transition to perMachine on their own schedule by setting CPACK_WIX_INSTALL_SCOPE.

3.29.6

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