target_link_libraries: Fix out-of-dir calls with debug/optimized keywords

In commit a1ad0a699b (target_link_libraries: Allow use with targets in
other directories, 2018-09-07, v3.13.0-rc1~94^2) we added use of `<...>`
to encode a directory id, but the closing `>` can incorrectly terminate
a surrounding generator expression early.  Encode the directory id using
`(...)` instead.

Fixes: #20202
This commit is contained in:
Brad King
2020-01-10 10:50:40 -05:00
parent c40229968c
commit 09721ca078
7 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -2,8 +2,8 @@
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.
suffix of the form ``::@(directory-id)`` to each entry, where the
``::@`` is a separator 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