CMake 3.26.0-rc2 is ready for testing

February 9, 2023

I am proud to announce the second CMake 3.26 release candidate.
https://cmake.org/download/

Documentation is available at:
https://cmake.org/cmake/help/v3.26

Release notes appear below and are also published at
https://cmake.org/cmake/help/v3.26/release/3.26.html

Some of the more significant changes in CMake 3.26 are:

  • The “ASM_MARMASM” language was added to support the Microsoft ARM
    assembler language.
  • CMake now writes a YAML log of configure-time checks to
    “CMakeFiles/CMakeConfigureLog.yaml” under the top of the build tree.
    See the “cmake-configure-log(7)” manual.
  • The “cmake-file-api(7)” “codemodel” version 2 “target” object gained
    a new “fileSets” field and associated “fileSetIndex” field to
    “sources” objects.
  • The “$<build_local_interface:…>” generator expression was added to
    prevent usage requirements from being exported to dependent
    projects.
  • Language Standard Flags, such as “-std=c++11”, when generated due to
    “target_compile_features()” or “CMAKE_<lang>_STANDARD”, are now
    placed before flags added by “target_compile_options()”, rather than
    after them.
  • The top-level “project()” call will now emit an author warning if
    the documented command order in relation to
    “cmake_minimum_required()” is not respected.
CMake 3.26 Release Notes
************************


Changes made since CMake 3.25 include the following.

New Features
============

Languages
---------

* The "ASM_MARMASM" language was added to support the Microsoft ARM
assembler language.

Command-Line
------------

* The "cmake -E copy" command-line tool now supports a "-t" argument.

* The "cmake -E copy_directory_if_different" command-line tool was
added.

Configure Log
-------------

* CMake now writes a YAML log of configure-time checks to
"CMakeFiles/CMakeConfigureLog.yaml" under the top of the build tree.
See the "cmake-configure-log(7)" manual.

File-Based API
--------------

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

* The "cmake-file-api(7)" "codemodel" version 2 "target" object gained
a new "fileSets" field and associated "fileSetIndex" field to
"sources" objects.

* The "cmake-file-api(7)" gained a new "configureLog" object kind that
enables stable access to the "cmake-configure-log(7)".

Commands
--------

* The "add_custom_command()" and "add_custom_target()" commands now
support "generator expressions" in their "COMMENT" option.

* The "message()" command gained a "CONFIGURE_LOG" mode to record an
entry in the "cmake-configure-log(7)".

* The "string(TIMESTAMP)" and "file(TIMESTAMP)" commands now support
the "%z" and "%Z" specifiers for the time zone.

* The "try_compile()" and "try_run()" commands gained a
"LOG_DESCRIPTION" option specifying text to be recorded in the
"cmake-configure-log(7)".

* The "try_compile()" and "try_run()" commands gained a "NO_LOG"
option to skip recording a "cmake-configure-log(7)" entry.

Variables
---------

* The "CMAKE_<lang>_COMPILER_FRONTEND_VARIANT" variable is now set for
"GNU", "MSVC", and "AppleClang" compilers that have only one
frontend variant.

* A "CMAKE_VS_VERSION_BUILD_NUMBER" variable is now set by Visual
Studio Generators for VS 2017 and above to report the four-component
Visual Studio version number.

Properties
----------

* The "<lang>_CLANG_TIDY_EXPORT_FIXES_DIR" target property was added
to allow the "clang-tidy" tool to export its suggested fixes to a
set of ".yaml" files. A new
"CMAKE_<lang>_CLANG_TIDY_EXPORT_FIXES_DIR" variable was created to
initialize this property.

* The "XCODE_EMBED_EXTENSIONKIT_EXTENSIONS" target property was added
to tell the "Xcode" generator to ExtensionKit-based extensions such
as extensions using the Background Assets framework.  Aspects of the
embedding can be customized with:

* "XCODE_EMBED_EXTENSIONKIT_EXTENSIONS_PATH"

* "XCODE_EMBED_EXTENSIONKIT_EXTENSIONS_CODE_SIGN_ON_COPY"

* "XCODE_EMBED_EXTENSIONKIT_EXTENSIONS_REMOVE_HEADERS_ON_COPY"

Modules
-------

