summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionDAGChecker.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-01-23 21:17:14 (GMT)
committerBrad King <brad.king@kitware.com>2013-01-24 13:17:46 (GMT)
commit6fbe3ce4ef1178cc4f2f14f281cd48ef82a11e03 (patch)
treea7eefb8914cf7e8b50bd13875b7f6880e7aea900 /Source/cmGeneratorExpressionDAGChecker.cxx
parent76ace2b95aba4b12c049224aa8a2d18c67129d45 (diff)
downloadCMake-6fbe3ce4ef1178cc4f2f14f281cd48ef82a11e03.zip
CMake-6fbe3ce4ef1178cc4f2f14f281cd48ef82a11e03.tar.gz
CMake-6fbe3ce4ef1178cc4f2f14f281cd48ef82a11e03.tar.bz2
Exclude the LINK_LIBRARIES related properties from INTERFACE evaluation.
These interface-related link-libraries properties are used to determine the value of the other INTERFACE properties, so we were getting infinite recursion and segfaults otherwise.
Diffstat (limited to 'Source/cmGeneratorExpressionDAGChecker.cxx')
-rw-r--r--Source/cmGeneratorExpressionDAGChecker.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx
index 057f4c3..269211b 100644
--- a/Source/cmGeneratorExpressionDAGChecker.cxx
+++ b/Source/cmGeneratorExpressionDAGChecker.cxx
@@ -114,8 +114,14 @@ bool cmGeneratorExpressionDAGChecker::EvaluatingLinkLibraries()
const cmGeneratorExpressionDAGChecker *parent = this->Parent;
while (parent)
{
- parent = parent->Parent;
top = parent;
+ parent = parent->Parent;
}
- return top->Property == "LINK_LIBRARIES";
+
+ const char *prop = top->Property.c_str();
+ return (strcmp(prop, "LINK_LIBRARIES") == 0
+ || strcmp(prop, "LINK_INTERFACE_LIBRARIES") == 0
+ || strcmp(prop, "IMPORTED_LINK_INTERFACE_LIBRARIES") == 0
+ || strncmp(prop, "LINK_INTERFACE_LIBRARIES_", 26) == 0
+ || strncmp(prop, "IMPORTED_LINK_INTERFACE_LIBRARIES_", 35) == 0);
}