3.26.rst 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. CMake 3.26 Release Notes
  2. ************************
  3. .. only:: html
  4. .. contents::
  5. Changes made since CMake 3.25 include the following.
  6. New Features
  7. ============
  8. Languages
  9. ---------
  10. * The ``ASM_MARMASM`` language was added to support the
  11. Microsoft ARM assembler language.
  12. Command-Line
  13. ------------
  14. * The :option:`cmake -E copy <cmake-E copy>` command-line tool now
  15. supports a ``-t`` argument.
  16. * The :option:`cmake -E copy_directory_if_different
  17. <cmake-E copy_directory_if_different>` command-line tool was added.
  18. Configure Log
  19. -------------
  20. * CMake now writes a YAML log of configure-time checks to
  21. ``CMakeFiles/CMakeConfigureLog.yaml`` under the top of the build tree.
  22. See the :manual:`cmake-configure-log(7)` manual.
  23. File-Based API
  24. --------------
  25. * The :manual:`cmake-file-api(7)` "codemodel" version 2 ``version`` field has
  26. been updated to 2.5.
  27. * The :manual:`cmake-file-api(7)` "codemodel" version 2 "target" object
  28. gained a new ``fileSets`` field and associated ``fileSetIndex``
  29. field to ``sources`` objects.
  30. * The :manual:`cmake-file-api(7)` "codemodel" version 2 "directory"
  31. object ``installers`` field gained a new ``cxxModuleBmi`` installer type
  32. and an associated ``cxxModuleBmiTarget`` field.
  33. * The :manual:`cmake-file-api(7)` gained a new "configureLog" object kind
  34. that enables stable access to the :manual:`cmake-configure-log(7)`.
  35. Commands
  36. --------
  37. * The :command:`add_custom_command` and :command:`add_custom_target` commands
  38. now support :manual:`generator expressions <cmake-generator-expressions(7)>`
  39. in their ``COMMENT`` option.
  40. * The :command:`message` command gained a ``CONFIGURE_LOG`` mode to
  41. record an entry in the :manual:`cmake-configure-log(7)`.
  42. * The :command:`string(TIMESTAMP)` and :command:`file(TIMESTAMP)` commands
  43. now support the ``%z`` and ``%Z`` specifiers for the time zone.
  44. * The :command:`try_compile` and :command:`try_run` commands gained
  45. a ``LOG_DESCRIPTION`` option specifying text to be recorded in the
  46. :manual:`cmake-configure-log(7)`.
  47. * The :command:`try_compile` and :command:`try_run` commands gained a
  48. ``NO_LOG`` option to skip recording a :manual:`cmake-configure-log(7)`
  49. entry.
  50. Variables
  51. ---------
  52. * The :variable:`CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT` variable is now
  53. set for ``GNU``, ``MSVC``, and ``AppleClang`` compilers that have only
  54. one frontend variant.
  55. * A :variable:`CMAKE_VS_VERSION_BUILD_NUMBER` variable is now set by
  56. :ref:`Visual Studio Generators` for VS 2017 and above to report the
  57. four-component Visual Studio version number.
  58. Properties
  59. ----------
  60. * The :prop_tgt:`<LANG>_CLANG_TIDY_EXPORT_FIXES_DIR` target property was
  61. added to allow the ``clang-tidy`` tool to export its suggested fixes to a
  62. set of ``.yaml`` files. A new
  63. :variable:`CMAKE_<LANG>_CLANG_TIDY_EXPORT_FIXES_DIR` variable was created to
  64. initialize this property.
  65. * The :prop_tgt:`XCODE_EMBED_EXTENSIONKIT_EXTENSIONS <XCODE_EMBED_<type>>`
  66. target property was added to tell the :generator:`Xcode` generator to embed
  67. ExtensionKit-based extensions such as extensions using the Background
  68. Assets framework. Aspects of the embedding can be customized with:
  69. * :prop_tgt:`XCODE_EMBED_EXTENSIONKIT_EXTENSIONS_PATH <XCODE_EMBED_<type>>`
  70. * :prop_tgt:`XCODE_EMBED_EXTENSIONKIT_EXTENSIONS_CODE_SIGN_ON_COPY <XCODE_EMBED_<type>_CODE_SIGN_ON_COPY>`
  71. * :prop_tgt:`XCODE_EMBED_EXTENSIONKIT_EXTENSIONS_REMOVE_HEADERS_ON_COPY <XCODE_EMBED_<type>_REMOVE_HEADERS_ON_COPY>`
  72. Modules
  73. -------
  74. * The :module:`ExternalProject` module's :command:`ExternalProject_Add` command
  75. gained an ``INSTALL_BYPRODUCTS`` option to specify files generated by the
  76. ``install`` step.
  77. * The :module:`FindCUDAToolkit` module:
  78. * gained support for the ``sbsa-linux`` cross compilation target, and
  79. * now provides an imported target for ``nvrtc_static``, if found.
  80. * The :module:`FindImageMagick` module now provides imported targets.
  81. * The :module:`FindPython3` and :module:`FindPython` modules gained
  82. support for the `Stable Application Binary Interface`_.
  83. * The :module:`UseSWIG` module gained support for the ``perl5`` language.
  84. .. _`Stable Application Binary Interface`: https://docs.python.org/3/c-api/stable.html
  85. Generator Expressions
  86. ---------------------
  87. * The :genex:`$<BUILD_LOCAL_INTERFACE:...>` generator expression was added to
  88. prevent usage requirements from being exported to dependent projects.
  89. CTest
  90. -----
  91. * The :envvar:`CTEST_NO_TESTS_ACTION` environment variable was added to
  92. provide a default value for the
  93. :option:`--no-tests=\<action\> <ctest --no-tests>` command line
  94. argument of :manual:`ctest(1)`.
  95. Deprecated and Removed Features
  96. ===============================
  97. * The ``CMakeFiles/CMakeOutput.log`` and ``CMakeFiles/CMakeError.log``
  98. files are no longer populated by CMake's built-in modules.
  99. :manual:`cmake(1)` no longer suggests looking at them after a
  100. ``CMake Error`` occurs. Information previously logged to those
  101. files is instead logged to the :manual:`cmake-configure-log(7)`.
  102. * On CYGWIN, the undocumented ``CMAKE_LEGACY_CYGWIN_WIN32`` mode for
  103. compatibility with CMake versions older than 2.8.4 has been removed.
  104. Other Changes
  105. =============
  106. * :ref:`Language Standard Flags`, such as ``-std=c++11``, when generated due
  107. to :command:`target_compile_features` or :variable:`CMAKE_<LANG>_STANDARD`,
  108. are now placed before flags added by :command:`target_compile_options`,
  109. rather than after them.
  110. * For all ``COMPILE_DEFINITIONS`` properties, any leading ``-D`` on an item
  111. is removed whether or not it was specified by a generator expression.
  112. * The ``compile_commands.json`` database enabled by
  113. :variable:`CMAKE_EXPORT_COMPILE_COMMANDS` now provides the ``output``
  114. field in the compile commands objects. This allows multi-config
  115. generators, such as the :generator:`Ninja Multi-Config` generator,
  116. to provide the compile commands for all configurations.
  117. * The :prop_gbl:`USE_FOLDERS` global property is treated as ``ON`` by default.
  118. See policy :policy:`CMP0143`.
  119. * The top-level :command:`project` call will now emit an author warning if the
  120. documented command order in relation to :command:`cmake_minimum_required` is
  121. not respected.
  122. * The :option:`cmake --trace` option now follows :command:`try_compile` and
  123. :command:`try_run` invocations.
  124. Updates
  125. =======
  126. Changes made since CMake 3.26.0 include the following.
  127. 3.26.1, 3.26.2, 3.26.3, 3.26.4, 3.26.5
  128. --------------------------------------
  129. * These versions made no changes to documented features or interfaces.
  130. Some implementation updates were made to support ecosystem changes
  131. and/or fix regressions.
  132. 3.26.6
  133. ------
  134. * The :manual:`cmake-file-api(7)` "codemodel" version 2 "target" object
  135. ``fileSets`` field was introduced by CMake 3.26.0 with entries of its
  136. ``baseDirectories`` member incorrectly expressed as absolute paths
  137. even if they are inside the top-level source directory. This has
  138. been fixed. Clients must be updated to expect relative paths under
  139. the top-level source directory.