3.26.rst 6.7 KB

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