* The "ExternalProject" module "ExternalProject_Add()" command gained
an "INSTALL_BYPRODUCTS" option to specify files generated by the
"install" step.

* The "FindCUDAToolkit" module:

* gained support for the "sbsa-linux" cross compilation target, and

* now provides an imported target for "nvrtc_static", if found.

* The "FindImageMagick" module now provides imported targets.

* The "FindPython3" and "FindPython" modules gained support for the
Stable Application Binary Interface.

* The "UseSWIG" module gained the support for the "perl5" language.

Generator Expressions
---------------------

* The "<build_local_interface:...>" generator expression was added to
prevent usage requirements from being exported to dependent
projects.

CTest
-----

* The "CTEST_NO_TESTS_ACTION" environment variable was added to
provide a default value for the "--no-tests=" command line
argument of "ctest(1)".

Deprecated and Removed Features
===============================

* The "CMakeFiles/CMakeOutput.log" and "CMakeFiles/CMakeError.log"
files are no longer populated by CMake's builtin modules, and
"cmake(1)" no longer suggests looking at them after a "CMake Error"
occurs.  Information previously logged to those files is instead
logged to "CMakeFiles/CMakeConfigureLog.yaml", the "cmake-configure-
log(7)".

* On CYGWIN, the undocumented "CMAKE_LEGACY_CYGWIN_WIN32" mode for
compatibility with CMake versions older than 2.8.4 has been removed.

Other Changes
=============

* Language Standard Flags, such as "-std=c++11", when generated due to
"target_compile_features()" or "CMAKE_<lang>_STANDARD", are now
placed before flags added by "target_compile_options()", rather than
after them.

* For all "COMPILE_DEFINITIONS" properties, any leading "-D" on an
item is removed whether or not it was specified by a generator
expression.

* The "compile_commands.json" database enabled by
"CMAKE_EXPORT_COMPILE_COMMANDS" now provides the "output" field in
the compile commands objects.  This allows multi-config generators,
such as the "Ninja Multi-Config" generator, to provide the compile
commands for all configurations.

* The "USE_FOLDERS" global property is treated as "ON" by default. See
policy "CMP0143".

* The top-level "project()" call will now emit an author warning if
the documented command order in relation to
"cmake_minimum_required()" is not respected.

* The "cmake --trace" option now follows "try_compile()" and
"try_run()" invocations.

----------------------------------------------------------------------------
Changes made since CMake 3.25.0-rc1:

Alex Turbov (8):
  ci: Reduce intermediate docker layers and final image size
  Help: CPack DEB Generator page use field lists
  Help: CPack NuGet Generator page use field lists
  Help: CPack RPM Generator page use field lists
  Help: CPack Archive Generator page use field lists
  Help: CPack DragNDrop Generator page use field lists
  Help: CPack FreeBSD Generator page use field lists
  ci: Reduce Fedora and Debian image sizes even more

Ben Boeckel (1):
  Tests/RunCMake/CXXModules: declare `forwarding` as `extern "C++"`

Brad King (5):
  Android: Provide CMAKE_ANDROID_NDK_VERSION with NDK legacy toolchain file
  Help: Clarify that <packagename>_ROOT variable names are case-preserved
  curl: Enable schannel TLS 1.3 support on Windows 11
  Help: Clarify that the documented configure log location is not stable
  CMake 3.26.0-rc2

Eisuke Kawashima (1):
  FetchContent: Bump documented example Catch2 to v3.0.1

Joerg Bornemann (1):
  AutoMoc: Fix verbose mode message

Kyle Edwards (3):
  FindOpenSSL: Use static pkgconfig if OPENSSL_USE_STATIC_LIBS=ON
  Help: Update <target_runtime_dlls> docs to use cmake -E copy -t
  Help: Avoid making guarantees about <lang>_CLANG_TIDY_EXPORT_FIXES_DIR

Paul Taylor (1):
  FindCUDAToolkit: Fix `nvrtc_builtins_static` library name

Robert Maynard (1):
  cmake: Stop parsing after `--` when detecting script mode

scivision (3):
  Help: Clarify interaction of execute_process *_FILE and *_VARIABLE options
  Help: CheckSource{Compiles,Runs}: fix typo and clarify
  Help: cmake (1): remove -E server as not available

Leave a Reply