summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
Diffstat (limited to 'Help')
-rw-r--r--Help/command/add_custom_command.rst44
-rw-r--r--Help/command/cmake_command.rst54
-rw-r--r--Help/manual/cmake-properties.7.rst1
-rw-r--r--Help/manual/cmake-variables.7.rst1
-rw-r--r--Help/prop_tgt/CONFIG_POSTFIX.rst3
-rw-r--r--Help/prop_tgt/FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG.rst25
-rw-r--r--Help/release/3.16.rst26
-rw-r--r--Help/release/3.17.rst4
-rw-r--r--Help/release/dev/FindPython-artifacts-interactive.rst6
-rw-r--r--Help/release/dev/cmake_command-command.rst2
-rw-r--r--Help/release/dev/framework-multi-config-postfix.rst7
-rw-r--r--Help/variable/CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG.rst8
12 files changed, 163 insertions, 18 deletions
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst
index 576ed5b..69d6e9a 100644
--- a/Help/command/add_custom_command.rst
+++ b/Help/command/add_custom_command.rst
@@ -112,26 +112,42 @@ The options are:
build time.
``DEPENDS``
- Specify files on which the command depends. Entries in the ``DEPENDS``
- argument list which may also be target names are assumed to be target names,
- so only entries which contain a path separator are detected as file paths.
+ Specify files on which the command depends. Each argument is converted
+ to a dependency as follows:
+
+ 1. If the argument is the name of a target (created by the
+ :command:`add_custom_target`, :command:`add_executable`, or
+ :command:`add_library` command) a target-level dependency is
+ created to make sure the target is built before any target
+ using this custom command. Additionally, if the target is an
+ executable or library, a file-level dependency is created to
+ cause the custom command to re-run whenever the target is
+ recompiled.
+
+ 2. If the argument is an absolute path, a file-level dependency
+ is created on that path.
+
+ 3. If the argument is the name of a source file that has been
+ added to a target or on which a source file property has been set,
+ a file-level dependency is created on that source file.
+
+ 4. If the argument is a relative path and it exists in the current
+ source directory, a file-level dependency is created on that
+ file in the current source directory.
+
+ 5. Otherwise, a file-level dependency is created on that path relative
+ to the current binary directory.
+
If any dependency is an ``OUTPUT`` of another custom command in the same
- directory (``CMakeLists.txt`` file) CMake automatically brings the other
+ directory (``CMakeLists.txt`` file), CMake automatically brings the other
custom command into the target in which this command is built.
A target-level dependency is added if any dependency is listed as
``BYPRODUCTS`` of a target or any of its build events in the same
directory to ensure the byproducts will be available.
- If ``DEPENDS`` is not specified the command will run whenever
+
+ If ``DEPENDS`` is not specified, the command will run whenever
the ``OUTPUT`` is missing; if the command does not actually
- create the ``OUTPUT`` then the rule will always run.
- If ``DEPENDS`` specifies any target (created by the
- :command:`add_custom_target`, :command:`add_executable`, or
- :command:`add_library` command) a target-level dependency is
- created to make sure the target is built before any target
- using this custom command. Additionally, if the target is an
- executable or library a file-level dependency is created to
- cause the custom command to re-run whenever the target is
- recompiled.
+ create the ``OUTPUT``, the rule will always run.
Arguments to ``DEPENDS`` may use
:manual:`generator expressions <cmake-generator-expressions(7)>`.
diff --git a/Help/command/cmake_command.rst b/Help/command/cmake_command.rst
index 9281647..08b7832 100644
--- a/Help/command/cmake_command.rst
+++ b/Help/command/cmake_command.rst
@@ -9,6 +9,7 @@ Synopsis
.. parsed-literal::
cmake_command(`INVOKE`_ <command> [<args>...])
+ cmake_command(`EVAL`_ CODE <code>...)
Introduction
^^^^^^^^^^^^
@@ -16,8 +17,10 @@ Introduction
This command will call meta-operations on built-in CMake commands or
those created via the :command:`macro` or :command:`function` commands.
-Invoking
-^^^^^^^^
+``cmake_command`` does not introduce a new variable or policy scope.
+
+Invoking Commands
+^^^^^^^^^^^^^^^^^
.. _INVOKE:
@@ -38,3 +41,50 @@ is equivalent to
.. code-block:: cmake
message(STATUS "Hello World!")
+
+Evaluating Code
+^^^^^^^^^^^^^^^
+
+.. _EVAL:
+
+.. code-block:: cmake
+
+ cmake_command(EVAL CODE <code>...)
+
+Evaluates the ``<code>...`` as CMake code.
+
+For example, the code:
+
+.. code-block:: cmake
+
+ set(A TRUE)
+ set(B TRUE)
+ set(C TRUE)
+ set(condition "(A AND B) OR C")
+
+ cmake_command(EVAL CODE "
+ if (${condition})
+ message(STATUS TRUE)
+ else()
+ message(STATUS FALSE)
+ endif()"
+ )
+
+is equivalent to
+
+.. code-block:: cmake
+
+ set(A TRUE)
+ set(B TRUE)
+ set(C TRUE)
+ set(condition "(A AND B) OR C")
+
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/eval.cmake "
+ if (${condition})
+ message(STATUS TRUE)
+ else()
+ message(STATUS FALSE)
+ endif()"
+ )
+
+ include(${CMAKE_CURRENT_BINARY_DIR}/eval.cmake)
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 37f8678..15f0cfc 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -200,6 +200,7 @@ Properties on Targets
/prop_tgt/Fortran_FORMAT
/prop_tgt/Fortran_MODULE_DIRECTORY
/prop_tgt/FRAMEWORK
+ /prop_tgt/FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG
/prop_tgt/FRAMEWORK_VERSION
/prop_tgt/GENERATOR_FILE_NAME
/prop_tgt/GHS_INTEGRITY_APP
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index a639b5d..7696fd9 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -388,6 +388,7 @@ Variables that Control the Build
/variable/CMAKE_EXE_LINKER_FLAGS_INIT
/variable/CMAKE_FOLDER
/variable/CMAKE_FRAMEWORK
+ /variable/CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG
/variable/CMAKE_Fortran_FORMAT
/variable/CMAKE_Fortran_MODULE_DIRECTORY
/variable/CMAKE_GHS_NO_SOURCE_GROUP_FILE
diff --git a/Help/prop_tgt/CONFIG_POSTFIX.rst b/Help/prop_tgt/CONFIG_POSTFIX.rst
index 11b50b9..5c2fbd7 100644
--- a/Help/prop_tgt/CONFIG_POSTFIX.rst
+++ b/Help/prop_tgt/CONFIG_POSTFIX.rst
@@ -8,3 +8,6 @@ is appended to the target file name built on disk. For non-executable
targets, this property is initialized by the value of the variable
CMAKE_<CONFIG>_POSTFIX if it is set when a target is created. This
property is ignored on the Mac for Frameworks and App Bundles.
+
+For macOS see also the :prop_tgt:`FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>`
+target property.
diff --git a/Help/prop_tgt/FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG.rst b/Help/prop_tgt/FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG.rst
new file mode 100644
index 0000000..2b20bf9
--- /dev/null
+++ b/Help/prop_tgt/FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG.rst
@@ -0,0 +1,25 @@
+FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>
+---------------------------------------
+
+Postfix to append to the framework file name for configuration <CONFIG>,
+when using a multi-config generator (like Xcode and Ninja Multi-Config).
+
+When building with configuration <CONFIG> the value of this property
+is appended to the framework file name built on disk.
+
+For example given a framework called ``my_fw``, a value of ``_debug``
+for the :prop_tgt:`FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>` property, and
+``Debug;Release`` in `CMAKE_CONFIGURATION_TYPES`, the following relevant
+files would be created for the ``Debug`` and ``Release`` configurations:
+
+- Release/my_fw.framework/my_fw
+- Release/my_fw.framework/Versions/A/my_fw
+- Debug/my_fw.framework/my_fw_debug
+- Debug/my_fw.framework/Versions/A/my_fw_debug
+
+For framework targets, this property is initialized by the value of the
+variable :variable:`CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>` if it
+is set when a target is created.
+
+This property is ignored for non-framework targets, and when using single
+config generators.
diff --git a/Help/release/3.16.rst b/Help/release/3.16.rst
index 0d1cc1e..e2d6788 100644
--- a/Help/release/3.16.rst
+++ b/Help/release/3.16.rst
@@ -277,3 +277,29 @@ Other Changes
* When using :variable:`CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS` on Windows the
auto-generated exports are now updated only when the object files
providing the symbols are updated.
+
+Updates
+=======
+
+Changes made since CMake 3.16.0 include the following.
+
+3.16.2
+------
+
+* CMake 3.16.0 and 3.16.1 processed ``.hh`` files with :prop_tgt:`AUTOMOC`.
+ This was a behavior change from CMake 3.15 and below that can break
+ existing projects, so it has been reverted as of 3.16.2.
+
+3.16.5
+------
+
+* The :module:`FindPython`, :module:`FindPython2`, and :module:`FindPython3`
+ modules no longer create cache entries for ``Python{,2,3}_LIBRARY_RELEASE``
+ and ``Python{,2,3}_LIBRARY_DEBUG``. Those values are always computed from
+ other results and so should not be cached. The entries were created by
+ CMake 3.16.0 through 3.16.4 but were always ``FORCE``-set and could not
+ be meaningfully edited by users.
+
+ Additionally, the modules no longer expose their internal ``_Python*``
+ cache entries publicly. CMake 3.16.0 through 3.16.4 accidentally
+ made them visible as advanced cache entries.
diff --git a/Help/release/3.17.rst b/Help/release/3.17.rst
index 30e6cc3..23dec84 100644
--- a/Help/release/3.17.rst
+++ b/Help/release/3.17.rst
@@ -179,7 +179,9 @@ Modules
* The :module:`FindPython3` and :module:`FindPython` modules gained,
respectively, variable ``Python3_SOABI`` and ``Python_SOABI`` giving
- the standard extension suffix for modules.
+ the standard extension suffix for modules. Moreover, commands
+ ``Python3_add_library`` and ``Python_add_library`` gained the option
+ ``WITH_SOABI`` to prefix the library suffix with the value of ``SOABI``.
* The :module:`FindLibXml2` module now provides an imported target for the
``xmllint`` executable
diff --git a/Help/release/dev/FindPython-artifacts-interactive.rst b/Help/release/dev/FindPython-artifacts-interactive.rst
new file mode 100644
index 0000000..1aa4b3e
--- /dev/null
+++ b/Help/release/dev/FindPython-artifacts-interactive.rst
@@ -0,0 +1,6 @@
+FindPython-artifacts-interactive
+--------------------------------
+
+* The :module:`FindPython3`, :module:`FindPython2` and :module:`FindPython`
+ modules gained the possibility to create artifacts cache variables for
+ interactive edition.
diff --git a/Help/release/dev/cmake_command-command.rst b/Help/release/dev/cmake_command-command.rst
index ebe75b1..6200ae2 100644
--- a/Help/release/dev/cmake_command-command.rst
+++ b/Help/release/dev/cmake_command-command.rst
@@ -3,4 +3,4 @@ cmake_command
* The :command:`cmake_command()` command was added for meta-operations on
scripted or built-in commands, starting with a mode to ``INVOKE`` other
- commands.
+ commands, and ``EVAL CODE`` to inplace evaluate a CMake script.
diff --git a/Help/release/dev/framework-multi-config-postfix.rst b/Help/release/dev/framework-multi-config-postfix.rst
new file mode 100644
index 0000000..50cf9ce
--- /dev/null
+++ b/Help/release/dev/framework-multi-config-postfix.rst
@@ -0,0 +1,7 @@
+framework-multi-config-postfix
+------------------------------
+
+* The :prop_tgt:`FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>` target property
+ and associated :variable:`CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>`
+ variable were created to allow adding a postfix to the name of a
+ framework file name when using a multi-config generator.
diff --git a/Help/variable/CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG.rst b/Help/variable/CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG.rst
new file mode 100644
index 0000000..5c7cd23
--- /dev/null
+++ b/Help/variable/CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_CONFIG.rst
@@ -0,0 +1,8 @@
+CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>
+---------------------------------------------
+
+Default framework filename postfix under configuration ``<CONFIG>`` when
+using a multi-config generator.
+
+When a framework target is created its :prop_tgt:`FRAMEWORK_MULTI_CONFIG_POSTFIX_<CONFIG>`
+target property is initialized with the value of this variable if it is set.