summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx27
1 files changed, 15 insertions, 12 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 1804691..d95006e 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -266,8 +266,6 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
{
return compilerId ? compilerId : "";
}
- else
- {
cmsys::RegularExpression compilerIdValidator;
compilerIdValidator.compile("^[A-Za-z0-9_]*$");
if (!compilerIdValidator.find(parameters.begin()->c_str()))
@@ -286,7 +284,6 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
return "1";
}
return "0";
- }
}
};
@@ -545,11 +542,13 @@ static const struct JoinNode : public cmGeneratorExpressionNode
}
} joinNode;
+#define TRANSITIVE_PROPERTY_NAME(PROPERTY) \
+ , #PROPERTY
+
//----------------------------------------------------------------------------
static const char* targetPropertyTransitiveWhitelist[] = {
- "INTERFACE_INCLUDE_DIRECTORIES"
- , "INTERFACE_COMPILE_DEFINITIONS"
- , "INTERFACE_COMPILE_OPTIONS"
+ 0
+ CM_FOR_EACH_TRANSITIVE_PROPERTY_NAME(TRANSITIVE_PROPERTY_NAME)
};
std::string getLinkedTargetsContent(const std::vector<std::string> &libraries,
@@ -729,7 +728,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
// No error. We just skip cyclic references.
return std::string();
case cmGeneratorExpressionDAGChecker::ALREADY_SEEN:
- for (size_t i = 0;
+ for (size_t i = 1;
i < (sizeof(targetPropertyTransitiveWhitelist) /
sizeof(*targetPropertyTransitiveWhitelist));
++i)
@@ -757,9 +756,13 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
}
else
{
- assert(dagCheckerParent->EvaluatingIncludeDirectories()
- || dagCheckerParent->EvaluatingCompileDefinitions()
- || dagCheckerParent->EvaluatingCompileOptions());
+#define ASSERT_TRANSITIVE_PROPERTY_METHOD(METHOD) \
+ dagCheckerParent->METHOD () ||
+
+ assert(
+ CM_FOR_EACH_TRANSITIVE_PROPERTY_METHOD(
+ ASSERT_TRANSITIVE_PROPERTY_METHOD)
+ false);
}
}
@@ -786,7 +789,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
cmTarget *headTarget = context->HeadTarget ? context->HeadTarget : target;
- const char **transBegin = targetPropertyTransitiveWhitelist;
+ const char **transBegin = targetPropertyTransitiveWhitelist + 1;
const char **transEnd = targetPropertyTransitiveWhitelist
+ (sizeof(targetPropertyTransitiveWhitelist) /
sizeof(*targetPropertyTransitiveWhitelist));
@@ -852,7 +855,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
return linkedTargetsContent;
}
- for (size_t i = 0;
+ for (size_t i = 1;
i < (sizeof(targetPropertyTransitiveWhitelist) /
sizeof(*targetPropertyTransitiveWhitelist));
++i)