3.13.rst 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. CMake 3.13 Release Notes
  2. ************************
  3. .. only:: html
  4. .. contents::
  5. Changes made since CMake 3.12 include the following.
  6. New Features
  7. ============
  8. Generators
  9. ----------
  10. * The :ref:`Visual Studio Generators` for VS 2010 and above learned to
  11. support the :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION` target property
  12. and supporting :module:`CheckIPOSupported` module.
  13. * The :generator:`Xcode` generator learned to configure more Xcode Scheme
  14. fields. See the :variable:`CMAKE_XCODE_GENERATE_SCHEME` variable.
  15. * The :generator:`Green Hills MULTI` generator has been updated:
  16. - Added support for architecture selection through
  17. :variable:`CMAKE_GENERATOR_PLATFORM`:
  18. e.g. ``arm``, ``ppc``, and ``86``.
  19. - Added support for toolset selection through
  20. :variable:`CMAKE_GENERATOR_TOOLSET`,
  21. e.g. ``comp_201205``, ``comp_201510``, ``comp_201722_beta``.
  22. - Added support for platform selection through ``GHS_TARGET_PLATFORM``,
  23. e.g. ``integrity``, ``linux``, ``standalone``, etc.
  24. - No longer checks that ``arm`` based compilers are installed but ensures
  25. that the correct ``gbuild.exe`` exists.
  26. - No longer hard-codes ARM files, BSP, toolset, or OS locations.
  27. Command-Line
  28. ------------
  29. * The :manual:`cmake(1)` command gained the ``-S <source_dir>``
  30. command line option to specify the location of the source directory.
  31. This option can be used independently of ``-B``.
  32. * The :manual:`cmake(1)` command gained the ``-B <build_dir>``
  33. command line option to specify the location of the build directory.
  34. This option can be used independently of ``-S``.
  35. * The :manual:`cmake(1)` ``-E create_symlink`` command can now be used
  36. on Windows.
  37. Commands
  38. --------
  39. * The :command:`add_custom_command` and :command:`add_custom_target` commands
  40. learned to support generator expressions in ``WORKING_DIRECTORY`` options.
  41. * The :command:`add_link_options` command was created to add link
  42. options in the current directory.
  43. * The :command:`install(TARGETS)` command learned to install targets
  44. created outside the current directory.
  45. * The :command:`link_directories` command gained options to control
  46. insertion position.
  47. * The :command:`list(SORT)` command gained options to control the
  48. comparison operation used to order the entries.
  49. * The :command:`math` command gained options for hexadecimal.
  50. * The :command:`target_link_directories` command was created to
  51. specify link directories for targets and their dependents.
  52. * The :command:`target_link_options` command was created to
  53. specify link options for targets and their dependents.
  54. * The :command:`target_link_libraries` command may now be called
  55. to modify targets created outside the current directory.
  56. See policy :policy:`CMP0079`.
  57. Variables
  58. ---------
  59. * A :variable:`CMAKE_AUTOGEN_VERBOSE` variable was added to optionally
  60. increase the verbosity of :prop_tgt:`AUTOMOC`, :prop_tgt:`AUTOUIC`
  61. and :prop_tgt:`AUTORCC` from within CMake project code.
  62. * A :variable:`CMAKE_VS_GLOBALS` variable was added to initialize
  63. :prop_tgt:`VS_GLOBAL_<variable>` target properties on targets as
  64. they are created.
  65. Properties
  66. ----------
  67. * The :prop_tgt:`DEPLOYMENT_ADDITIONAL_FILES` target property was
  68. added to tell the :generator:`Visual Studio 9 2008` generator
  69. to specify additional files for deployment to WinCE devices
  70. for remote debugging.
  71. * The :prop_tgt:`INTERFACE_LINK_DEPENDS` target property was created
  72. to specify transitive link dependencies on files.
  73. * The :prop_tgt:`LINK_DEPENDS` target property learned to support
  74. :manual:`generator expressions <cmake-generator-expressions(7)>`.
  75. * :prop_tgt:`LINK_DIRECTORIES` and :prop_tgt:`INTERFACE_LINK_DIRECTORIES`
  76. target properties were added to collect link directories for a target
  77. and its dependents. Use the :command:`target_link_directories` command
  78. to set them.
  79. * :prop_tgt:`LINK_OPTIONS` and :prop_tgt:`INTERFACE_LINK_OPTIONS` target
  80. properties were added to collect link options for a target and its
  81. dependents. Use the :command:`target_link_options` command to set them.
  82. * A :prop_dir:`LINK_OPTIONS` directory property was added to collect
  83. link options for targets created under the current directory.
  84. Use the :command:`add_link_options` command to set it.
  85. * A :prop_tgt:`STATIC_LIBRARY_OPTIONS` target property was created
  86. to specify archiver options to use when creating static libraries.
  87. * A :prop_tgt:`VS_DEBUGGER_COMMAND_ARGUMENTS` target property was created to
  88. set the debugging command line arguments with
  89. :ref:`Visual Studio Generators` for VS 2010 and above.
  90. * A :prop_tgt:`VS_DEBUGGER_ENVIRONMENT` target property was created to
  91. set the debugging environment with
  92. :ref:`Visual Studio Generators` for VS 2010 and above.
  93. * The :prop_tgt:`VS_DEBUGGER_COMMAND` and
  94. :prop_tgt:`VS_DEBUGGER_WORKING_DIRECTORY` target properties
  95. now support generator expressions.
  96. Modules
  97. -------
  98. * The :module:`FindCURL` module learned to find debug and release variants
  99. separately.
  100. * The :module:`FindMatlab` module gained new components ``ENGINE_LIBRARY`` and
  101. ``DATAARRAY_LIBRARY`` to request finding the Matlab C++ Engine and DataArray
  102. libraries respectively.
  103. * The :module:`FindMatlab` module now explicitly exports mexFunction in Visual
  104. Studio.
  105. * The :module:`FindMatlab` module gained a new ``MCC_COMPILER``
  106. component to request finding the Matlab Compiler add-on.
  107. * The :module:`FindPkgConfig` module gained an option to create imported
  108. targets in global scope.
  109. * The :module:`FindPkgConfig` module gained support for ``<`` and ``>``
  110. operators for version checks in addition to the already supported
  111. operators ``>=``, ``<=``, and ``=``.
  112. * Modules :module:`FindPython3`, :module:`FindPython2` and :module:`FindPython`
  113. gain capability to control order of resource lookup on macOS (Framework) and
  114. Windows (Registry).
  115. * The :module:`FindSubversion` module ``Subversion_WC_INFO`` command
  116. gained an ``IGNORE_SVN_FAILURE`` option to suppress failures,
  117. e.g. when the source tree is not under Subversion control.
  118. * The :module:`UseSWIG` module learned to manage target property
  119. :prop_tgt:`INCLUDE_DIRECTORIES` for ``SWIG`` compilation.
  120. CTest
  121. -----
  122. * :manual:`ctest(1)` gained a ``--progress`` option to enable a live
  123. test progress summary when output goes to a terminal.
  124. CPack
  125. -----
  126. * The :cpack_gen:`CPack Deb Generator` learned to split debug symbols into
  127. a corresponding .ddeb package when ``CPACK_DEBIAN_DEBUGINFO_PACKAGE`` is
  128. set.
  129. * The :cpack_gen:`CPack Deb Generator` learned to honor the ``SOURCE_DATE_EPOCH``
  130. environment variable when packaging files. This is useful for generating
  131. reproducible packages.
  132. * CPack gained a new :cpack_gen:`CPack External Generator` which is used to
  133. export the CPack metadata in a format that other software can understand. The
  134. intention of this generator is to allow external packaging software to take
  135. advantage of CPack's features when it may not be possible to use CPack for
  136. the entire packaging process.
  137. Deprecated and Removed Features
  138. ===============================
  139. * An explicit deprecation diagnostic was added for policies ``CMP0055``
  140. through ``CMP0063`` (``CMP0054`` and below were already deprecated).
  141. The :manual:`cmake-policies(7)` manual explains that the OLD behaviors
  142. of all policies are deprecated and that projects should port to the
  143. NEW behaviors.
  144. Other Changes
  145. =============
  146. * The :command:`option` command now honors an existing normal variable
  147. of the same name and does nothing instead of possibly creating a cache
  148. entry (or setting its type) and removing the normal variable.
  149. See policy :policy:`CMP0077`.
  150. * The :ref:`Makefile Generators` learned to remove custom command and
  151. custom target byproducts during ``make clean``.
  152. * The :command:`target_sources` command now interprets relative source file
  153. paths as relative to the current source directory. This simplifies
  154. incrementally building up a target's sources from subdirectories. The
  155. :policy:`CMP0076` policy was added to provide backward compatibility with
  156. the old behavior where required.
  157. * The :module:`BundleUtilities` module may no longer be included at configure
  158. time. This was always a bug anyway. See policy :policy:`CMP0080`.
  159. * The :module:`UseSWIG` module has changed strategy for target naming.
  160. See policy :policy:`CMP0078`.
  161. * The :prop_tgt:`LINK_DIRECTORIES` target property now expects absolute paths.
  162. See policy :policy:`CMP0081`.
  163. * The CPack generators have been moved into their own separate section
  164. in the documentation, rather than having the documentation in their
  165. internal implementation modules.
  166. These internal implementation modules are also no longer available
  167. to scripts that may have been incorrectly including them, because
  168. they should never have been available in the first place.