1CMake 3.6 Release Notes
2***********************
3
4.. only:: html
5
6  .. contents::
7
8Changes made since CMake 3.5 include the following.
9
10New Features
11============
12
13Generators
14----------
15
16* The :generator:`Ninja` generator learned to produce phony targets
17  of the form ``sub/dir/all`` to drive the build of a subdirectory.
18  This is equivalent to ``cd sub/dir; make all`` with
19  :ref:`Makefile Generators`.
20
21* The :generator:`Ninja` generator now includes system header files in build
22  dependencies to ensure correct re-builds when system packages are updated.
23
24* The :generator:`Visual Studio 14 2015` generator learned to support the
25  Clang/C2 toolsets, e.g. with the ``-T v140_clang_3_7`` option.
26  This feature is experimental.
27
28Commands
29--------
30
31* The :command:`add_custom_command` and :command:`add_custom_target` commands
32  learned how to use the :prop_tgt:`CROSSCOMPILING_EMULATOR` executable
33  target property.
34
35* The :command:`install` command learned a new ``EXCLUDE_FROM_ALL`` option
36  to leave installation rules out of the default installation.
37
38* The :command:`list` command gained a ``FILTER`` sub-command to filter
39  list elements by regular expression.
40
41* The :command:`string(TIMESTAMP)` and :command:`file(TIMESTAMP)`
42  commands gained support for the ``%s`` placeholder.  This is
43  the number of seconds since the UNIX Epoch.
44
45Variables
46---------
47
48* A :variable:`CMAKE_DEPENDS_IN_PROJECT_ONLY` variable was introduced
49  to tell :ref:`Makefile Generators` to limit dependency scanning only
50  to files in the project source and build trees.
51
52* A new :variable:`CMAKE_HOST_SOLARIS` variable was introduced to
53  indicate when CMake is running on an Oracle Solaris host.
54
55* A :variable:`CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES` variable was
56  added for use by toolchain files to specify system include directories
57  to be appended to all compiler command lines.
58
59* The :variable:`CMAKE_<LANG>_STANDARD_LIBRARIES` variable is now documented.
60  It is intended for use by toolchain files to specify system libraries to be
61  added to all linker command lines.
62
63* A :variable:`CMAKE_NINJA_OUTPUT_PATH_PREFIX` variable was introduced
64  to tell the :generator:`Ninja` generator to configure the generated
65  ``build.ninja`` file for use as a ``subninja``.
66
67* A :variable:`CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` variable was
68  added for use by toolchain files to specify platform-specific
69  variables that must be propagated by the :command:`try_compile`
70  command into test projects.
71
72* A :variable:`CMAKE_TRY_COMPILE_TARGET_TYPE` variable was added
73  to optionally tell the :command:`try_compile` command to build
74  a static library instead of an executable.  This is useful for
75  cross-compiling toolchains that cannot link binaries without
76  custom flags or scripts.
77
78Properties
79----------
80
81* A :prop_tgt:`DEPLOYMENT_REMOTE_DIRECTORY` target property was introduced
82  to tell the :generator:`Visual Studio 9 2008` and
83  :generator:`Visual Studio 8 2005` generators to generate the "remote
84  directory" for WinCE project deployment and debugger settings.
85
86* A :prop_tgt:`<LANG>_CLANG_TIDY` target property and supporting
87  :variable:`CMAKE_<LANG>_CLANG_TIDY` variable were introduced to tell the
88  :ref:`Makefile Generators` and the :generator:`Ninja` generator to run
89  ``clang-tidy`` along with the compiler for ``C`` and ``CXX`` languages.
90
91* A :prop_test:`TIMEOUT_AFTER_MATCH` test property was introduced to
92  optionally tell CTest to enforce a secondary timeout after matching
93  certain output from a test.
94
95* A :prop_tgt:`VS_CONFIGURATION_TYPE` target property was introduced
96  to specify a custom project file type for :ref:`Visual Studio Generators`
97  supporting VS 2010 and above.
98
99* A :prop_dir:`VS_STARTUP_PROJECT` directory property was introduced
100  to specify for :ref:`Visual Studio Generators` the default startup
101  project for generated solutions (``.sln`` files).
102
103Modules
104-------
105
106* The :module:`CMakePushCheckState` module now pushes/pops/resets the variable
107  ``CMAKE_EXTRA_INCLUDE_FILE`` used in :module:`CheckTypeSize`.
108
109* The :module:`ExternalProject` module leared the ``GIT_SHALLOW 1``
110  option to perform a shallow clone of a Git repository.
111
112* The :module:`ExternalProject` module learned to initialize Git submodules
113  recursively and also to initialize new submodules on updates.  Use the
114  ``GIT_SUBMODULES`` option to restrict which submodules are initialized and
115  updated.
116
117* The :module:`ExternalProject` module leared the ``DOWNLOAD_NO_EXTRACT 1``
118  argument to skip extracting the file that is downloaded (e.g., for
119  self-extracting shell installers or ``.msi`` files).
120
121* The :module:`ExternalProject` module now uses ``TLS_VERIFY`` when fetching
122  from git repositories.
123
124* The :module:`FindBLAS` and :module:`FindLAPACK` modules learned to
125  support `OpenBLAS <http://www.openblas.net>`__.
126
127* The :module:`FindCUDA` module learned to find the ``cublas_device`` library.
128
129* The :module:`FindGTest` module ``gtest_add_tests`` function now causes
130  CMake to automatically re-run when test sources change so that they
131  can be re-scanned.
132
133* The :module:`FindLTTngUST` module was introduced to find the LTTng-UST
134  library.
135
136* The :module:`FindPkgConfig` module learned to optionally create imported
137  targets for the libraries it has found.
138
139* The :module:`FindProtobuf` module learned to provide a ``Protobuf_VERSION``
140  variable and check the version number requested in a :command:`find_package`
141  call.
142
143* The :module:`InstallRequiredSystemLibraries` module learned a new
144  ``CMAKE_INSTALL_UCRT_LIBRARIES`` option to enable app-local deployment
145  of the Windows Universal CRT libraries with Visual Studio 2015.
146
147Platforms
148---------
149
150* The Clang compiler is now supported on CYGWIN.
151
152* Support was added for the Bruce C Compiler with compiler id ``Bruce``.
153
154CTest
155-----
156
157* The :command:`ctest_update` command now looks at the
158  :variable:`CTEST_GIT_INIT_SUBMODULES` variable to determine whether
159  submodules should be updated or not before updating.
160
161* The :command:`ctest_update` command will now synchronize submodules on an
162  update. Updates which add submodules or change a submodule's URL will now be
163  pulled properly.
164
165CPack
166-----
167
168* The :cpack_gen:`CPack DEB Generator` learned how to handle ``$ORIGIN``
169  in ``CMAKE_INSTALL_RPATH`` when :variable:`CPACK_DEBIAN_PACKAGE_SHLIBDEPS`
170  is used for dependency auto detection.
171
172* The :cpack_gen:`CPack DEB Generator` learned how to generate
173  ``DEBIAN/shlibs`` control file when package contains shared libraries.
174
175* The :cpack_gen:`CPack DEB Generator` learned how to generate
176  ``DEBIAN/postinst`` and ``DEBIAN/postrm`` files if the package installs
177  libraries in ldconfig-controlled locations (e.g. ``/lib/``, ``/usr/lib/``).
178
179* The :cpack_gen:`CPack DEB Generator` learned how to generate dependencies
180  between Debian packages if multi-component setup is used and
181  :variable:`CPACK_COMPONENT_<compName>_DEPENDS` variables are set.
182  For backward compatibility this feature is disabled by default.
183  See :variable:`CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS`.
184
185* The :cpack_gen:`CPack DEB Generator` learned how to set custom package
186  file names including how to generate properly-named Debian packages::
187
188    <PackageName>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb
189
190  For backward compatibility this feature is disabled by default. See
191  :variable:`CPACK_DEBIAN_FILE_NAME` and
192  :variable:`CPACK_DEBIAN_<COMPONENT>_FILE_NAME`.
193
194* The :cpack_gen:`CPack DEB Generator` learned how to set the package
195  release number (``DebianRevisionNumber`` in package file name when
196  used in combination with ``DEB-DEFAULT`` value set by
197  :variable:`CPACK_DEBIAN_FILE_NAME`).
198  See :variable:`CPACK_DEBIAN_PACKAGE_RELEASE`.
199
200* The :cpack_gen:`CPack DEB Generator` learned how to set the package
201  architecture per-component.
202  See :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_ARCHITECTURE`.
203
204* The :cpack_gen:`CPack DragNDrop Generator` learned a new option to skip the
205  ``/Applications`` symlink.
206  See the :variable:`CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK` variable.
207
208* The :module:`CPackIFW` module gained a new
209  :command:`cpack_ifw_update_repository` command to update a QtIFW-specific
210  repository from a remote repository.
211
212* The :cpack_gen:`CPack RPM Generator` learned how to set RPM ``dist`` tag
213  as part of RPM ``Release:`` tag when enabled (mandatory on some Linux
214  distributions for e.g. on Fedora).
215  See :variable:`CPACK_RPM_PACKAGE_RELEASE_DIST`.
216
217* The :cpack_gen:`CPack RPM Generator` learned how to set default values
218  for owning user/group and file/directory permissions of package content.
219  See :variable:`CPACK_RPM_DEFAULT_USER`, :variable:`CPACK_RPM_DEFAULT_GROUP`,
220  :variable:`CPACK_RPM_DEFAULT_FILE_PERMISSIONS`,
221  :variable:`CPACK_RPM_DEFAULT_DIR_PERMISSIONS` and their per component
222  counterparts.
223
224* The :cpack_gen:`CPack RPM Generator` learned how to set user defined
225  package file names, how to specify that rpmbuild should decide on file
226  name format as well as handling of multiple rpm packages generated by a
227  single user defined spec file.
228  See :variable:`CPACK_RPM_PACKAGE_NAME` and
229  :variable:`CPACK_RPM_<component>_PACKAGE_NAME`.
230
231* The :cpack_gen:`CPack RPM Generator` learned how to correctly handle symlinks
232  that are pointing outside generated packages.
233
234Other
235-----
236
237* The :manual:`Compile Features <cmake-compile-features(7)>` functionality
238  is now aware of features supported by Intel C++ compilers versions 12.1
239  through 16.0 on UNIX platforms.
240
241Deprecated and Removed Features
242===============================
243
244* The :module:`CMakeForceCompiler` module and its macros are now deprecated.
245  See module documentation for an explanation.
246
247* The :command:`find_library`, :command:`find_path`, and :command:`find_file`
248  commands no longer search in installation prefixes derived from the ``PATH``
249  environment variable on non-Windows platforms.  This behavior was added in
250  CMake 3.3 to support Windows hosts but has proven problematic on UNIX hosts.
251  Users that keep some ``<prefix>/bin`` directories in the ``PATH`` just for
252  their tools do not necessarily want any supporting ``<prefix>/lib``
253  directories searched.  One may set the ``CMAKE_PREFIX_PATH`` environment
254  variable with a :ref:`semicolon-separated list <CMake Language Lists>` of prefixes that are
255  to be searched.
256
257* The :generator:`Visual Studio 7 .NET 2003` generator is now
258  deprecated and will be removed in a future version of CMake.
259
260* The :generator:`Visual Studio 7` generator (for VS .NET 2002) has been
261  removed.  It had been deprecated since CMake 3.3.
262
263* The :generator:`Visual Studio 6` generator has been removed.
264  It had been deprecated since CMake 3.3.
265
266Other Changes
267=============
268
269* The precompiled OS X binary provided on ``cmake.org`` now requires
270  OS X 10.7 or newer.
271
272* On Linux and FreeBSD platforms, when building CMake itself from source and
273  not using a system-provided libcurl, OpenSSL is now used by default if it is
274  found on the system.  This enables SSL/TLS support for commands supporting
275  network communication via ``https``, such as :command:`file(DOWNLOAD)`,
276  :command:`file(UPLOAD)`, and :command:`ctest_submit`.
277
278* The :manual:`cmake(1)` ``--build`` command-line tool now rejects multiple
279  ``--target`` options with an error instead of silently ignoring all but the
280  last one.
281
282* :prop_tgt:`AUTOMOC` now diagnoses name collisions when multiple source
283  files in different directories use ``#include <moc_foo.cpp>`` with the
284  same name (because the generated ``moc_foo.cpp`` files would collide).
285
286* The :module:`FindBISON` module ``BISON_TARGET`` macro now supports
287  special characters by passing the ``VERBATIM`` option to internal
288  :command:`add_custom_command` calls.  This may break clients that
289  added escaping manually to work around the bug.
290
291* The :module:`FindFLEX` module ``FLEX_TARGET`` macro now supports
292  special characters by passing the ``VERBATIM`` option to internal
293  :command:`add_custom_command` calls.  This may break clients that
294  added escaping manually to work around the bug.
295
296* The :module:`FindProtobuf` module input and output variables were all renamed
297  from ``PROTOBUF_`` to ``Protobuf_`` for consistency with other find modules.
298  Input variables of the old case will be honored if provided, and output
299  variables of the old case are always provided.
300
301* The :cpack_gen:`CPack RPM Generator` now supports upper cased component
302  names in per component CPackRPM specific variables.
303  E.g. component named ``foo`` now expects component specific
304  variable to be ``CPACK_RPM_FOO_PACKAGE_NAME`` while before
305  it expected ``CPACK_RPM_foo_PACKAGE_NAME``.
306  Upper cased component name part in variables is compatible
307  with convention used for other CPack variables.
308  For back compatibility old format of variables is still valid
309  and preferred if both versions of variable are set, but the
310  preferred future use is upper cased component names in variables.
311  New variables that will be added to CPackRPM in later versions
312  will only support upper cased component variable format.
313
314* The CPack NSIS generator's configuration file template was fixed to
315  quote the path to the uninstaller tool used by the
316  :variable:`CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL` option.
317  This avoids depending on an insecure Windows feature to run an
318  uninstaller tool with a space in the path.
319