diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-02-22 16:16:19 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-02-23 08:41:22 (GMT) |
commit | e72eaadc42be80ef8273addfc19a6dd13b5feb90 (patch) | |
tree | 082f9f6f760316c2c236851ae21028e84b05e3fc | |
parent | ec2c67bcf3aada9b601d5dca52b31a4fb6104240 (diff) | |
download | CMake-e72eaadc42be80ef8273addfc19a6dd13b5feb90.zip CMake-e72eaadc42be80ef8273addfc19a6dd13b5feb90.tar.gz CMake-e72eaadc42be80ef8273addfc19a6dd13b5feb90.tar.bz2 |
Workaround broken code where a target has itself in its link iface.
There is a test for this since commit 8e756d2b (Tolerate cycles in
shared library link interfaces (#12647), 2012-01-12), so make sure
it continues to pass, even as we require no self-references in new
INTERFACE_ property generator expressions.
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 023daf8..3407187 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -471,6 +471,13 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode if (propertyName == "INTERFACE_INCLUDE_DIRECTORIES" || propertyName == "INTERFACE_COMPILE_DEFINITIONS") { + if (*it == target->GetName()) + { + // Broken code can have a target in its own link interface. + // Don't follow such link interface entries so as not to create a + // self-referencing loop. + continue; + } const cmTarget::LinkInterface *iface = target->GetLinkInterface( context->Config, context->HeadTarget); |