# CMake 3.19.0-rc2 is ready for testing

**URL:** https://discourse.cmake.org/t/cmake-3-19-0-rc2-is-ready-for-testing/2084
**Category:** Announcements
**Created:** [October 28, 2020, 5:15pm UTC](https://discourse.cmake.org/t/cmake-3-19-0-rc2-is-ready-for-testing/2084 "2020-10-28T17:15:36Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![robert.maynard](https://discourse.cmake.org/user_avatar/discourse.cmake.org/robert.maynard/32/4_2.png) [@robert.maynard](https://discourse.cmake.org/u/robert.maynard)
#### Post date: [October 28, 2020, 5:15pm UTC](https://discourse.cmake.org/t/cmake-3-19-0-rc2-is-ready-for-testing/2084/1 "2020-10-28T17:15:36Z")

</div>

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

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

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

Some of the more significant changes in CMake 3.19 are:

- “cmake(1)” and “cmake-gui(1)” now recognize “CMakePresets.json” and  
“CMakeUserPresets.json” files (see “cmake-presets(7)”).

- The “Xcode” generator now uses the Xcode “new build system” when  
generating for Xcode 12.0 or higher. See the  
“CMAKE\_XCODE\_BUILD\_SYSTEM” variable. One may use “-T buildsystem=1”  
to switch to the legacy build system.

- The Visual Studio Generators for VS 2015 and above gained support  
for the Visual Studio Tools for Android. One may now set  
“CMAKE\_SYSTEM\_NAME” to “Android” to generate “.vcxproj” files for  
the Android tools.

- CMake learned to support “ISPC” as a first-class language that can  
be enabled via the “project()” and “enable\_language()” commands.  
“ISPC” is currently supported by the Makefile Generators and the  
“Ninja” generator on Linux, macOS, and Windows using the Intel ISPC  
compiler.

- “CUDA” language support for Clang now supports separable compilation  
(“CUDA\_SEPARABLE\_COMPILATION”)

- The “CMake GUI” now has an environment variable editor.

- The “cmake\_path()” command was added for operations on filesystem  
paths.

- The “file(GENERATE)” command gained a new “TARGET” keyword to  
support resolving target-dependent generator expressions.

- The “CMAKE\_OPTIMIZE\_DEPENDENCIES” variable was added to initialize  
the new “OPTIMIZE\_DEPENDENCIES” target property and avoid  
unnecessarily building dependencies for a static library.

- The “CheckCompilerFlag” module has been added to generalize  
“CheckCCompilerFlag” and “CheckCXXCompilerFlag” to more languages.  
It also supports the “CUDA” and “ISPC” languages.

- The “CheckSourceCompiles” module has been added to generalize  
“CheckCSourceCompiles” and “CheckCXXSourceCompiles” to more  
languages. It also supports the “CUDA” and “ISPC” languages.

- The “CheckSourceRuns” module has been added to generalize  
“CheckCSourceRuns” and “CheckCXXSourceRuns” to more languages. It  
also supports the “CUDA” language.

- The “FindCUDAToolkit” module gained support for finding CUDA  
toolkits that do not contain “nvcc”, as well as for finding  
scattered toolkit installations when cross-compiling.

- Interface Libraries may now have source files added via  
“add\_library()” or “target\_sources()”. Those with sources will be  
generated as part of the build system.

- Compatibility with versions of CMake older than 2.8.12 is now  
deprecated and will be removed from a future version. Calls to  
“cmake\_minimum\_required()” or “cmake\_policy()” that set the policy  
version to an older value now issue a deprecation diagnostic.

# CMake 3.19 Release Notes

#### Changes made since CMake 3.18 include the following.

## New Features

### Presets

- “cmake(1)” and “cmake-gui(1)” now recognize “CMakePresets.json” and  
“CMakeUserPresets.json” files (see “cmake-presets(7)”).

### Generators

- The “Xcode” generator now uses the Xcode “new build system” when  
generating for Xcode 12.0 or higher. See the  
“CMAKE\_XCODE\_BUILD\_SYSTEM” variable. One may use “-T buildsystem=1”  
to switch to the legacy build system.

- The “Xcode” generator gained support for linking libraries and  
frameworks via the _Link Binaries With Libraries_ build phase  
instead of always by embedding linker flags directly. This behavior  
is controlled by a new “XCODE\_LINK\_BUILD\_PHASE\_MODE” target  
property, which is initialized by a new  
“CMAKE\_XCODE\_LINK\_BUILD\_PHASE\_MODE” variable.

- The Visual Studio Generators for VS 2015 and above gained support  
for the Visual Studio Tools for Android. One may now set  
“CMAKE\_SYSTEM\_NAME” to “Android” to generate “.vcxproj” files for  
the Android tools.

### Languages

- CMake learned to support “ISPC” as a first-class language that can  
be enabled via the “project()” and “enable\_language()” commands.  
“ISPC” is currently supported by the Makefile Generators and the  
“Ninja” generator on Linux, macOS, and Windows using the Intel ISPC  
compiler.

- “CUDA” language support for Clang now includes:

### File-Based API

- The “cmake-file-api(7)” “codemodel” version 2 “version” field has  
been updated to 2.2.

- The “cmake-file-api(7)” “codemodel” version 2 “target” object gained  
a new “languageStandard” field in the “compileGroups” objects.

### Command-Line

- The “cmake(1)” command-line tool’s “–install” mode gained a “–  
default-directory-permissions” option.

- “cmake(1)” gained a “-E create\_hardlink” command-line tool that can  
be used to create hardlinks between files.

### GUI

- The “CMake GUI” now has an environment variable editor.

### Commands

- The “add\_test()” command now (officially) supports whitespace and  
other special characters in the name for the test it creates. See  
policy “CMP0110”.

- The “cmake\_language()” command gained a “DEFER” mode to schedule  
command calls to occur at the end of processing a directory.

- The “cmake\_path()” command was added for operations on filesystem  
paths.

- The “configure\_file()” command gained a “NO\_SOURCE\_PERMISSIONS”  
option to suppress copying the input file’s permissions to the  
output file.

- The “execute\_process()” command gained a “COMMAND\_ERROR\_IS\_FATAL”  
option to specify a fatal error.

- The “file(ARCHIVE\_CREATE)” command gained a “COMPRESSION\_LEVEL”  
option to specify the compression level.

- The “file(CHMOD)” and “file(CHMOD\_RECURSE)” subcommands were added  
to set permissions of files and directories.

- The “file(DOWNLOAD)” command “” argument is now optional. If  
it is not specified, the file is not saved.

- The “file(GENERATE)” command gained a new “TARGET” keyword to  
support resolving target-dependent generator expressions.

- The “file()” command gained a new “REAL\_PATH” sub-command to compute  
a path with symlinks resolved.

- The “find\_package()” command learned to handle a version range.

- The “separate\_arguments()” command gained a new “PROGRAM” option. It  
allows the arguments to be treated as a program invocation and will  
resolve the executable to a full path if it can be found.

- The “DIRECTORY” option of the “set\_property()”, “get\_property()”,  
and “get\_directory\_property()” commands now accepts references to  
binary directory paths, such as the value of  
“CMAKE\_CURRENT\_BINARY\_DIR”.

- The “string()” command gained a set of new “JSON” sub commands that  
provide JSON parsing capabilities.

### Variables

- The “CMAKE\_CLANG\_VFS\_OVERLAY” variable was added to tell Clang to  
use a VFS overlay to support the Windows SDK when cross-compiling  
from hosts with case-sensitive filesystems.

- The “CMAKE\_MFC\_FLAG” variable now supports generator expressions.

- The “CMAKE\_OPTIMIZE\_DEPENDENCIES” variable was added to initialize  
the new “OPTIMIZE\_DEPENDENCIES” target property and avoid  
unnecessarily building dependencies for a static library.

- The “CMAKE\_PCH\_INSTANTIATE\_TEMPLATES” variable was added to  
initialize the new “PCH\_INSTANTIATE\_TEMPLATES” target property.

- The “CMAKE\_VS\_WINDOWS\_TARGET\_PLATFORM\_VERSION\_MAXIMUM” variable was  
added to tell the Visual Studio Generators what maximum version of  
the Windows SDK to choose.

### Properties

- The “EXCLUDE\_FROM\_ALL” target property now supports “generator  
expressions”.

- The “OPTIMIZE\_DEPENDENCIES” target property was added to avoid  
unnecessarily building dependencies for a static library.

- The “PCH\_INSTANTIATE\_TEMPLATES” target property was added to enable  
template instantiation in the precompiled header. This is enabled by  
default and may significantly improve compile times. Currently only  
supported for Clang (version 11 or later).

- The “WIN32\_EXECUTABLE” target property now supports “generator  
expressions”.

### Modules

- The “CheckCompilerFlag” module has been added to generalize  
“CheckCCompilerFlag” and “CheckCXXCompilerFlag” to more languages.  
It also supports the “CUDA” and “ISPC” languages.

- The “CheckLinkerFlag” module now supports the “CUDA” language.

- The “CheckSourceCompiles” module has been added to generalize  
“CheckCSourceCompiles” and “CheckCXXSourceCompiles” to more  
languages. It also supports the “CUDA” and “ISPC” languages.

- The “CheckSourceRuns” module has been added to generalize  
“CheckCSourceRuns” and “CheckCXXSourceRuns” to more languages. It  
also supports the “CUDA” language.

- The “CMakePackageConfigHelpers” module gained support for version  
ranges.

- The “FindCUDAToolkit” module gained support for finding CUDA  
toolkits that do not contain “nvcc”, as well as for finding  
scattered toolkit installations when cross-compiling.

- The “FindPackageHandleStandardArgs” module learned to handle version  
ranges. It also gained the “find\_package\_check\_version()” command to  
check the validity of a version against version-related arguments of  
“find\_package()” command.

- The “FindPython3”, “FindPython2” and “FindPython” modules gained the  
ability to handle a version range.

- The “FindPython3”, “FindPython2” and “FindPython” modules provide,  
respectively, the variable “Python3\_LINK\_OPTIONS”,  
“Python2\_LINK\_OPTIONS” and “Python\_LINK\_OPTIONS” for link options.

- The “FindSDL” module now provides:

- The “FindSWIG” module gained the ability to handle a version range.

- The “FindTIFF” module gained a “CXX” component to find the “tiffxx”  
library containing C++ bindings.

- The “FindVulkan” module now provides a “Vulkan::glslc” imported  
target and associated “Vulkan\_GLSLC\_EXECUTABLE” variable which  
contain the path to the GLSL SPIR-V compiler.

- The “UseSWIG” module gained support for new source file properties  
“OUTPUT\_DIR” and “OUTFILE\_DIR” to manage output directories on a  
per-source basis.

### CTest

- “ctest(1)” now supports the CUDA “compute-sanitizer” checker  
(previously known as “cuda-memcheck”) as the  
“CTEST\_MEMORYCHECK\_COMMAND”. The different tools (“memcheck”,  
“racecheck”, “synccheck” and “initcheck”) supported by “compute-  
sanitizer” can be selected by adding appropriate flags to the  
“CTEST\_MEMORYCHECK\_COMMAND\_OPTIONS” variable. The default flags are  
“–tool memcheck --leak-check full”.

### CPack

- CPack gained the “CPACK\_PRE\_BUILD\_SCRIPTS”,  
“CPACK\_POST\_BUILD\_SCRIPTS”, and “CPACK\_PACKAGE\_FILES” variables.

- The “CPack External Generator” gained the  
“CPACK\_EXTERNAL\_BUILT\_PACKAGES” variable.

- The “CPack WIX Generator” gained a “CPACK\_WIX\_CUSTOM\_XMLNS” option  
to specify custom XML namespaces.

### Other

- Interface Libraries may now have source files added via  
“add\_library()” or “target\_sources()”. Those with sources will be  
generated as part of the build system.

## Deprecated and Removed Features

- Compatibility with versions of CMake older than 2.8.12 is now  
deprecated and will be removed from a future version. Calls to  
“cmake\_minimum\_required()” or “cmake\_policy()” that set the policy  
version to an older value now issue a deprecation diagnostic.

- An explicit deprecation diagnostic was added for policy “CMP0071”  
(“CMP0071” and below were already deprecated). The “cmake-  
policies(7)” manual explains that the OLD behaviors of all policies  
are deprecated and that projects should port to the NEW behaviors.

- macOS SDKs older than 10.5 are no longer supported.

- “cmake-gui(1)” now requires Qt5. Support for compiling with Qt4 has  
been removed.

- The “cmake(1)” command-line option “–warn-unused-vars” has been  
removed and is now silently ignored. The option has not worked  
correctly since CMake 3.3.

## Documentation

The following guides have been added:

- “IDE Integration Guide”

- “Importing and Exporting Guide”

## Other Changes

- Building for macOS will now use the latest SDK available on the  
system, unless the user has explicitly chosen a SDK using  
“CMAKE\_OSX\_SYSROOT”. The deployment target or system macOS version  
will not affect the choice of SDK.

- The “CMAKE\_\_COMPILER” variable may now be used to store  
“mandatory” compiler flags like the “CC” and other environment  
variables.

- The “CMAKE\__FLAGS\_INIT" variable will now be considered during  
the compiler identification check if other sources like  
"CMAKE_\_FLAGS” or “CFLAGS” are not set.

- The “find\_program()” command now requires permission to execute but  
not to read the file found. See policy “CMP0109”.

- An imported target missing its location property fails during  
generation if the location is used. See policy “CMP0111”.

- The following target-based generator expressions that query for  
directory or file name components no longer add a dependency on the  
evaluated target. See policy “CMP0112”.

- Makefile Generators no longer repeat custom commands from target  
dependencies. See policy “CMP0113”.

- The “ExternalProject” module handling of step target dependencies  
has been revised. See policy “CMP0114”.

- The “OSX\_ARCHITECTURES” target property is now respected for the  
“ASM” language.

- If “CUDA” compiler detection fails with user-specified  
“CMAKE\_CUDA\_ARCHITECTURES” or “CMAKE\_CUDA\_HOST\_COMPILER”, an error  
is raised.

* * *

Changes made since CMake 3.19.0-rc1:

Ben Boeckel (3):

- ci: use a patched sccache on macOS
- ci: update to use CMake 3.18.4
- ci: update to Qt 5.15.1

Ben McMorran (1):

- Help: Add JSON schema for CMakePresets.json

Brad King (12):

- cmake-gui: Attach icons only to main GUI executables
- clang-format: Fix include block order in ctest.cxx and cpack.cxx
- cmConsoleBuf: Factor out cout/cerr console buffer management
- Tests: Add cases for CheckSource{Compiles,Runs} bad arguments
- Fix regression in test/install/package configuration selection
- CMP0111: Clarify that the new error is on a missing property setting
- find\_package: Fix regression in searching root prefix
- ci: add Python to PATH on Windows
- FindBoost: Honor Boost\_NO\_SYSTEM\_PATHS when finding upstream BoostConfig
- FindBoost: Honor BOOST\_ROOT when finding upstream BoostConfig
- FindRuby: Restore compatibility variable RUBY\_VENDORLIB\_DIR
- CMake 3.19.0-rc2

Craig Scott (1):

- Help: Cleanup typos and grammar for the 3.19 release

Cristian Adam (1):

- file(CONFIGURE): Allow angle brackets in content

Deniz Bahadir (1):

- add\_custom\_command: Properly recognize if sources depend on config

Felipe Torrezan (1):

- IAR: Use .o object file extension with IAR-Ilink toolchains

Gusts Kaksis (1):

- Xcode: Fix regression that automatically links libraries in source list

Issam E. Maghni (2):

- bootstrap: add samu as known ninja processors
- bootstrap: add smake as known make processors

Johnny Jazeix (1):

- cmake: Fix ‘-E cat’ command for binary files on Windows

Kyle Edwards (21):

- Help: Fix invalid code-block in cmake(1) manual
- CMake GUI: Disable preset fields instead of hiding them
- Help: Move CMakePresets.json documentation into a separate file
- Help: s/unusedVars/unusedCli/
- Help: Move vendor field into example
- Help: Show multiple ways of doing cacheVariables
- Help: Show environment field
- Help: Add documentation for debug field
- Help: Add inheritance to CMakePresets.json example
- Help: Make architecture and toolset descriptions generic
- Help: Clarify purpose of warnings and errors
- Tests: Add JSON schema validation to CMakePresets.json tests
- CI: Install jsonschema for schema testing
- CMakePresets.json: Properly report macro expansion errors
- CMakePresets.json: Allow boolean for cache variable value
- CMakePresets.json: Add ${sourceDirName} macro
- CMakePresets.json: Split cmakeGeneratorConfig field
- CMakePresets.json: Rework how --preset argument is handled
- Ninja Multi-Config: Don’t try to calculate dependencies for “all”
- ccmake: Don’t list --preset in --help
- CMake GUI: Add --browse-manual argument

Marc Chevrier (2):

- FindPython: Add support of version 3.10
- cmake\_path: Enhance documentation

Michael Hirsch (1):

- CheckSource{Runs,Compiles}: Fix default Fortran source extension

Raul Tambre (1):

- VS: Don’t compute CUDA options unless necessary

Robert Bozzetto (1):

- separate\_arguments: Fix crash on \*\_COMMAND with no arguments

Robert Maynard (3):

- cmake: command arguments which use ‘=’ behave consistently
- Modules: Do not implicitly add new functions via old Check Modules
- CUDA: Use MSVC version to determine supported C++ standard levels

Volker Jacht (1):

- VS: Remove flag table entries for Fortran /Z\* flags

---

<div class="post-metadata">

### Author: ![leeruns](https://discourse.cmake.org/user_avatar/discourse.cmake.org/leeruns/32/799_2.png) [@leeruns](https://discourse.cmake.org/u/leeruns)
#### Post date: [February 6, 2021, 12:47am UTC](https://discourse.cmake.org/t/cmake-3-19-0-rc2-is-ready-for-testing/2084/2 "2021-02-06T00:47:51Z")

</div>

> [@robert.maynard](#):
>
> JSON

I am trying to use this but cannot even seem to modify my compiler\_commands.json. Can you guys pose a couple of examples where you do this. Looking for methods to combine multiple compile\_commands.json files to deal with multiple dev machines and clangd
