summaryrefslogtreecommitdiffstats
path: root/Help/manual/cmake-generator-expressions.7.rst
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-04-22 19:17:20 (GMT)
committerBrad King <brad.king@kitware.com>2024-04-29 21:40:03 (GMT)
commitddb9442f487808b74ed3429832a74385a1214582 (patch)
tree56743b6a8b3be07dbf72dfc7a5114a23230a80d1 /Help/manual/cmake-generator-expressions.7.rst
parent862b8e28adbbab55c666a2d6eb3eecf0bf452bab (diff)
downloadCMake-ddb9442f487808b74ed3429832a74385a1214582.zip
CMake-ddb9442f487808b74ed3429832a74385a1214582.tar.gz
CMake-ddb9442f487808b74ed3429832a74385a1214582.tar.bz2
GenEx: Fix TARGET_PROPERTY evaluation of transitive link properties
In commit bbba701899 (Link properties: must be transitive over private dependency on static library, 2019-12-06, v3.17.0-rc1~323^2) and commit af9d4f24ae (Link properties: must be transitive over private dependency on static library, 2019-12-11, v3.17.0-rc1~305^2) we neglected to implement CMP0099 NEW behavior for `TARGET_PROPERTY` evaluation. Add policy CMP0166 to fix this.
Diffstat (limited to 'Help/manual/cmake-generator-expressions.7.rst')
-rw-r--r--Help/manual/cmake-generator-expressions.7.rst17
1 files changed, 13 insertions, 4 deletions
diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst
index 38fa6f9..31f0573 100644
--- a/Help/manual/cmake-generator-expressions.7.rst
+++ b/Help/manual/cmake-generator-expressions.7.rst
@@ -1282,7 +1282,7 @@ Compile Context
.. versionadded:: 3.27
Content of ``...``, when collecting
- :ref:`usage requirements <Target Usage Requirements>`,
+ :ref:`transitive build properties <Transitive Build Properties>`,
otherwise it is the empty string. This is intended for use in an
:prop_tgt:`INTERFACE_LINK_LIBRARIES` and :prop_tgt:`LINK_LIBRARIES` target
properties, typically populated via the :command:`target_link_libraries` command.
@@ -1670,8 +1670,8 @@ Link Context
.. versionadded:: 3.1
- Content of ``...``, except while collecting
- :ref:`usage requirements <Target Usage Requirements>`,
+ Content of ``...``, except while collecting usage requirements from
+ :ref:`transitive build properties <Transitive Build Properties>`,
in which case it is the empty string. This is intended for use in an
:prop_tgt:`INTERFACE_LINK_LIBRARIES` target property, typically populated
via the :command:`target_link_libraries` command, to specify private link
@@ -1788,7 +1788,16 @@ The expressions have special evaluation rules for some properties:
of the value on the target itself with the values of the same properties on
targets named by the target's :prop_tgt:`INTERFACE_LINK_LIBRARIES`.
Evaluation is transitive over the closure of the target's
- :prop_tgt:`INTERFACE_LINK_LIBRARIES`.
+ :prop_tgt:`INTERFACE_LINK_LIBRARIES`:
+
+ * For :ref:`Transitive Build Properties`, the transitive closure
+ *excludes* entries of :prop_tgt:`INTERFACE_LINK_LIBRARIES` guarded
+ by the :genex:`LINK_ONLY` generator expression.
+
+ * For :ref:`Transitive Link Properties`, the transitive closure is
+ *includes* entries of :prop_tgt:`INTERFACE_LINK_LIBRARIES` guarded
+ by the :genex:`LINK_ONLY` generator expression.
+ See policy :policy:`CMP0166`.
Evaluation of :prop_tgt:`INTERFACE_LINK_LIBRARIES` itself is not transitive.