3.13.rst 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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:`FindBoost` module gained a ``Boost_ARCHITECTURE`` option
  99. to specify a Boost architecture-specific library filename fragment.
  100. * The :module:`FindCURL` module learned to find debug and release variants
  101. separately.
  102. * The :module:`FindMatlab` module gained new components ``ENGINE_LIBRARY`` and
  103. ``DATAARRAY_LIBRARY`` to request finding the Matlab C++ Engine and DataArray
  104. libraries respectively.
  105. * The :module:`FindMatlab` module now explicitly exports mexFunction in Visual
  106. Studio.
  107. * The :module:`FindMatlab` module gained a new ``MCC_COMPILER``
  108. component to request finding the Matlab Compiler add-on.
  109. * The :module:`FindPkgConfig` module gained an option to create imported
  110. targets in global scope.
  111. * The :module:`FindPkgConfig` module gained support for ``<`` and ``>``
  112. operators for version checks in addition to the already supported
  113. operators ``>=``, ``<=``, and ``=``.
  114. * Modules :module:`FindPython3`, :module:`FindPython2` and :module:`FindPython`
  115. gain capability to control order of resource lookup on macOS (Framework) and
  116. Windows (Registry).
  117. * The :module:`FindSubversion` module ``Subversion_WC_INFO`` command
  118. gained an ``IGNORE_SVN_FAILURE`` option to suppress failures,
  119. e.g. when the source tree is not under Subversion control.
  120. * The :module:`UseSWIG` module learned to manage target property
  121. :prop_tgt:`INCLUDE_DIRECTORIES` for ``SWIG`` compilation.
  122. CTest
  123. -----
  124. * :manual:`ctest(1)` gained a ``--progress`` option to enable a live
  125. test progress summary when output goes to a terminal.
  126. CPack
  127. -----
  128. * The :cpack_gen:`CPack DEB Generator` learned to split debug symbols into
  129. a corresponding .ddeb package when ``CPACK_DEBIAN_DEBUGINFO_PACKAGE`` is
  130. set.
  131. * The :cpack_gen:`CPack DEB Generator` learned to honor the ``SOURCE_DATE_EPOCH``
  132. environment variable when packaging files. This is useful for generating
  133. reproducible packages.
  134. * CPack gained a new :cpack_gen:`CPack External Generator` which is used to
  135. export the CPack metadata in a format that other software can understand. The
  136. intention of this generator is to allow external packaging software to take
  137. advantage of CPack's features when it may not be possible to use CPack for
  138. the entire packaging process.
  139. Deprecated and Removed Features
  140. ===============================
  141. * An explicit deprecation diagnostic was added for policies ``CMP0055``
  142. through ``CMP0063`` (``CMP0054`` and below were already deprecated).
  143. The :manual:`cmake-policies(7)` manual explains that the OLD behaviors
  144. of all policies are deprecated and that projects should port to the
  145. NEW behaviors.
  146. Other Changes
  147. =============
  148. * The precompiled binaries provided on ``cmake.org`` now include
  149. qthelp-format documentation.
  150. * The :command:`option` command now honors an existing normal variable
  151. of the same name and does nothing instead of possibly creating a cache
  152. entry (or setting its type) and removing the normal variable.
  153. See policy :policy:`CMP0077`.
  154. * The :ref:`Makefile Generators` learned to remove custom command and
  155. custom target byproducts during ``make clean``.
  156. * The :command:`target_sources` command now interprets relative source file
  157. paths as relative to the current source directory. This simplifies
  158. incrementally building up a target's sources from subdirectories. The
  159. :policy:`CMP0076` policy was added to provide backward compatibility with
  160. the old behavior where required.
  161. * The :module:`BundleUtilities` module may no longer be included at configure
  162. time. This was always a bug anyway. See policy :policy:`CMP0080`.
  163. * The :module:`UseSWIG` module has changed strategy for target naming.
  164. See policy :policy:`CMP0078`.
  165. * The :prop_tgt:`LINK_DIRECTORIES` target property now expects absolute paths.
  166. See policy :policy:`CMP0081`.
  167. * The CPack generators have been moved into their own separate section
  168. in the documentation, rather than having the documentation in their
  169. internal implementation modules.
  170. These internal implementation modules are also no longer available
  171. to scripts that may have been incorrectly including them, because
  172. they should never have been available in the first place.
  173. Updates
  174. =======
  175. Changes made since CMake 3.13.0 include the following.
  176. 3.13.2
  177. ------
  178. * CMake 3.13.0 included a change to pass compiler implicit include
  179. directories to the ``moc`` tool for :prop_tgt:`AUTOMOC`. This has
  180. been reverted due to regressing existing builds and will need
  181. further investigation before being re-introduced in a later release.