summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
Diffstat (limited to 'Help')
-rw-r--r--Help/command/macro.rst10
-rw-r--r--Help/command/try_compile.rst3
-rw-r--r--Help/manual/cmake-policies.7.rst1
-rw-r--r--Help/manual/cpack.1.rst40
-rw-r--r--Help/policy/CMP0085.rst21
-rw-r--r--Help/release/dev/FindX11-imported-targets.rst32
-rw-r--r--Help/release/dev/genex-in_list-empty-args.rst5
7 files changed, 92 insertions, 20 deletions
diff --git a/Help/command/macro.rst b/Help/command/macro.rst
index 42a99fc..464940f 100644
--- a/Help/command/macro.rst
+++ b/Help/command/macro.rst
@@ -76,16 +76,16 @@ Macro vs Function
The ``macro`` command is very similar to the :command:`function` command.
Nonetheless, there are a few important differences.
-In a function, ``ARGC``, ``ARGC`` and ``ARGV0``, ``ARGV1``, ... are
-true variables in the usual CMake sense. In a macro, they are not.
-They are string replacements much like the C preprocessor would do
+In a function, ``ARGN``, ``ARGC``, ``ARGV`` and ``ARGV0``, ``ARGV1``, ...
+are true variables in the usual CMake sense. In a macro, they are not,
+they are string replacements much like the C preprocessor would do
with a macro. This has a number of consequences, as explained in
the :ref:`Argument Caveats` section below.
Another difference between macros and functions is the control flow.
A function is executed by transfering control from the calling
statement to the function body. A macro is executed as if the macro
-body were pasted in place of the calling statement. This has for
+body were pasted in place of the calling statement. This has the
consequence that a :command:`return()` in a macro body does not
just terminate execution of the macro; rather, control is returned
from the scope of the macro call. To avoid confusion, it is recommended
@@ -96,7 +96,7 @@ to avoid :command:`return()` in macros altogether.
Argument Caveats
^^^^^^^^^^^^^^^^
-Since ``ARGC``, ``ARGC``, ``ARGV0`` etc are not variables,
+Since ``ARGN``, ``ARGC``, ``ARGV``, ``ARGV0`` etc. are not variables,
you will NOT be able to use commands like
.. code-block:: cmake
diff --git a/Help/command/try_compile.rst b/Help/command/try_compile.rst
index 28caa7c..310ad11 100644
--- a/Help/command/try_compile.rst
+++ b/Help/command/try_compile.rst
@@ -127,7 +127,8 @@ default values:
If :policy:`CMP0056` is set to ``NEW``, then
:variable:`CMAKE_EXE_LINKER_FLAGS` is passed in as well.
-The current setting of :policy:`CMP0065` is set in the generated project.
+The current settings of :policy:`CMP0065` and :policy:`CMP0083` are set in the
+generated project.
Set the :variable:`CMAKE_TRY_COMPILE_CONFIGURATION` variable to choose
a build configuration.
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index 7c0fe6d..044a06e 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -57,6 +57,7 @@ Policies Introduced by CMake 3.14
.. toctree::
:maxdepth: 1
+ CMP0085: IN_LIST generator expression handles empty list items. </policy/CMP0085>
CMP0084: The FindQt module does not exist for find_package(). </policy/CMP0084>
CMP0083: Add PIE options when linking executable. </policy/CMP0083>
CMP0082: Install rules from add_subdirectory() are interleaved with those in caller. </policy/CMP0082>
diff --git a/Help/manual/cpack.1.rst b/Help/manual/cpack.1.rst
index 6159d7b..9ddab1e 100644
--- a/Help/manual/cpack.1.rst
+++ b/Help/manual/cpack.1.rst
@@ -13,12 +13,29 @@ Synopsis
Description
===========
-The ``cpack`` executable is the CMake packaging program.
-CMake projects use :command:`install` commands to define the contents of
-packages which can be generated in various formats by this tool.
-The :module:`CPack` module greatly simplifies the creation of the input file
-used by ``cpack``, allowing most aspects of the packaging configuration to be
-controlled directly from the CMake project's own ``CMakeLists.txt`` files.
+The ``cpack`` executable is the CMake packaging program. It generates
+installers and source packages in a variety of formats.
+
+For each installer or package format, ``cpack`` has a specific backend,
+called "generator". A generator is responsible for generating the required
+inputs and invoking the specific package creation tools. These installer
+or package generators are not to be confused with the makefile generators
+of the :manual:`cmake <cmake(1)>` command.
+
+All supported generators are specified in the :manual:`cpack-generators
+<cpack-generators(7)>` manual. The command ``cpack --help`` prints a
+list of generators supported for the target platform. Which of them are
+to be used can be selected through the :variable:`CPACK_GENERATOR` variable
+or through the command-line option ``-G``.
+
+The ``cpack`` program is steered by a configuration file written in the
+:manual:`CMake language <cmake-language(7)>`. Unless chosen differently
+through the command-line option ``--config``, the file ``CPackConfig.cmake``
+in the current directory is used.
+
+In the standard CMake workflow, the file ``CPackConfig.cmake`` is generated
+by the :manual:`cmake <cmake(1)>` executable, provided the :module:`CPack`
+module is included by the project's ``CMakeLists.txt`` file.
Options
=======
@@ -27,14 +44,9 @@ Options
``<generators>`` is a :ref:`semicolon-separated list <CMake Language Lists>`
of generator names. ``cpack`` will iterate through this list and produce
package(s) in that generator's format according to the details provided in
- the ``CPackConfig.cmake`` configuration file. A generator is responsible for
- generating the required inputs for a particular package system and invoking
- that system's package creation tools. All supported generators are specified
- in the :manual:`Generators <cpack-generators(7)>` section of the manual and
- the ``--help`` option lists the generators supported for the target platform.
-
- If this option is not given, the :variable:`CPACK_GENERATOR` variable
- determines the default set of generators that will be used.
+ the ``CPackConfig.cmake`` configuration file. If this option is not given,
+ the :variable:`CPACK_GENERATOR` variable determines the default set of
+ generators that will be used.
``-C <Configuration>``
Specify the project configuration to be packaged (e.g. ``Debug``,
diff --git a/Help/policy/CMP0085.rst b/Help/policy/CMP0085.rst
new file mode 100644
index 0000000..d9ec9a2
--- /dev/null
+++ b/Help/policy/CMP0085.rst
@@ -0,0 +1,21 @@
+CMP0085
+-------
+
+``$<IN_LIST:...>`` handles empty list items.
+
+In CMake 3.13 and lower, the ``$<IN_LIST:...>`` generator expression always
+returned ``0`` if the first argument was empty, even if the list contained an
+empty item. This behavior is inconsistent with the ``IN_LIST`` behavior of
+:command:`if`, which this generator expression is meant to emulate. CMake 3.14
+and later handles this case correctly.
+
+The ``OLD`` behavior of this policy is for ``$<IN_LIST:...>`` to always return
+``0`` if the first argument is empty. The ``NEW`` behavior is to return ``1``
+if the first argument is empty and the list contains an empty item.
+
+This policy was introduced in CMake version 3.14. CMake version
+|release| warns when the policy is not set and uses ``OLD`` behavior.
+Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW``
+explicitly.
+
+.. include:: DEPRECATED.txt
diff --git a/Help/release/dev/FindX11-imported-targets.rst b/Help/release/dev/FindX11-imported-targets.rst
new file mode 100644
index 0000000..4df753d
--- /dev/null
+++ b/Help/release/dev/FindX11-imported-targets.rst
@@ -0,0 +1,32 @@
+FindX11-imported-targets
+------------------------
+
+* The :module:`FindX11` had the following variables renamed in order to match
+ their library names rather than header names. The old variables are provided
+ for compatibility:
+
+ - ``X11_Xxf86misc_INCLUDE_PATH`` instead of ``X11_xf86misc_INCLUDE_PATH``
+ - ``X11_Xxf86misc_LIB`` instead of ``X11_xf86misc_LIB``
+ - ``X11_Xxf86misc_FOUND`` instead of ``X11_xf86misc_FOUND``
+ - ``X11_Xxf86vm_INCLUDE_PATH`` instead of ``X11_xf86vmode_INCLUDE_PATH``
+ - ``X11_Xxf86vm_LIB`` instead of ``X11_xf86vmode_LIB``
+ - ``X11_Xxf86vm_FOUND`` instead of ``X11_xf86vmode_FOUND``
+ - ``X11_xkbfile_INCLUDE_PATH`` instead of ``X11_Xkbfile_INCLUDE_PATH``
+ - ``X11_xkbfile_LIB`` instead of ``X11_Xkbfile_LIB``
+ - ``X11_xkbfile_FOUND`` instead of ``X11_Xkbfile_FOUND``
+ - ``X11_Xtst_INCLUDE_PATH`` instead of ``X11_XTest_INCLUDE_PATH``
+ - ``X11_Xtst_LIB`` instead of ``X11_XTest_LIB``
+ - ``X11_Xtst_FOUND`` instead of ``X11_XTest_FOUND``
+ - ``X11_Xss_INCLUDE_PATH`` instead of ``X11_Xscreensaver_INCLUDE_PATH``
+ - ``X11_Xss_LIB`` instead of ``X11_Xscreensaver_LIB``
+ - ``X11_Xss_FOUND`` instead of ``X11_Xscreensaver_FOUND``
+
+ The following variables are deprecated completely since they were
+ essentially duplicates:
+
+ - ``X11_Xinput_INCLUDE_PATH`` (use ``X11_Xi_INCLUDE_PATH``)
+ - ``X11_Xinput_LIB`` (use ``X11_Xi_LIB``)
+ - ``X11_Xinput_FOUND`` (use ``X11_Xi_FOUND``)
+
+* The :module:`FindX11` now provides ``X11_Xext_INCLUDE_PATH``.
+* The :module:`FindX11` now provides imported targets.
diff --git a/Help/release/dev/genex-in_list-empty-args.rst b/Help/release/dev/genex-in_list-empty-args.rst
new file mode 100644
index 0000000..ec1c6c0
--- /dev/null
+++ b/Help/release/dev/genex-in_list-empty-args.rst
@@ -0,0 +1,5 @@
+genex-in_list-empty-args
+------------------------
+
+* The $<IN_LIST:...> generator expression now correctly handles an empty
+ argument. See :policy:`CMP0085` for details.