summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-01-14 18:14:55 (GMT)
committerBrad King <brad.king@kitware.com>2020-01-16 18:24:27 (GMT)
commitf0e67da0615bd746626cab8e4dff2ba60c7aa2fe (patch)
treec27fb29e6b769cc5d501c42758ffd4c0892cec9a /Help
parentacee6291039537a176fef70820648fc3d8cb4fb0 (diff)
downloadCMake-f0e67da0615bd746626cab8e4dff2ba60c7aa2fe.zip
CMake-f0e67da0615bd746626cab8e4dff2ba60c7aa2fe.tar.gz
CMake-f0e67da0615bd746626cab8e4dff2ba60c7aa2fe.tar.bz2
target_link_libraries: Fix out-of-dir linking of a list of targets
In a case like target_link_libraries(targetInOtherDir PUBLIC "$<1:a;b>") then all entries in the list need to be looked up in the caller's scope. Previously our `::@(directory-id)` suffix would apply only to the last entry. Instead surround the entire entry by a pair `::@(directory-id);...;::@` so that the `::@` syntax can encode a directory lookup scope change evaluated as the list is processed. Fixes: #20204
Diffstat (limited to 'Help')
-rw-r--r--Help/prop_tgt/LINK_LIBRARIES_INDIRECTION.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/Help/prop_tgt/LINK_LIBRARIES_INDIRECTION.txt b/Help/prop_tgt/LINK_LIBRARIES_INDIRECTION.txt
index fab4418..476e4a6 100644
--- a/Help/prop_tgt/LINK_LIBRARIES_INDIRECTION.txt
+++ b/Help/prop_tgt/LINK_LIBRARIES_INDIRECTION.txt
@@ -1,9 +1,9 @@
.. note::
A call to :command:`target_link_libraries(<target> ...)` may update this
property on ``<target>``. If ``<target>`` was not created in the same
- directory as the call then :command:`target_link_libraries` will add a
- suffix of the form ``::@(directory-id)`` to each entry, where the
- ``::@`` is a separator and the ``(directory-id)`` is unspecified.
+ directory as the call then :command:`target_link_libraries` will wrap each
+ entry with the form ``::@(directory-id);...;::@``, where the ``::@`` is
+ literal and the ``(directory-id)`` is unspecified.
This tells the generators that the named libraries must be looked up in
the scope of the caller rather than in the scope in which the
``<target>`` was created. Valid directory ids are stripped on export