3.25.rst 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. CMake 3.25 Release Notes
  2. ************************
  3. .. only:: html
  4. .. contents::
  5. Changes made since CMake 3.24 include the following.
  6. New Features
  7. ============
  8. Presets
  9. -------
  10. * The :manual:`cmake-presets(7)` schema version has been bumped to ``6``.
  11. * The :manual:`cmake-presets(7)` format now supports a
  12. ``packagePresets`` field to specify presets for :option:`cpack --preset`.
  13. * The :manual:`cmake-presets(7)` format now supports a
  14. ``workflowPresets`` field to specify presets for :option:`cmake --workflow`.
  15. * The :manual:`cmake-presets(7)` format now supports an
  16. ``outputJUnitFile`` field to specify JUnit output in test presets.
  17. Languages
  18. ---------
  19. * The :manual:`Compile Features <cmake-compile-features(7)>` functionality
  20. is now aware of C++26, and defines a ``cxx_std_26`` meta-feature.
  21. C++26 compiler modes may also be specified via the :prop_tgt:`CXX_STANDARD`,
  22. :prop_tgt:`CUDA_STANDARD`, :prop_tgt:`HIP_STANDARD`,
  23. or :prop_tgt:`OBJCXX_STANDARD` target properties.
  24. * ``CUDA`` language support now includes device link-time optimization when
  25. using ``nvcc``. The :variable:`CMAKE_INTERPROCEDURAL_OPTIMIZATION` variable
  26. and the associated :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION` target property
  27. will activate device LTO.
  28. Command-Line
  29. ------------
  30. * A :option:`cmake --workflow --preset <cmake--workflow --preset>` mode was
  31. added to drive sequences of configure, build, test, and package operations
  32. through a single command.
  33. * The :option:`cmake -E capabilities <cmake-E capabilities>` command
  34. gained a new ``tls`` field that tells whether or not TLS is enabled.
  35. * The :option:`cmake -E env <cmake-E env>` command-line tool gained
  36. a ``--modify`` flag to support :prop_test:`ENVIRONMENT_MODIFICATION`
  37. operations.
  38. * The :option:`cmake --debug-trycompile` option now prints log messages
  39. reporting the directory in which each try-compile check is done.
  40. Compilers
  41. ---------
  42. * Support for the `Tasking compiler toolsets`_ (SmartCode, TriCore,
  43. Standalone: ARM, MCS, 8051) was added with compiler id ``Tasking``.
  44. See the :variable:`CMAKE_TASKING_TOOLSET` variable.
  45. .. _Tasking compiler toolsets: https://www.tasking.com
  46. Commands
  47. --------
  48. * The :command:`add_subdirectory` command gained a ``SYSTEM`` option
  49. to enable the :prop_dir:`SYSTEM` directory property in the subdirectory.
  50. * The :command:`block` and :command:`endblock` commands were added to manage
  51. specific scopes (policy or variable) for a contained block of commands.
  52. * The :command:`cmake_language` command gained a new
  53. ``GET_MESSAGE_LOG_LEVEL`` sub-command. It can be used to
  54. query the current message logging level.
  55. * The :command:`find_file`, :command:`find_path`, :command:`find_library`, and
  56. :command:`find_program` commands gained a ``VALIDATOR`` option to specify a
  57. function to be called for each candidate item to validate it.
  58. * The :command:`find_package` command now considers paths of
  59. the form ``<prefix>/<name>*/(cmake|CMake)/<name>*/`` when
  60. searching for package configuration files.
  61. * The :command:`return` command gained a ``PROPAGATE`` option to propagate
  62. variables to the scope to which control returns.
  63. See policy :policy:`CMP0140`.
  64. * The :command:`try_compile` and :command:`try_run` commands gained new
  65. signatures that more consistently use keyword dispatch and do not require a
  66. binary directory to be specified. Additionally, these signatures use a
  67. unique directory for each invocation, which allows multiple outputs to be
  68. preserved when using :option:`cmake --debug-trycompile`.
  69. * The :command:`try_compile` and :command:`try_run` commands gained the
  70. option ``NO_CACHE`` to store results in normal variables.
  71. * The :command:`try_run` command gained ``RUN_OUTPUT_STDOUT_VARIABLE``
  72. and ``RUN_OUTPUT_STDERR_VARIABLE`` options to capture stdout and stderr
  73. separately from the output of the compiled program.
  74. Variables
  75. ---------
  76. * The :variable:`BSD` and :variable:`CMAKE_HOST_BSD` variables are now set
  77. to a string value when the target or host system is BSD, respectively.
  78. * The :variable:`LINUX` and :variable:`CMAKE_HOST_LINUX` variables are
  79. now set to true when the target or host system is Linux, respectively.
  80. * The :variable:`CMAKE_MSVC_DEBUG_INFORMATION_FORMAT` variable and
  81. :prop_tgt:`MSVC_DEBUG_INFORMATION_FORMAT` target property were introduced
  82. to select the debug information format for compilers targeting the MSVC ABI.
  83. See policy :policy:`CMP0141`.
  84. * The :variable:`CMAKE_XCODE_SCHEME_ENABLE_GPU_API_VALIDATION` variable and
  85. corresponding :prop_tgt:`XCODE_SCHEME_ENABLE_GPU_API_VALIDATION` target
  86. property were added to tell the :generator:`Xcode` generator what to put
  87. in the scheme's ``Metal: API Validation`` setting.
  88. * The :variable:`CMAKE_XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION` variable and
  89. corresponding :prop_tgt:`XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION` target
  90. property were added to tell the :generator:`Xcode` generator what to put
  91. in the scheme's ``Metal: Shader Validation`` setting.
  92. * The :variable:`CMAKE_XCODE_SCHEME_LAUNCH_MODE` variable and corresponding
  93. :prop_tgt:`XCODE_SCHEME_LAUNCH_MODE` target property were added to tell
  94. the :generator:`Xcode` generator what to put in the scheme's "Launch"
  95. mode setting.
  96. * The :variable:`CMAKE_XCODE_SCHEME_LAUNCH_CONFIGURATION` variable and
  97. corresponding :prop_tgt:`XCODE_SCHEME_LAUNCH_CONFIGURATION` target
  98. property were added to tell the :generator:`Xcode` generator what
  99. configuration to put in the scheme's Launch action.
  100. Properties
  101. ----------
  102. * The :prop_tgt:`<LANG>_COMPILER_LAUNCHER` target property now supports
  103. :manual:`generator expressions <cmake-generator-expressions(7)>`.
  104. * The :prop_tgt:`EXPORT_NO_SYSTEM` target property was added to
  105. specify that :command:`install(EXPORT)` and :command:`export`
  106. commands will generate na imported target with
  107. :prop_tgt:`SYSTEM` property ``OFF``.
  108. * The :prop_tgt:`SYSTEM` target property was added to specify
  109. whether a target should be treated as a system library (i.e.
  110. its include directories are automatically ``SYSTEM`` when
  111. compiling consumers). If not set, the default is the previous
  112. behavior: on for imported targets and off for other targets.
  113. * The :prop_dir:`SYSTEM` directory property was added to initialize the
  114. :prop_tgt:`SYSTEM` target property for targets created in that directory.
  115. Modules
  116. -------
  117. * The :module:`FetchContent` module's :command:`FetchContent_Declare`
  118. command gained a ``SYSTEM`` option which sets the :prop_dir:`SYSTEM`
  119. directory property on subdirectories created by
  120. :command:`FetchContent_MakeAvailable`.
  121. * The :module:`FindCUDAToolkit` module now provides a target for
  122. :ref:`nvtx3 <cuda_toolkit_nvtx3>` for CUDA 10.0+, which supersedes
  123. :ref:`nvToolsExt <cuda_toolkit_nvToolsExt>`. A deprecation warning
  124. is emitted when using ``nvToolsExt`` if the project requires CMake
  125. 3.25 and CUDA 10.0+ is used.
  126. * The :module:`FindDoxygen` module's version handling has been improved:
  127. * Multiple candidate installations will now be considered, if needed,
  128. to satisfy version constraints. Previously, only the first one
  129. encountered would be considered.
  130. * Version ranges are supported.
  131. * Variations in the version format reported by Doxygen are now
  132. tolerated (e.g. a trailing git commit hash).
  133. * The :module:`FindOpenAL` module now provides an imported target.
  134. * The :module:`FindOpenSP` module was added to find the OpenSP library.
  135. * The :module:`FindVulkan` module gained support for new components:
  136. ``dxc``
  137. DirectX Shader Compiler.
  138. ``volk``
  139. Volk open-source vulkan meta-loader.
  140. CPack
  141. -----
  142. * The :cpack_gen:`CPack Archive Generator` gained a new
  143. :variable:`CPACK_ARCHIVE_FILE_EXTENSION` variable to control
  144. the package file name extension.
  145. * The :cpack_gen:`CPack NSIS Generator` gained two new variables
  146. :variable:`CPACK_NSIS_EXECUTABLE_PRE_ARGUMENTS` and
  147. :variable:`CPACK_NSIS_EXECUTABLE_POST_ARGUMENTS`
  148. to provide arguments to the nsis executable invocation.
  149. * The :module:`CPack` module gained the :variable:`CPACK_READELF_EXECUTABLE`,
  150. :variable:`CPACK_OBJCOPY_EXECUTABLE`, and
  151. :variable:`CPACK_OBJDUMP_EXECUTABLE` variables to control the locations
  152. of binutils used by :manual:`cpack(1)`.
  153. Deprecated and Removed Features
  154. ===============================
  155. * The :prop_tgt:`IMPORTED_NO_SYSTEM` target property has been deprecated
  156. in favor of :prop_tgt:`SYSTEM` and :prop_tgt:`EXPORT_NO_SYSTEM`.
  157. * The :generator:`Visual Studio 10 2010` generator has been removed.
  158. * The :generator:`Visual Studio 11 2012` generator is now deprecated
  159. and will be removed in a future version of CMake.
  160. Other Changes
  161. =============
  162. * The :envvar:`SSL_CERT_FILE` and :envvar:`SSL_CERT_DIR` environment
  163. variables can now be used to override where to find certificate
  164. authorities for TLS/SSL operations.
  165. * If :prop_tgt:`<LANG>_CLANG_TIDY` includes a ``-p`` argument, the
  166. full compiler command line is no longer appended after ``--``.
  167. * The :generator:`Xcode` generator no longer adds the per-config suffix
  168. ``$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)`` to library search paths.
  169. See policy :policy:`CMP0142`.
  170. Updates
  171. =======
  172. Changes made since CMake 3.25.0 include the following.
  173. 3.25.1
  174. ------
  175. * On Windows, when targeting the MSVC ABI, the :command:`find_library`
  176. command no longer accepts ``.a`` file names. This behavior was added
  177. in CMake 3.25.0, but has been reverted due finding GNU-ABI libraries
  178. in cases we did not previously.
  179. 3.25.2
  180. ------
  181. * CUDA language level 20 (corresponding to C++20) is now supported with
  182. NVCC 12.0 and above.
  183. * On Windows, the ``icpx`` compiler now provided by Intel oneAPI 2023.0
  184. and above is no longer selected because its GNU-like command-line is
  185. not yet supported by CMake.
  186. 3.25.3
  187. ------
  188. * This version made no changes to documented features or interfaces.
  189. Some implementation updates were made to support ecosystem changes
  190. and/or fix regressions.