# CMake 3.28.0-rc1 is ready for testing

**URL:** https://discourse.cmake.org/t/cmake-3-28-0-rc1-is-ready-for-testing/9181
**Category:** Announcements
**Created:** [October 11, 2023, 9:38pm UTC](https://discourse.cmake.org/t/cmake-3-28-0-rc1-is-ready-for-testing/9181 "2023-10-11T21:38:49Z")
**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: [October 11, 2023, 9:38pm UTC](https://discourse.cmake.org/t/cmake-3-28-0-rc1-is-ready-for-testing/9181/1 "2023-10-11T21:38:49Z")

</div>

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

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

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

Some of the more significant changes in CMake 3.28 are:

- C++ 20 named modules are now supported by Ninja Generators and  
Visual Studio Generators for VS 2022 and newer, in combination with  
the MSVC 14.34 toolset (provided with VS 17.4) and newer, LLVM/Clang  
16.0 and newer, and GCC 14 (after the 2023-09-20 daily bump) and  
newer. See “cmake-cxxmodules(7)” for details.

- “HIP” language code may now be compiled for NVIDIA GPUs using the  
NVIDIA CUDA Compiler (NVCC). See the “CMAKE\_HIP\_PLATFORM” variable.

- On Apple platforms, “.xcframework” folders are now supported.

- The “exec\_program()” command, which has been deprecated since CMake  
3.0, has been removed by policy “CMP0153”. Use the  
“execute\_process()” command instead.

- Generated files, in targets using File Sets, are now considered  
private by default. Generated public headers must be specified  
using file sets. This allows Ninja Generators to produce more  
efficient build graphs. See policy “CMP0154”.

- The “find\_library()”, “find\_path()”, and “find\_file()” commands no  
longer search in installation prefixes derived from the “PATH”  
environment variable. This behavior was added in CMake 3.3 to  
support MSYS and MinGW (“MSYSTEM”) development environments on  
Windows, but it can search undesired prefixes that happen to be in  
the “PATH” for unrelated reasons. Users who keep some  
“/bin” directories in the “PATH” just for their tools do not  
necessarily want any corresponding “/lib” or  
“/include” directories searched. The behavior was reverted  
for non-Windows platforms by CMake 3.6. Now it has been reverted on  
Windows platforms too.

CMake 3.28 Release Notes

* * *

Changes made since CMake 3.27 include the following.

# New Features

## Languages

- C++ 20 named modules are now supported by Ninja Generators and  
Visual Studio Generators for VS 2022 and newer, in combination with  
the MSVC 14.34 toolset (provided with VS 17.4) and newer, LLVM/Clang  
16.0 and newer, and GCC 14 (after the 2023-09-20 daily bump) and  
newer. See “cmake-cxxmodules(7)” for details.

- “HIP” language code may now be compiled for NVIDIA GPUs using the  
NVIDIA CUDA Compiler (NVCC). See the “CMAKE\_HIP\_PLATFORM” variable.

## Platforms

- On Apple platforms, “.xcframework” folders are now supported:

- Apple visionOS and its “xros” and “xrsimulator” SDKs are now  
supported. Compiling for Apple visionOS can be requested by setting  
“CMAKE\_SYSTEM\_NAME” to “visionOS”. See Cross Compiling for iOS,  
tvOS, visionOS, or watchOS for more information.

## Presets

- “cmake-presets(7)” files now support schema version “8”. It adds  
support for a “$schema” field.

## Compilers

- Cray Clang-based compilers are now supported with “compiler id”  
“CrayClang”.

- The OrangeC compiler is now supported with “compiler id” “OrangeC”.

## Commands

- The “add\_custom\_command()” and “add\_custom\_target()” commands gained  
a “JOB\_SERVER\_AWARE” option.

- The “cmake\_host\_system\_information()” command gained a  
“MSYSTEM\_PREFIX” query for the installation prefix of a MSYS or  
MinGW development environment on Windows hosts.

- The “set\_property()” command “TEST” mode gained a “DIRECTORY” option  
to set properties on tests in other directories.

- The “set\_tests\_properties()” command gained a “DIRECTORY” option to  
set properties on tests in other directories.

- The “get\_property()” command “TEST” mode gained a “DIRECTORY” option  
to get properties on tests in other directories.

- The “get\_test\_property()” command gained a “DIRECTORY” option to get  
properties on tests in other directories.

## Variables

- The “CMAKE\_CROSSCOMPILING\_EMULATOR” environment variable was added  
to initialize the “CMAKE\_CROSSCOMPILING\_EMULATOR” cache variable.

- The “CMAKE\_HIP\_PLATFORM” variable was added to specify the GPU  
platform for which HIP language sources are to be compiled (“amd” or  
“nvidia”).

## Properties

- On imported shared libraries, the “IMPORTED\_IMPLIB” target property  
may now be used without “IMPORTED\_LOCATION”. This can be used to  
represent a stub library whose location should not be added as a  
runtime search path to dependents that link it.

- The “IMPORTED\_LOCATION” property of a macOS framework may now be a  
path to the “.framework” folder itself.

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

## Modules

- The “ExternalProject” module now includes the  
“BUILD\_JOB\_SERVER\_AWARE” option for the “ExternalProject\_Add()”  
command. This option enables the integration of the GNU Make job  
server when using an explicit “BUILD\_COMMAND” with certain Makefile  
Generators. Additionally, the “ExternalProject\_Add\_Step()” command  
has been updated to support the new “JOB\_SERVER\_AWARE” option.

- The “ExternalProject” module now declares “BYPRODUCTS” for the  
downloaded file for generated “download” steps. Previously, if  
multiple external projects downloaded to the same file, hash  
verification could fail. Now, when using the Ninja Generators, this  
scenario is detected and Ninja will raise an error stating that  
multiple rules generate the same file.

- The “FetchContent” module’s “FetchContent\_Declare()” command gained  
an “EXCLUDE\_FROM\_ALL” option, which propagates through to the  
“add\_subdirectory()” call made by “FetchContent\_MakeAvailable()” for  
the dependency.

- The “FindCURL” module gained a “CURL\_USE\_STATIC\_LIBS” hint to select  
static libraries.

- The “FindEXPAT” module gained an “EXPAT\_USE\_STATIC\_LIBS” hint to  
select static libraries.

- The “FindPkgConfig” module “pkg\_get\_variable()” command gained a  
“DEFINE\_VARIABLES” option to pass variables to “pkg-config”.

## Generator Expressions

- The “generator expressions” `$<IF:...>`, `$<AND:...>`, and  
`$<OR:...>` short-circuit to avoid unnecessary evaluation of  
parameters.

## CTest

- CTest may now take a dynamically-generated resource spec file, which  
can be specified by the “GENERATED\_RESOURCE\_SPEC\_FILE” test  
property.

# Deprecated and Removed Features

- The “exec\_program()” command, which has been deprecated since CMake  
3.0, has been removed by policy “CMP0153”. Use the  
“execute\_process()” command instead.

- The “Visual Studio 11 2012” generator has been removed.

- The “Visual Studio 12 2013” generator is now deprecated and will be  
removed in a future version of CMake.

- The “IOS\_INSTALL\_COMBINED” target property and corresponding  
“CMAKE\_IOS\_INSTALL\_COMBINED” variable have been deprecated. Their  
functionality does not make sense on Apple Silicon hosts.

- The “Xcode” generator will now issue a fatal error if the Legacy  
Build System has been selected for Xcode 14 and newer. Those Xcode  
versions dropped support for the Legacy Build System and expect the  
project to be set-up for their current Build System.

# Other Changes

- Generated files, in targets using File Sets, are now considered  
private by default. Generated public headers must be specified  
using file sets. This allows Ninja Generators to produce more  
efficient build graphs. See policy “CMP0154”.

- The “find\_library()”, “find\_path()”, and “find\_file()” commands no  
longer search in installation prefixes derived from the “PATH”  
environment variable. This behavior was added in CMake 3.3 to  
support MSYS and MinGW (“MSYSTEM”) development environments on  
Windows, but it can search undesired prefixes that happen to be in  
the “PATH” for unrelated reasons. Users who keep some  
“/bin” directories in the “PATH” just for their tools do not  
necessarily want any corresponding “/lib” or  
“/include” directories searched. The behavior was reverted  
for non-Windows platforms by CMake 3.6. Now it has been reverted on  
Windows platforms too.

- When using MinGW tools in a “MSYSTEM” environment on Windows, the  
“$MSYSTEM\_PREFIX/local” and “$MSYSTEM\_PREFIX” prefixes are now added  
to “CMAKE\_SYSTEM\_PREFIX\_PATH”.

- The precompiled Linux “x86\_64” binaries provided on [cmake.org](http://cmake.org) now  
require GLIBC 2.17 or higher.
