summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-07-25 14:56:52 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-12 21:07:46 (GMT)
commit11165525ba663b4cd7a188c6b698822b8480aafb (patch)
tree7a3440126a1359759ff20ee78d3d444bd23dfe70 /Source/cmGeneratorTarget.cxx
parent1fdccff5894914d4408e64c0b55e52c376e64ad4 (diff)
downloadCMake-11165525ba663b4cd7a188c6b698822b8480aafb.zip
CMake-11165525ba663b4cd7a188c6b698822b8480aafb.tar.gz
CMake-11165525ba663b4cd7a188c6b698822b8480aafb.tar.bz2
cmGeneratorExpression: Port to cmLocalGenerator.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx39
1 files changed, 20 insertions, 19 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 1699362..04b0d1f 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -453,7 +453,7 @@ std::string cmGeneratorTarget::GetOutputName(const std::string& config,
// Now evaluate genex and update the previously-prepared map entry.
cmGeneratorExpression ge;
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(outName);
- i->second = cge->Evaluate(this->Makefile, config);
+ i->second = cge->Evaluate(this->LocalGenerator, config);
}
else if(i->second.empty())
{
@@ -510,7 +510,7 @@ cmGeneratorTarget::GetSourceDepends(cmSourceFile const* sf) const
return 0;
}
-static void handleSystemIncludesDep(cmMakefile *mf,
+static void handleSystemIncludesDep(cmLocalGenerator *lg,
cmGeneratorTarget const* depTgt,
const std::string& config,
cmGeneratorTarget const* headTarget,
@@ -523,7 +523,7 @@ static void handleSystemIncludesDep(cmMakefile *mf,
{
cmGeneratorExpression ge;
cmSystemTools::ExpandListArgument(ge.Parse(dirs)
- ->Evaluate(mf,
+ ->Evaluate(lg,
config, false, headTarget->Target,
depTgt->Target, dagChecker), result);
}
@@ -537,7 +537,7 @@ static void handleSystemIncludesDep(cmMakefile *mf,
{
cmGeneratorExpression ge;
cmSystemTools::ExpandListArgument(ge.Parse(dirs)
- ->Evaluate(mf,
+ ->Evaluate(lg,
config, false, headTarget->Target,
depTgt->Target, dagChecker), result);
}
@@ -879,7 +879,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
{
cmGeneratorExpression ge;
cmSystemTools::ExpandListArgument(ge.Parse(*it)
- ->Evaluate(this->Makefile,
+ ->Evaluate(this->LocalGenerator,
config, false, this->Target,
&dagChecker), result);
}
@@ -889,7 +889,8 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
for(std::vector<cmGeneratorTarget const*>::const_iterator
li = deps.begin(), le = deps.end(); li != le; ++li)
{
- handleSystemIncludesDep(this->Makefile, *li, config, this,
+ handleSystemIncludesDep(this->LocalGenerator, *li,
+ config, this,
&dagChecker, result, excludeImported);
}
@@ -961,7 +962,8 @@ static bool processSources(cmGeneratorTarget const* tgt,
cmLinkImplItem const& item = (*it)->LinkImplItem;
std::string const& targetName = item;
std::vector<std::string> entrySources;
- cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
+ cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(
+ tgt->GetLocalGenerator(),
config,
false,
tgt->Target,
@@ -2054,7 +2056,7 @@ void cmGeneratorTarget::GetAutoUicOptions(std::vector<std::string> &result,
this->GetName(),
"AUTOUIC_OPTIONS", 0, 0);
cmSystemTools::ExpandListArgument(ge.Parse(prop)
- ->Evaluate(this->Makefile,
+ ->Evaluate(this->LocalGenerator,
config,
false,
this->Target,
@@ -2376,7 +2378,7 @@ cmTargetTraceDependencies
{
const cmsys::auto_ptr<cmCompiledGeneratorExpression> cge
= ge.Parse(*cli);
- cge->Evaluate(this->Makefile, "", true);
+ cge->Evaluate(this->GeneratorTarget->GetLocalGenerator(), "", true);
std::set<cmTarget*> geTargets = cge->GetTargets();
targets.insert(geTargets.begin(), geTargets.end());
}
@@ -2530,8 +2532,6 @@ static void processIncludeDirectories(cmGeneratorTarget const* tgt,
const std::string& config, bool debugIncludes,
const std::string& language)
{
- cmMakefile *mf = tgt->Target->GetMakefile();
-
for (std::vector<cmGeneratorTarget::TargetPropertyEntry*>::const_iterator
it = entries.begin(), end = entries.end(); it != end; ++it)
{
@@ -2540,7 +2540,8 @@ static void processIncludeDirectories(cmGeneratorTarget const* tgt,
bool const fromImported = item.Target && item.Target->IsImported();
bool const checkCMP0027 = item.FromGenex;
std::vector<std::string> entryIncludes;
- cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
+ cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(
+ tgt->GetLocalGenerator(),
config,
false,
tgt->Target,
@@ -2746,13 +2747,12 @@ static void processCompileOptionsInternal(cmGeneratorTarget const* tgt,
const std::string& config, bool debugOptions, const char *logName,
std::string const& language)
{
- cmMakefile *mf = tgt->Target->GetMakefile();
-
for (std::vector<cmGeneratorTarget::TargetPropertyEntry*>::const_iterator
it = entries.begin(), end = entries.end(); it != end; ++it)
{
std::vector<std::string> entryOptions;
- cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
+ cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(
+ tgt->GetLocalGenerator(),
config,
false,
tgt->Target,
@@ -4452,7 +4452,7 @@ void cmGeneratorTarget::ExpandLinkItems(std::string const& prop,
std::vector<std::string> libs;
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(value);
cmSystemTools::ExpandListArgument(cge->Evaluate(
- this->Makefile,
+ this->LocalGenerator,
config,
false,
headTarget->Target,
@@ -4777,7 +4777,7 @@ bool cmGeneratorTarget::ComputeOutputDir(const std::string& config,
cmGeneratorExpression ge;
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
ge.Parse(config_outdir);
- out = cge->Evaluate(this->Makefile, config);
+ out = cge->Evaluate(this->LocalGenerator, config);
// Skip per-configuration subdirectory.
conf = "";
@@ -4788,7 +4788,7 @@ bool cmGeneratorTarget::ComputeOutputDir(const std::string& config,
cmGeneratorExpression ge;
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
ge.Parse(outdir);
- out = cge->Evaluate(this->Makefile, config);
+ out = cge->Evaluate(this->LocalGenerator, config);
// Skip per-configuration subdirectory if the value contained a
// generator expression.
@@ -5347,7 +5347,8 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
cmsys::auto_ptr<cmCompiledGeneratorExpression> const cge =
ge.Parse(*le);
std::string const evaluated =
- cge->Evaluate(this->Makefile, config, false, head->Target, &dagChecker);
+ cge->Evaluate(this->LocalGenerator, config, false,
+ head->Target, &dagChecker);
cmSystemTools::ExpandListArgument(evaluated, llibs);
if(cge->GetHadHeadSensitiveCondition())
{