I am proud to announce the fourth CMake 3.18 release candidate.
https://cmake.org/download/
Documentation is available at:
https://cmake.org/cmake/help/v3.18
Release notes appear below and are also published at
https://cmake.org/cmake/help/v3.18/release/3.18.html
Some of the more significant changes in CMake 3.18 are:
* The "CUDA" language can now be compiled using Clang on non-Windows
platforms. Separable compilation is not yet supported on any
platform. This is experimental and still under development.
* "cmake(1)" gained support for profiling of CMake scripts through the
parameters "--profiling-output" and "--profiling-format".
* The "add_library()" and "add_executable()" commands learned to
create Alias Targets referencing non-"GLOBAL" Imported Targets.
* The "cmake_language()" command was added for meta-operations on
scripted or built-in commands, starting with a mode to "CALL" other
commands, and "EVAL CODE" to inplace evaluate a CMake script.
* The "file(CONFIGURE)" subcommand was created in order to replicate
the "configure_file()" functionality without resorting to a pre-
existing file on disk as input. The content is instead passed as a
string.
* The "find_program()", "find_library()", "find_path()" and
"find_file()" commands gained a new "REQUIRED" option that will stop
processing with an error message if nothing is found.
* A "CMAKE_CUDA_ARCHITECTURES" variable was added to specify CUDA
output architectures. Users are encouraged to use this instead of
specifying options manually, as this approach is compiler-agnostic.
The variable is initialized automatically when
"CMAKE_CUDA_COMPILER_ID" is "NVIDIA". The variable is used to
initialize the new "CUDA_ARCHITECTURES" target property. See policy
"CMP0104".
* The "UNITY_BUILD_MODE" target property was added to tell generators
which algorithm ("BATCH", "GROUP") to use for grouping included source
files.
* The "CheckLinkerFlag" module has been added to provide a facility to
check validity of link flags.
* The "$" and "$" "generator
expressions" were added to manage device and host link steps.
* The "$" and "$" "generator
expressions" were added.
* "ctest(1)" gained a new "CTEST_RESOURCE_SPEC_FILE" variable, which
can be used to specify a resource specification file.
* "ccmake(1)" learned to read a "CCMAKE_COLORS" environment variable
to customize colors.
* On Windows, the "Ninja" and "Ninja Multi-Config" generators, when a
compiler is not explicitly specified, now select the first compiler
(of any name) found in directories listed by the "PATH" environment
variable.
CMake 3.18 Release Notes
Changes made since CMake 3.17 include the following.
New Features
Languages
-
* The "CUDA" language can now be compiled using Clang on non-Windows
platforms. Separable compilation is not yet supported on any
platform. This is experimental and still under development.
Command-Line
* "cmake(1)" gained support for profiling of CMake scripts through the
parameters "--profiling-output" and "--profiling-format".
* "cmake(1)" gained a "cat" command line option that can be used to
concatenate files and print them on standard output.
Commands
* The "add_library()" and "add_executable()" commands learned to
create Alias Targets referencing non-"GLOBAL" Imported Targets.
* The "cmake_language()" command was added for meta-operations on
scripted or built-in commands, starting with a mode to "CALL" other
commands, and "EVAL CODE" to inplace evaluate a CMake script.
* The "execute_process()" command gained the "ECHO_OUTPUT_VARIABLE"
and "ECHO_ERROR_VARIABLE" options.
* The "export()" command now raise an error if used multiple times
with same "FILE" without "APPEND". See policy "CMP0103".
* The "file()" command gained the "ARCHIVE_CREATE" and
"ARCHIVE_EXTRACT" subcommands to expose the "cmake(1)" "-E tar"
functionality to CMake scripting code.
* The "file(CONFIGURE)" subcommand was created in order to replicate
the "configure_file()" functionality without resorting to a pre-
existing file on disk as input. The content is instead passed as a
string.
* The "file(UPLOAD)" command gained "TLS_VERIFY" and "TLS_CAINFO"
options to control server certificate verification.
* The "find_program()", "find_library()", "find_path()" and
"find_file()" commands gained a new "REQUIRED" option that will stop
processing with an error message if nothing is found.
* The "get_property()" command with "SOURCE" scope gained the
"DIRECTORY" and "TARGET_DIRECTORY" options to get a property from
the provided directory scope.
* The "get_source_file_property()" command gained the "DIRECTORY" and
"TARGET_DIRECTORY" options to get a property from the provided
directory scope.
* The "list()" operation "SORT" gained the "NATURAL" sort option to
sort using natural order (see "strverscmp(3)" manual).