summaryrefslogtreecommitdiff
path: root/Help/release/3.26.rst
blob: 67ace4a45919e83c52d0f538833b8567f46d6e50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
CMake 3.26 Release Notes
************************

.. only:: html

  .. contents::

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 :option:`cmake -E copy <cmake-E copy>` command-line tool now
  supports a ``-t`` argument.

* The :option:`cmake -E copy_directory_if_different
  <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 :manual:`cmake-configure-log(7)` manual.

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

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

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

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

Commands
--------

* The :command:`add_custom_command` and :command:`add_custom_target` commands
  now support :manual:`generator expressions <cmake-generator-expressions(7)>`
  in their ``COMMENT`` option.

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

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

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

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

Variables
---------

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

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

Properties
----------

* The :prop_tgt:`<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
  :variable:`CMAKE_<LANG>_CLANG_TIDY_EXPORT_FIXES_DIR` variable was created to
  initialize this property.

* The :prop_tgt:`XCODE_EMBED_EXTENSIONKIT_EXTENSIONS <XCODE_EMBED_<type>>`
  target property was added to tell the :generator:`Xcode` generator to embed
  ExtensionKit-based extensions such as extensions using the Background
  Assets framework.  Aspects of the embedding can be customized with:

  * :prop_tgt:`XCODE_EMBED_EXTENSIONKIT_EXTENSIONS_PATH <XCODE_EMBED_<type>>`
  * :prop_tgt:`XCODE_EMBED_EXTENSIONKIT_EXTENSIONS_CODE_SIGN_ON_COPY <XCODE_EMBED_<type>_CODE_SIGN_ON_COPY>`
  * :prop_tgt:`XCODE_EMBED_EXTENSIONKIT_EXTENSIONS_REMOVE_HEADERS_ON_COPY <XCODE_EMBED_<type>_REMOVE_HEADERS_ON_COPY>`

Modules
-------

* The :module:`ExternalProject` module's :command:`ExternalProject_Add` command
  gained an ``INSTALL_BYPRODUCTS`` option to specify files generated by the
  ``install`` step.

* The :module:`FindCUDAToolkit` module:

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

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

* The :module:`FindImageMagick` module now provides imported targets.

* The :module:`FindPython3` and :module:`FindPython` modules gained
  support for the `Stable Application Binary Interface`_.

* The :module:`UseSWIG` module gained support for the ``perl5`` language.

.. _`Stable Application Binary Interface`: https://docs.python.org/3/c-api/stable.html

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

* The :genex:`$<BUILD_LOCAL_INTERFACE:...>` generator expression was added to
  prevent usage requirements from being exported to dependent projects.

CTest
-----

* The :envvar:`CTEST_NO_TESTS_ACTION` environment variable was added to
  provide a default value for the
  :option:`--no-tests=\<action\> <ctest --no-tests>` command line
  argument of :manual:`ctest(1)`.

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

* The ``CMakeFiles/CMakeOutput.log`` and ``CMakeFiles/CMakeError.log``
  files are no longer populated by CMake's built-in modules.
  :manual:`cmake(1)` no longer suggests looking at them after a
  ``CMake Error`` occurs.  Information previously logged to those
  files is instead logged to the :manual:`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
=============

* :ref:`Language Standard Flags`, such as ``-std=c++11``, when generated due
  to :command:`target_compile_features` or :variable:`CMAKE_<LANG>_STANDARD`,
  are now placed before flags added by :command:`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
  :variable:`CMAKE_EXPORT_COMPILE_COMMANDS` now provides the ``output``
  field in the compile commands objects.  This allows multi-config
  generators, such as the :generator:`Ninja Multi-Config` generator,
  to provide the compile commands for all configurations.

* The :prop_gbl:`USE_FOLDERS` global property is treated as ``ON`` by default.
  See policy :policy:`CMP0143`.

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

* The :option:`cmake --trace` option now follows :command:`try_compile` and
  :command:`try_run` invocations.

Updates
=======

Changes made since CMake 3.26.0 include the following.

3.26.1, 3.26.2
--------------

* These versions made no changes to documented features or interfaces.
  Some implementation updates were made to support ecosystem changes
  and/or fix regressions.