diff options
author | Brad King <brad.king@kitware.com> | 2018-09-07 14:56:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-09-12 16:46:25 (GMT) |
commit | 2f708f5d65557ecbfe4ebe7c14b02dbba6bf0ffe (patch) | |
tree | 1fa50eade95a0394af49aaca5489839dcfad5d29 /Source/cmGeneratorExpressionNode.cxx | |
parent | 94a75801c834891f47358e9f5763c56245dff3fe (diff) | |
download | CMake-2f708f5d65557ecbfe4ebe7c14b02dbba6bf0ffe.zip CMake-2f708f5d65557ecbfe4ebe7c14b02dbba6bf0ffe.tar.gz CMake-2f708f5d65557ecbfe4ebe7c14b02dbba6bf0ffe.tar.bz2 |
Make internal TARGET_PROPERTY generator expressions more robust
While collecting usage requirements from the `INTERFACE_*` properties of
directly linked targets, we internally generate `TARGET_PROPERTY:` and
`TARGET_OBJECTS:` generator expressions to refer to those properties on
those targets. At the point we generate these expressions we already
have a pointer to an exact `cmGeneratorTarget` instance.
Switch from using the target name in these generator expressions to
using an internal unique name generated for each `cmGeneratorTarget`
instance to be referenced. This avoids depending on the user-facing
target name to find the same target we already have.
Diffstat (limited to 'Source/cmGeneratorExpressionNode.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionNode.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 1e51f09..16ac88c 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1054,7 +1054,9 @@ std::string getLinkedTargetsContent( // Don't follow such link interface entries so as not to create a // self-referencing loop. if (l.Target && l.Target != target) { - depString += sep + "$<TARGET_PROPERTY:" + l.Target->GetName() + "," + + std::string uniqueName = + target->GetGlobalGenerator()->IndexGeneratorTargetUniquely(l.Target); + depString += sep + "$<TARGET_PROPERTY:" + std::move(uniqueName) + "," + interfacePropertyName + ">"; sep = ";"; } |