3.29.rst 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. CMake 3.29 Release Notes
  2. ************************
  3. .. only:: html
  4. .. contents::
  5. Changes made since CMake 3.28 include the following.
  6. New Features
  7. ============
  8. Command-Line
  9. ------------
  10. * :manual:`cmake(1)` :option:`-E cat <cmake-E cat>` can now print the standard
  11. input by passing the ``-`` argument.
  12. Generators
  13. ----------
  14. * :ref:`Visual Studio Generators` now support selecting between the
  15. Intel oneAPI Fortran compiler (``ifx``) and the Intel classic Fortran
  16. compiler (``ifort``) using a ``fortran=`` field in
  17. :variable:`CMAKE_GENERATOR_TOOLSET`.
  18. File-Based API
  19. --------------
  20. * The :manual:`cmake-file-api(7)` "codemodel" version 2 ``version`` field has
  21. been updated to 2.7.
  22. * The :manual:`cmake-file-api(7)` "codemodel" version 2 "target" object gained
  23. a new "launchers" field.
  24. Compilers
  25. ---------
  26. * The LLVM/Clang GNU-like frontend on Windows (``clang++``) may now be used
  27. to compile ``CUDA`` language sources.
  28. * Compilers targeting the GNU ABI on Windows (MinGW) may now be used to
  29. compile Objective C (``OBJC``) and Objective C++ (``OBJCXX``). These
  30. include GNU compilers (``gcc`` and ``g++``) and the LLVM/Clang GNU-like
  31. frontends (``clang`` and ``clang++``).
  32. * TI Clang-based compilers are now supported with
  33. :variable:`compiler id <CMAKE_<LANG>_COMPILER_ID>` ``TIClang``.
  34. Commands
  35. --------
  36. * The :ref:`add_custom_command(TARGET) <add_custom_command(TARGET)>`
  37. signature now supports adding build events through :ref:`Alias Targets`.
  38. * The :command:`cmake_language(EXIT)` sub-command was added to terminate
  39. :option:`cmake -P` scripts with a specified exit code.
  40. * The :command:`export(SETUP)` sub-command was added to configure export sets.
  41. Its ``TARGET`` option's ``XCFRAMEWORK_LOCATION`` setting specifies the
  42. location of a ``.xcframework`` that can be substituted for an installed
  43. target.
  44. * The :command:`if` command gained new tests ``IS_READABLE``, ``IS_WRITABLE``
  45. and ``IS_EXECUTABLE`` to check file or directory permissions.
  46. * The :command:`try_compile` and :command:`try_run` commands gained a
  47. ``LINKER_LANGUAGE`` option to specify the :prop_tgt:`LINKER_LANGUAGE`
  48. target property in the generated test project.
  49. Variables
  50. ---------
  51. * The :envvar:`CMAKE_INSTALL_PREFIX` environment variable was added to
  52. provide a default value for the :variable:`CMAKE_INSTALL_PREFIX` variable.
  53. * The :variable:`CMAKE_LINKER_TYPE` variable and corresponding
  54. :prop_tgt:`LINKER_TYPE` target property were added to specify
  55. what linker to use with some toolchains.
  56. * The :variable:`CMAKE_<LANG>_COMPILER_LINKER`,
  57. :variable:`CMAKE_<LANG>_COMPILER_LINKER_ID`,
  58. :variable:`CMAKE_<LANG>_COMPILER_LINKER_VERSION` and
  59. :variable:`CMAKE_<LANG>_COMPILER_LINKER_FRONTEND_VARIANT` variables
  60. were added to describe the linker used by the language's link step.
  61. * The :variable:`CMAKE_PROJECT_INCLUDE`,
  62. :variable:`CMAKE_PROJECT_INCLUDE_BEFORE`,
  63. :variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE`, and
  64. :variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE_BEFORE` variables learned
  65. to support a :ref:`semicolon-separated list <CMake Language Lists>` of
  66. CMake language files to be included sequentially. These variables can also
  67. reference module names to be found in :variable:`CMAKE_MODULE_PATH` or
  68. builtin to CMake.
  69. * The :variable:`CMAKE_SKIP_TEST_ALL_DEPENDENCY` variable was added
  70. to control whether the ``test`` (or ``RUN_TESTS``) buildsystem
  71. target depends on the ``all`` (or ``ALL_BUILD``) target.
  72. * A :variable:`CMAKE_TEST_LAUNCHER` variable and corresponding
  73. :prop_tgt:`TEST_LAUNCHER` target property were added to specify
  74. a launcher to be used by executable targets when invoked by
  75. tests added by the :command:`add_test` command.
  76. Properties
  77. ----------
  78. * The :prop_tgt:`CROSSCOMPILING_EMULATOR` target property now
  79. supports :manual:`generator expressions <cmake-generator-expressions(7)>`.
  80. * The :prop_tgt:`UNITY_BUILD` target property now supports the
  81. Objective C (``OBJC``) and Objective C++ (``OBJCXX``) languages.
  82. * The :prop_tgt:`XCODE_EMBED_XPC_SERVICES <XCODE_EMBED_<type>>` target property
  83. was added to tell the :generator:`Xcode` generator what targets to put in
  84. the ``Embed XPC Resources`` build phase.
  85. Modules
  86. -------
  87. * The :module:`CMakePackageConfigHelpers` module gained new
  88. :command:`generate_apple_platform_selection_file` and
  89. :command:`generate_apple_architecture_selection_file` functions, which can
  90. be used to generate a file that includes another Apple-platform-specific
  91. file or the includes an architecture-specific implementation of a package
  92. for an Apple platform, respectively.
  93. * The :module:`FindOpenGL` module learned to find a GLU include
  94. directory different than the GL include directory. A new
  95. ``OPENGL_INCLUDE_DIRS`` result variable provides all include
  96. directories.
  97. CTest
  98. -----
  99. * :manual:`ctest(1)` gained a :option:`--http-header <ctest --http-header>`
  100. option to add custom headers on submission to CDash.
  101. * :manual:`ctest(1)` gained the :option:`--tests-from-file <ctest
  102. --tests-from-file>` and :option:`--exclude-from-file <ctest
  103. --exclude-from-file>` options to run or exclude tests named in a file.
  104. * :manual:`ctest(1)` now supports :ref:`job server integration
  105. <ctest-job-server-integration>` on POSIX systems.
  106. * The :option:`ctest -j` option may now be given without a value to let
  107. ctest choose a default level of parallelism, or with ``0`` to let ctest
  108. use unbounded parallelism. The corresponding :envvar:`CTEST_PARALLEL_LEVEL`
  109. environment variable, if set to the empty string, is now equivalent to
  110. passing ``-j`` with no value.
  111. * The :command:`ctest_test` command gained options
  112. ``INCLUDE_FROM_FILE`` and ``EXCLUDE_FROM_FILE`` to run or exclude
  113. tests named in a file.
  114. CPack
  115. -----
  116. * The :cpack_gen:`CPack DEB Generator` :variable:`CPACK_DEBIAN_FILE_NAME`
  117. variable may now be set without any suffix, and the ``.deb`` suffix
  118. will be added automatically.
  119. * The :cpack_gen:`CPack RPM Generator` :variable:`CPACK_RPM_FILE_NAME`
  120. variable may now be set without any suffix, and the ``.rpm`` suffix
  121. will be added automatically.
  122. * The :cpack_gen:`CPack WIX Generator` gained a new variable,
  123. :variable:`CPACK_WIX_INSTALL_SCOPE`, to control the
  124. ``InstallScope`` property of WiX MSI installers.
  125. Other Changes
  126. =============
  127. * CMake learned to de-duplicate libraries on link lines based on linker
  128. capabilities. See policy :policy:`CMP0156`.
  129. * The :command:`add_test` command now honors
  130. :variable:`CMAKE_CROSSCOMPILING_EMULATOR` only when cross-compiling.
  131. See policy :policy:`CMP0158`.
  132. * On Windows, when targeting the MSVC ABI, the :command:`find_library` command
  133. now accepts ``.a`` file names after first considering ``.lib``. This is
  134. symmetric with existing behavior when targeting the GNU ABI, in which the
  135. command accepts ``.lib`` file names after first considering ``.a``.
  136. * On Windows, when targeting the MSVC ABI, the :command:`find_library` command
  137. now considers ``.dll.lib`` file names before ``.lib``. This is the default
  138. suffix for DLL import libraries created by Rust toolchains for the MSVC ABI.
  139. * The :generator:`Ninja` and :generator:`NMake Makefiles` generators now use
  140. the ``-external:I`` flag for system includes when using IntelLLVM as of
  141. version 2021.4. The ``-external:W0`` flag is also used as of version 2022.2.
  142. * The :command:`create_test_sourcelist` command now provides a full path to
  143. the generated driver source file.
  144. * The :variable:`CPACK_PRODUCTBUILD_DOMAINS` variable now defaults to true.
  145. See policy :policy:`CMP0161`.
  146. Updates
  147. =======
  148. Changes made since CMake 3.29.0 include the following.
  149. 3.29.1
  150. ------
  151. * The :variable:`CMAKE_LINKER_TYPE` variable and corresponding
  152. :prop_tgt:`LINKER_TYPE` target property now work with compilers
  153. for the ``Swift`` language.
  154. 3.29.2, 3.29.3, 3.29.4
  155. ----------------------
  156. * These versions made no changes to documented features or interfaces.
  157. Some implementation updates were made to support ecosystem changes
  158. and/or fix regressions.
  159. 3.29.5
  160. ------
  161. * The :cpack_gen:`CPack WIX Generator`'s :variable:`CPACK_WIX_INSTALL_SCOPE`
  162. variable, new in 3.29, now defaults to ``NONE``. This restores
  163. compatibility with behavior of 3.28 and below: without a custom WiX
  164. template, it produces installers that only create start menu and
  165. uninstall entries for the current user, even though they install
  166. for all users.
  167. In 3.29.0 through 3.29.4, ``CPACK_WIX_INSTALL_SCOPE`` defaulted to
  168. ``perMachine``. This created MSI installers that create start menu
  169. and uninstall entries for all users by default. While this behavior
  170. is better on its own, these installers do not cleanly replace existing
  171. installations created with MSI installers produced by 3.28 and below.
  172. 3.29.5 reverts the default for compatibility. Projects may transition
  173. to ``perMachine`` on their own schedule by setting
  174. ``CPACK_WIX_INSTALL_SCOPE``.
  175. 3.29.6, 3.29.7, 3.29.8, 3.29.9
  176. ------------------------------
  177. * These versions made no changes to documented features or interfaces.
  178. Some implementation updates were made to support ecosystem changes
  179. and/or fix regressions.