summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
Diffstat (limited to 'Help')
-rw-r--r--Help/command/try_compile.rst32
-rw-r--r--Help/manual/cmake-policies.7.rst8
-rw-r--r--Help/manual/cmake-qt.7.rst23
-rw-r--r--Help/policy/CMP0067.rst34
-rw-r--r--Help/prop_gbl/AUTOGEN_TARGETS_FOLDER.rst2
-rw-r--r--Help/prop_gbl/AUTOMOC_TARGETS_FOLDER.rst2
-rw-r--r--Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst3
-rw-r--r--Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst8
-rw-r--r--Help/prop_tgt/AUTOMOC.rst13
-rw-r--r--Help/prop_tgt/CXX_STANDARD.rst2
-rw-r--r--Help/release/dev/FindOpenGL-imported-targets.rst5
-rw-r--r--Help/release/dev/QtAutogen_Contain.rst10
-rw-r--r--Help/release/dev/cpack-rpm-user-file-list-with-multiple-directives.rst6
-rw-r--r--Help/release/dev/features-c++17.rst6
-rw-r--r--Help/release/dev/try_compile-lang-std.rst9
-rw-r--r--Help/release/dev/wix-reg-install-dir.rst6
-rw-r--r--Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst2
17 files changed, 148 insertions, 23 deletions
diff --git a/Help/command/try_compile.rst b/Help/command/try_compile.rst
index 7830deb..cde3776 100644
--- a/Help/command/try_compile.rst
+++ b/Help/command/try_compile.rst
@@ -35,7 +35,11 @@ Try Compiling Source Files
[COMPILE_DEFINITIONS <defs>...]
[LINK_LIBRARIES <libs>...]
[OUTPUT_VARIABLE <var>]
- [COPY_FILE <fileName> [COPY_FILE_ERROR <var>]])
+ [COPY_FILE <fileName> [COPY_FILE_ERROR <var>]]
+ [<LANG>_STANDARD <std>]
+ [<LANG>_STANDARD_REQUIRED <bool>]
+ [<LANG>_EXTENSIONS <bool>]
+ )
Try building an executable from one or more source files. The success or
failure of the ``try_compile``, i.e. ``TRUE`` or ``FALSE`` respectively, is
@@ -82,6 +86,18 @@ The options are:
``OUTPUT_VARIABLE <var>``
Store the output from the build process the given variable.
+``<LANG>_STANDARD <std>``
+ Specify the :prop_tgt:`C_STANDARD` or :prop_tgt:`CXX_STANDARD`
+ target property of the generated project.
+
+``<LANG>_STANDARD_REQUIRED <bool>``
+ Specify the :prop_tgt:`C_STANDARD_REQUIRED` or
+ :prop_tgt:`CXX_STANDARD_REQUIRED` target property of the generated project.
+
+``<LANG>_EXTENSIONS <bool>``
+ Specify the :prop_tgt:`C_EXTENSIONS` or :prop_tgt:`CXX_EXTENSIONS`
+ target property of the generated project.
+
In this version all files in ``<bindir>/CMakeFiles/CMakeTmp`` will be
cleaned automatically. For debugging, ``--debug-trycompile`` can be
passed to ``cmake`` to avoid this clean. However, multiple sequential
@@ -119,3 +135,17 @@ the type of target used for the source file signature.
Set the :variable:`CMAKE_TRY_COMPILE_PLATFORM_VARIABLES` variable to specify
variables that must be propagated into the test project. This variable is
meant for use only in toolchain files.
+
+If :policy:`CMP0067` is set to ``NEW``, or any of the ``<LANG>_STANDARD``,
+``<LANG>_STANDARD_REQUIRED``, or ``<LANG>_EXTENSIONS`` options are used,
+then the language standard variables are honored:
+
+* :variable:`CMAKE_C_STANDARD`
+* :variable:`CMAKE_C_STANDARD_REQUIRED`
+* :variable:`CMAKE_C_EXTENSIONS`
+* :variable:`CMAKE_CXX_STANDARD`
+* :variable:`CMAKE_CXX_STANDARD_REQUIRED`
+* :variable:`CMAKE_CXX_EXTENSIONS`
+
+Their values are used to set the corresponding target properties in
+the generated project (unless overridden by an explicit option).
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index 0cfe983..3266958 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -51,6 +51,14 @@ The :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable may also be used
to determine whether to report an error on use of deprecated macros or
functions.
+Policies Introduced by CMake 3.8
+================================
+
+.. toctree::
+ :maxdepth: 1
+
+ CMP0067: Honor language standard in try_compile() source-file signature. </policy/CMP0067>
+
Policies Introduced by CMake 3.7
================================
diff --git a/Help/manual/cmake-qt.7.rst b/Help/manual/cmake-qt.7.rst
index 7827065..80b0f49 100644
--- a/Help/manual/cmake-qt.7.rst
+++ b/Help/manual/cmake-qt.7.rst
@@ -22,12 +22,11 @@ Qt 4 and Qt 5 may be used together in the same
.. code-block:: cmake
- cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
+ cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR)
project(Qt4And5)
set(CMAKE_AUTOMOC ON)
- set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(Qt5 COMPONENTS Widgets DBus REQUIRED)
add_executable(publisher publisher.cpp)
@@ -73,9 +72,12 @@ The ``moc`` command line will consume the :prop_tgt:`COMPILE_DEFINITIONS` and
:prop_tgt:`INCLUDE_DIRECTORIES` target properties from the target it is being
invoked for, and for the appropriate build configuration.
-Generated ``moc_*.cpp`` and ``*.moc`` files are placed in the build directory
-so it is convenient to set the :variable:`CMAKE_INCLUDE_CURRENT_DIR`
-variable. The :prop_tgt:`AUTOMOC` target property may be pre-set for all
+The generated ``moc_*.cpp`` and ``*.moc`` files are placed in the
+``<CMAKE_CURRENT_BINARY_DIR>/<TARGETNAME>_autogen/include`` directory which is
+automatically added to the target's :prop_tgt:`INCLUDE_DIRECTORIES`.
+(This differs from CMake 3.7 and below; see their documentation for details.)
+
+The :prop_tgt:`AUTOMOC` target property may be pre-set for all
following targets by setting the :variable:`CMAKE_AUTOMOC` variable. The
:prop_tgt:`AUTOMOC_MOC_OPTIONS` target property may be populated to set
options to pass to ``moc``. The :variable:`CMAKE_AUTOMOC_MOC_OPTIONS`
@@ -94,10 +96,13 @@ If a preprocessor ``#include`` directive is found which matches
``ui_<basename>.h``, and a ``<basename>.ui`` file exists, then ``uic`` will
be executed to generate the appropriate file.
-Generated ``ui_*.h`` files are placed in the build directory so it is
-convenient to set the :variable:`CMAKE_INCLUDE_CURRENT_DIR` variable. The
-:prop_tgt:`AUTOUIC` target property may be pre-set for all following targets
-by setting the :variable:`CMAKE_AUTOUIC` variable. The
+The generated generated ``ui_*.h`` files are placed in the
+``<CMAKE_CURRENT_BINARY_DIR>/<TARGETNAME>_autogen/include`` directory which is
+automatically added to the target's :prop_tgt:`INCLUDE_DIRECTORIES`.
+(This differs from CMake 3.7 and below; see their documentation for details.)
+
+The :prop_tgt:`AUTOUIC` target property may be pre-set for all following
+targets by setting the :variable:`CMAKE_AUTOUIC` variable. The
:prop_tgt:`AUTOUIC_OPTIONS` target property may be populated to set options
to pass to ``uic``. The :variable:`CMAKE_AUTOUIC_OPTIONS` variable may be
populated to pre-set the options for all following targets. The
diff --git a/Help/policy/CMP0067.rst b/Help/policy/CMP0067.rst
new file mode 100644
index 0000000..d52ba7f
--- /dev/null
+++ b/Help/policy/CMP0067.rst
@@ -0,0 +1,34 @@
+CMP0067
+-------
+
+Honor language standard in :command:`try_compile` source-file signature.
+
+The :command:`try_compile` source file signature is intended to allow
+callers to check whether they will be able to compile a given source file
+with the current toolchain. In order to match compiler behavior, any
+language standard mode should match. However, CMake 3.7 and below did not
+do this. CMake 3.8 and above prefer to honor the language standard settings
+for ``C`` and ``CXX`` (C++) using the values of the variables:
+
+* :variable:`CMAKE_C_STANDARD`
+* :variable:`CMAKE_C_STANDARD_REQUIRED`
+* :variable:`CMAKE_C_EXTENSIONS`
+* :variable:`CMAKE_CXX_STANDARD`
+* :variable:`CMAKE_CXX_STANDARD_REQUIRED`
+* :variable:`CMAKE_CXX_EXTENSIONS`
+
+This policy provides compatibility for projects that do not expect
+the language standard settings to be used automatically.
+
+The ``OLD`` behavior of this policy is to ignore language standard
+setting variables when generating the ``try_compile`` test project.
+The ``NEW`` behavior of this policy is to honor language standard
+setting variables.
+
+This policy was introduced in CMake version 3.8. Unlike most policies,
+CMake version |release| does *not* warn by default when this policy
+is not set and simply uses OLD behavior. See documentation of the
+:variable:`CMAKE_POLICY_WARNING_CMP0067 <CMAKE_POLICY_WARNING_CMP<NNNN>>`
+variable to control the warning.
+
+.. include:: DEPRECATED.txt
diff --git a/Help/prop_gbl/AUTOGEN_TARGETS_FOLDER.rst b/Help/prop_gbl/AUTOGEN_TARGETS_FOLDER.rst
index 5a69ef3..fae5626 100644
--- a/Help/prop_gbl/AUTOGEN_TARGETS_FOLDER.rst
+++ b/Help/prop_gbl/AUTOGEN_TARGETS_FOLDER.rst
@@ -1,7 +1,7 @@
AUTOGEN_TARGETS_FOLDER
----------------------
-Name of :prop_tgt:`FOLDER` for ``*_automoc`` targets that are added automatically by
+Name of :prop_tgt:`FOLDER` for ``*_autogen`` targets that are added automatically by
CMake for targets for which :prop_tgt:`AUTOMOC` is enabled.
If not set, CMake uses the :prop_tgt:`FOLDER` property of the parent target as a
diff --git a/Help/prop_gbl/AUTOMOC_TARGETS_FOLDER.rst b/Help/prop_gbl/AUTOMOC_TARGETS_FOLDER.rst
index 671f86a..17666e4 100644
--- a/Help/prop_gbl/AUTOMOC_TARGETS_FOLDER.rst
+++ b/Help/prop_gbl/AUTOMOC_TARGETS_FOLDER.rst
@@ -1,7 +1,7 @@
AUTOMOC_TARGETS_FOLDER
----------------------
-Name of :prop_tgt:`FOLDER` for ``*_automoc`` targets that are added automatically by
+Name of :prop_tgt:`FOLDER` for ``*_autogen`` targets that are added automatically by
CMake for targets for which :prop_tgt:`AUTOMOC` is enabled.
This property is obsolete. Use :prop_gbl:`AUTOGEN_TARGETS_FOLDER` instead.
diff --git a/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst b/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst
index 00a5104..2ad8157 100644
--- a/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst
+++ b/Help/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.rst
@@ -23,6 +23,9 @@ The features known to this version of CMake are:
``cxx_std_14``
Compiler mode is aware of C++ 14.
+``cxx_std_17``
+ Compiler mode is aware of C++ 17.
+
``cxx_aggregate_default_initializers``
Aggregate default initializers, as defined in N3605_.
diff --git a/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst b/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst
index 5063244..f522c6b 100644
--- a/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst
+++ b/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst
@@ -1,16 +1,16 @@
AUTOGEN_TARGET_DEPENDS
----------------------
-Target dependencies of the corresponding ``_automoc`` target.
+Target dependencies of the corresponding ``_autogen`` target.
Targets which have their :prop_tgt:`AUTOMOC` target ``ON`` have a
-corresponding ``_automoc`` target which is used to autogenerate generate moc
-files. As this ``_automoc`` target is created at generate-time, it is not
+corresponding ``_autogen`` target which is used to autogenerate generate moc
+files. As this ``_autogen`` target is created at generate-time, it is not
possible to define dependencies of it, such as to create inputs for the ``moc``
executable.
The ``AUTOGEN_TARGET_DEPENDS`` target property can be set instead to a list of
-dependencies for the ``_automoc`` target. The buildsystem will be generated to
+dependencies for the ``_autogen`` target. The buildsystem will be generated to
depend on its contents.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
diff --git a/Help/prop_tgt/AUTOMOC.rst b/Help/prop_tgt/AUTOMOC.rst
index 8143ba9..30a39b1 100644
--- a/Help/prop_tgt/AUTOMOC.rst
+++ b/Help/prop_tgt/AUTOMOC.rst
@@ -15,11 +15,12 @@ source files at build time and invoke moc accordingly.
the ``Q_OBJECT`` class declaration is expected in the header, and
``moc`` is run on the header file. A ``moc_foo.cpp`` file will be
generated from the source's header into the
- :variable:`CMAKE_CURRENT_BINARY_DIR` directory. This allows the
- compiler to find the included ``moc_foo.cpp`` file regardless of the
- location the original source. However, if multiple source files
- in different directories do this then their generated moc files would
- collide. In this case a diagnostic will be issued.
+ ``<CMAKE_CURRENT_BINARY_DIR>/<TARGETNAME>_autogen/include``
+ directory which is automatically added to the target's
+ :prop_tgt:`INCLUDE_DIRECTORIES`. This allows the compiler to find the
+ included ``moc_foo.cpp`` file regardless of the location the original source.
+ However, if multiple source files in different directories do this then their
+ generated moc files would collide. In this case a diagnostic will be issued.
* If an ``#include`` statement like ``#include "foo.moc"`` is found,
then a ``Q_OBJECT`` is expected in the current source file and ``moc``
@@ -30,7 +31,7 @@ source files at build time and invoke moc accordingly.
alternative extensions, such as ``hpp``, ``hxx`` etc when searching
for headers. The resulting moc files, which are not included as shown
above in any of the source files are included in a generated
- ``<targetname>_automoc.cpp`` file, which is compiled as part of the
+ ``moc_compilation.cpp`` file, which is compiled as part of the
target.
This property is initialized by the value of the :variable:`CMAKE_AUTOMOC`
diff --git a/Help/prop_tgt/CXX_STANDARD.rst b/Help/prop_tgt/CXX_STANDARD.rst
index 5b186c1..30a612d 100644
--- a/Help/prop_tgt/CXX_STANDARD.rst
+++ b/Help/prop_tgt/CXX_STANDARD.rst
@@ -8,7 +8,7 @@ to build this target. For some compilers, this results in adding a
flag such as ``-std=gnu++11`` to the compile line. For compilers that
have no notion of a standard level, such as MSVC, this has no effect.
-Supported values are ``98``, ``11`` and ``14``.
+Supported values are ``98``, ``11``, ``14``, and ``17``.
If the value requested does not result in a compile flag being added for
the compiler in use, a previous standard flag will be added instead. This
diff --git a/Help/release/dev/FindOpenGL-imported-targets.rst b/Help/release/dev/FindOpenGL-imported-targets.rst
new file mode 100644
index 0000000..79e3cb0
--- /dev/null
+++ b/Help/release/dev/FindOpenGL-imported-targets.rst
@@ -0,0 +1,5 @@
+FindOpenGL-imported-targets
+---------------------------
+
+* The :module:`FindOpenGL` module now provides imported targets
+ ``OpenGL::GL`` and ``OpenGL::GLU`` when the libraries are found.
diff --git a/Help/release/dev/QtAutogen_Contain.rst b/Help/release/dev/QtAutogen_Contain.rst
new file mode 100644
index 0000000..182233b
--- /dev/null
+++ b/Help/release/dev/QtAutogen_Contain.rst
@@ -0,0 +1,10 @@
+QtAutogen_Contain
+-----------------
+
+* When using AUTOMOC or AUTOUIC, generated
+ ``moc_*``, ``*.moc`` and ``ui_*`` are placed in the
+ ``<CMAKE_CURRENT_BINARY_DIR>/<TARGETNAME>_autogen/include`` directory which
+ is automatically added to the target's :prop_tgt:`INCLUDE_DIRECTORIES`.
+ It is therefore not necessary anymore to have
+ :variable:`CMAKE_CURRENT_BINARY_DIR` in the target's
+ :prop_tgt:`INCLUDE_DIRECTORIES`.
diff --git a/Help/release/dev/cpack-rpm-user-file-list-with-multiple-directives.rst b/Help/release/dev/cpack-rpm-user-file-list-with-multiple-directives.rst
new file mode 100644
index 0000000..ad0154d
--- /dev/null
+++ b/Help/release/dev/cpack-rpm-user-file-list-with-multiple-directives.rst
@@ -0,0 +1,6 @@
+cpack-rpm-user-file-list-with-multiple-directives
+-------------------------------------------------
+
+* The :module:`CPackRPM` module learned to support
+ multiple directives per file when using
+ :variable:`CPACK_RPM_USER_FILELIST` variable.
diff --git a/Help/release/dev/features-c++17.rst b/Help/release/dev/features-c++17.rst
new file mode 100644
index 0000000..9c28ddf
--- /dev/null
+++ b/Help/release/dev/features-c++17.rst
@@ -0,0 +1,6 @@
+features-c++17
+--------------
+
+* The :manual:`Compile Features <cmake-compile-features(7)>` functionality
+ is now aware of C++ 17. No specific features are yet enumerated besides
+ the ``cxx_std_17`` meta-feature.
diff --git a/Help/release/dev/try_compile-lang-std.rst b/Help/release/dev/try_compile-lang-std.rst
new file mode 100644
index 0000000..849cecc
--- /dev/null
+++ b/Help/release/dev/try_compile-lang-std.rst
@@ -0,0 +1,9 @@
+try_compile-lang-std
+--------------------
+
+* The :command:`try_compile` command source file signature gained new options
+ to specify the language standard to use in the generated test project.
+
+* The :command:`try_compile` command source file signature now honors
+ language standard variables like :variable:`CMAKE_CXX_STANDARD`.
+ See policy :policy:`CMP0067`.
diff --git a/Help/release/dev/wix-reg-install-dir.rst b/Help/release/dev/wix-reg-install-dir.rst
new file mode 100644
index 0000000..961fad2
--- /dev/null
+++ b/Help/release/dev/wix-reg-install-dir.rst
@@ -0,0 +1,6 @@
+wix-reg-install-dir
+-------------------
+
+* The precompiled Windows binary MSI package provided on ``cmake.org`` now
+ records the installation directory in the Windows Registry under the key
+ ``HKLM\Software\Kitware\CMake`` with a value named ``InstallDir``.
diff --git a/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst b/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst
index 36cf75f..aa23b65 100644
--- a/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst
+++ b/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst
@@ -17,6 +17,8 @@ warn by default:
policy :policy:`CMP0065`.
* ``CMAKE_POLICY_WARNING_CMP0066`` controls the warning for
policy :policy:`CMP0066`.
+* ``CMAKE_POLICY_WARNING_CMP0067`` controls the warning for
+ policy :policy:`CMP0067`.
This variable should not be set by a project in CMake code. Project
developers running CMake may set this variable in their cache to