summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorDaniel Eiband <daniel.eiband@brainlab.com>2019-09-21 22:06:45 (GMT)
committerDaniel Eiband <daniel.eiband@brainlab.com>2019-09-22 07:51:19 (GMT)
commitc12222db86859a5a5ce9163a5309bb0da10ec616 (patch)
tree674d778541027e2430ffe25a8155ad1aa2a44491 /Source/cmGeneratorTarget.cxx
parent1811411fecf3d9769ad7a13f6ecd01c5351df9c4 (diff)
downloadCMake-c12222db86859a5a5ce9163a5309bb0da10ec616.zip
CMake-c12222db86859a5a5ce9163a5309bb0da10ec616.tar.gz
CMake-c12222db86859a5a5ce9163a5309bb0da10ec616.tar.bz2
cmGeneratorExpression: Remove Evaluate overload by parameter re-ordering
Simplify by re-ordering parameters of cmCompiledGeneratorExpression::Evaluate so that frequently used parameters are before less frequently used parameters. This allows with little extra arguments to get rid of one Evaluate overload, which makes it easier to implement the cmGeneratorExpression::Evaluate utility. The latter would otherwise need four overloads.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 454bcbc..b66d9d5 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -112,7 +112,8 @@ public:
cmGeneratorExpressionDAGChecker* dagChecker,
std::string const& language) const override
{
- return this->ge->Evaluate(lg, config, headTarget, dagChecker, language);
+ return this->ge->Evaluate(lg, config, headTarget, dagChecker, nullptr,
+ language);
}
cmListFileBacktrace GetBacktrace() const override
@@ -709,8 +710,8 @@ void handleSystemIncludesDep(cmLocalGenerator* lg,
if (const char* dirs =
depTgt->GetProperty("INTERFACE_SYSTEM_INCLUDE_DIRECTORIES")) {
cmGeneratorExpression ge;
- cmExpandList(ge.Parse(dirs)->Evaluate(lg, config, headTarget, depTgt,
- dagChecker, language),
+ cmExpandList(ge.Parse(dirs)->Evaluate(lg, config, headTarget, dagChecker,
+ depTgt, language),
result);
}
if (!depTgt->IsImported() || excludeImported) {
@@ -720,8 +721,8 @@ void handleSystemIncludesDep(cmLocalGenerator* lg,
if (const char* dirs =
depTgt->GetProperty("INTERFACE_INCLUDE_DIRECTORIES")) {
cmGeneratorExpression ge;
- cmExpandList(ge.Parse(dirs)->Evaluate(lg, config, headTarget, depTgt,
- dagChecker, language),
+ cmExpandList(ge.Parse(dirs)->Evaluate(lg, config, headTarget, dagChecker,
+ depTgt, language),
result);
}
}
@@ -1093,7 +1094,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(
for (std::string const& it : this->Target->GetSystemIncludeDirectories()) {
cmGeneratorExpression ge;
cmExpandList(ge.Parse(it)->Evaluate(this->LocalGenerator, config, this,
- &dagChecker, language),
+ &dagChecker, nullptr, language),
result);
}
@@ -1199,7 +1200,7 @@ std::string cmGeneratorTarget::EvaluateInterfaceProperty(
if (const char* p = this->GetProperty(prop)) {
result = cmGeneratorExpressionNode::EvaluateDependentExpression(
- p, context->LG, context, headTarget, this, &dagChecker);
+ p, context->LG, context, headTarget, &dagChecker, this);
}
if (cmLinkInterfaceLibraries const* iface =
@@ -5287,7 +5288,7 @@ void cmGeneratorTarget::ExpandLinkItems(
std::vector<std::string> libs;
std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value);
cmExpandList(
- cge->Evaluate(this->LocalGenerator, config, headTarget, this, &dagChecker),
+ cge->Evaluate(this->LocalGenerator, config, headTarget, &dagChecker, this),
libs);
this->LookupLinkItems(libs, cge->GetBacktrace(), items);
hadHeadSensitiveCondition = cge->GetHadHeadSensitiveCondition();