# CMake 3.29.0-rc2 is ready for testing

**URL:** https://discourse.cmake.org/t/cmake-3-29-0-rc2-is-ready-for-testing/10164
**Category:** Announcements
**Created:** [February 22, 2024, 11:09pm UTC](https://discourse.cmake.org/t/cmake-3-29-0-rc2-is-ready-for-testing/10164 "2024-02-22T23:09:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![johnwparent](https://discourse.cmake.org/user_avatar/discourse.cmake.org/johnwparent/32/2179_2.png) [@johnwparent](https://discourse.cmake.org/u/johnwparent)
#### Post date: [February 22, 2024, 11:09pm UTC](https://discourse.cmake.org/t/cmake-3-29-0-rc2-is-ready-for-testing/10164/1 "2024-02-22T23:09:25Z")

</div>

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

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

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

Release milestone is available at:  
[https://gitlab.kitware.com/cmake/cmake/-/milestones/136](https://gitlab.kitware.com/cmake/cmake/-/milestones/136)

Some of the more significant changes in CMake 3.29 are:

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

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

- 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 “PACKAGE\_DEPENDENCY” option configures how “find\_dependency()”  
calls are exported. Its “TARGET” option’s “XCFRAMEWORK\_LOCATION”  
setting specifies the location of a “.xcframework” that can be  
substituted for an installed target.

- “install(EXPORT)” and “export(EXPORT)” learned a new  
“EXPORT\_PACKAGE\_DEPENDENCIES” argument, which can be used to  
generate “find\_dependency()” calls based on what targets the  
exported targets depend on.

- The “CMAKE\_LINKER\_TYPE” variable and corresponding “LINKER\_TYPE”  
target property were added to specify what linker to use with some  
toolchains.

- A “CMAKE\_TEST\_LAUNCHER” variable and corresponding “TEST\_LAUNCHER”  
target property were added to specify a launcher to be used by  
executable targets when invoked by tests added by the “add\_test()”  
command.

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

- Visual Studio Generators now support selecting between the Intel  
oneAPI Fortran compiler (“ifx”) and the Intel classic Fortran  
compiler (“ifort”) using a “fortran=” field in  
“CMAKE\_GENERATOR\_TOOLSET”.

## 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 “PACKAGE\_DEPENDENCY” option configures how “find\_dependency()”  
calls are exported. 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.

- “install(EXPORT)” and “export(EXPORT)” learned a new  
“EXPORT\_PACKAGE\_DEPENDENCIES” argument, which can be used to  
generate “find\_dependency()” calls based on what targets the  
exported targets depend on.

## Variables

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

- The “CMAKE\_LINKER\_TYPE” variable and corresponding “LINKER\_TYPE”  
target property were added to specify what linker to use with some  
toolchains.

- The “CMAKE\_\<LANG\>\_COMPILER\_LINKER”,  
“CMAKE\_\<LANG\>\_COMPILER\_LINKER\_ID”,  
“CMAKE\_\<LANG\>\_COMPILER\_LINKER\_VERSION” and  
“CMAKE\_\<LANG\>\_COMPILER\_LINKER\_FRONTEND\_VARIANT” variables were added  
to describe the linker used by the language’s link step.

- The “CMAKE\_PROJECT\_INCLUDE”, “CMAKE\_PROJECT\_INCLUDE\_BEFORE”,  
“CMAKE\_PROJECT\_\<PROJECT-NAME\>\_INCLUDE”, and “CMAKE\_PROJECT\_\<PROJECT-  
NAME\>\_INCLUDE\_BEFORE” variables learned to support a semicolon-  
separated list of CMake language files to be included sequentially.  
These variables can also reference module names to be found in  
“CMAKE\_MODULE\_PATH” or builtin to CMake.

- The “CMAKE\_SKIP\_TEST\_ALL\_DEPENDENCY” variable was added to control  
whether the “test” (or “RUN\_TESTS”) buildsystem target depends on  
the “all” (or “ALL\_BUILD”) target.

- A “CMAKE\_TEST\_LAUNCHER” variable and corresponding “TEST\_LAUNCHER”  
target property were added to specify a launcher to be used by  
executable targets when invoked by tests added by the “add\_test()”  
command.

## Properties

- The “CROSSCOMPILING\_EMULATOR” target property now supports  
“generator expressions”.

- The “EXPORT\_FIND\_PACKAGE\_NAME” target property was added to allow  
targets to specify what package name to pass when exporting  
“find\_dependency()” calls. This property is initialized with a new  
“CMAKE\_EXPORT\_FIND\_PACKAGE\_NAME” variable.

- The “UNITY\_BUILD” target property now supports the Objective C  
(“OBJC”) and Objective C++ (“OBJCXX”) languages.

- The “XCODE\_EMBED\_XPC\_SERVICES” target property was added to tell the  
“Xcode” generator what targets to put in the “Embed XPC Resources”  
build phase.

## Modules

- The “CMakePackageConfigHelpers” module gained new  
“generate\_apple\_platform\_selection\_file()” and  
“generate\_apple\_architecture\_selection\_file()” functions, which can  
be used to generate a file that includes another Apple-platform-  
specific file or the includes an architecture-specific  
implementation of a package for an Apple platform, respectively.

- The “FindOpenGL” module learned to find a GLU include directory  
different than the GL include directory. A new  
“OPENGL\_INCLUDE\_DIRS” result variable provides all include  
directories.

## CTest

- “ctest(1)” gained a “–http-header” option to add custom headers on  
submission to CDash.

- “ctest(1)” gained the “–tests-from-file” and “–exclude-from-file”  
options to run or exclude tests named in a file.

- “ctest(1)” now supports job server integration on POSIX systems.

- The “ctest\_test()” command gained options “INCLUDE\_FROM\_FILE” and  
“EXCLUDE\_FROM\_FILE” to run or exclude tests named in a file.

## CPack

- The “CPack DEB Generator” “CPACK\_DEBIAN\_FILE\_NAME” variable may now  
be set without any suffix, and the “.deb” suffix will be added  
automatically.

- The “CPack RPM Generator” “CPACK\_RPM\_FILE\_NAME” variable may now be  
set without any suffix, and the “.rpm” suffix will be added  
automatically.

- The “CPack WIX Generator” gained a new variable,  
“CPACK\_WIX\_INSTALL\_SCOPE”, to control the “InstallScope” property of  
WiX MSI installers.

# 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”.

- “FetchContent\_MakeAvailable()” now sets the  
“CMAKE\_EXPORT\_FIND\_PACKAGE\_NAME” variable for CMake projects.

- 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”.

- The “CPack WIX Generator” now produces WiX MSI installers that  
create start menu and uninstall entries for all users by default, as  
documented by the “CPACK\_WIX\_INSTALL\_SCOPE” variable “perMachine”  
value. Previously, without a custom WiX template, it produced  
installers that would only create start menu and uninstall entries  
for the current user, even though they install for all users.

* * *

Changes made since CMake 3.29.0-rc1:

Ben Boeckel (21):

- cmDyndepCollation: collapse full path before looking up
- Tests/CXXModules: support testing rebuild conditions
- cxxmodules: return failure from the collator when private usage is found
- Tests/CXXModules: test that objects depend on their modmap files
- cxxmodules: depend on the modmap contents
- cmNinjaTargetGenerator: use `emplace_back` for scanning deps
- Tests/CXXModules: test that objects depend on dependent modules json files
- cmNinjaTargetGenerator: scanning depends on the module metadata
- Tests/CXXModules: add a test to ensure that `restat` works for collation
- Ninja: make the collator rule use `restat = 1`
- Tests/CXXModules: document `CMake_TEST_MODULE_COMPILATION` items
- Tests/CXXModules: support building a project with `Ninja`
- Tests/CXXModules: add a test importing from a `Ninja` install
- cmGeneratorTarget: store synthetic targets in its cache
- Tests/CXXModules: add a test with transitive targets
- cmTarget: copy link libraries from the right properties
- Tests/CXXModules: test transitive modules usage
- cmExportFileGenerator: export link libraries as-is
- cmGeneratorTarget: discover synthetic targets recursively
- Tests/CXXModules: test `cxx_std_20` coming from a dependency
- Clang: detect -resource-dir for clang-scan-deps

Brad King (12):

- Tests: Remove unnecessary RunCMake.cmake\_language expected result files
- cmake\_language: Fix EXIT inside control flow blocks
- librhash: aligned\_alloc is not available with glibc \< 2.15
- Tests/CommandLength: Refactor test commands to reduce test run time
- ci: update to WiX 3.14.0.8606 release
- VS: Verify toolset version= field format more strictly
- VS: Fix ‘-T version=14.40’ under VS 17.10 preview 1
- Tests: Fix BuildDepends on macOS arm64 without rosetta
- Help: Modernize BUILD\_SHARED\_LIBS documentation
- Tests: Update RunCMake.TargetObjects cmake\_minimum\_required version
- Restore support for TARGET\_OBJECTS in link interfaces with unity builds
- CMake 3.29.0-rc2

Craig Scott (1):

- Help: Advise calling option(BUILD\_SHARED\_LIBS) early enough

Johannes Schultz (1):

- Help: Fix example for return command

Robert Maynard (1):

- Help: Explicitly discourage absolute install destinations

Ruslan Baratov (1):

- IPO: Support duplicate object names in large archives
