summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-10-06 14:59:13 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-10-06 14:59:13 (GMT)
commit256bf8876a2e460afc37dbe17eb34482944be20b (patch)
tree6c9d72fd8dddc97fa136fca38ada1b9f183b72c0 /Source
parent5d315f32236dfebf3561789d17aaaab2d86c504d (diff)
parentd945b36a93ab9f935c4e369d5c75be8b47d48f7a (diff)
downloadCMake-256bf8876a2e460afc37dbe17eb34482944be20b.zip
CMake-256bf8876a2e460afc37dbe17eb34482944be20b.tar.gz
CMake-256bf8876a2e460afc37dbe17eb34482944be20b.tar.bz2
Merge topic 'cmGeneratorTarget-exports'
d945b36a cmExportTryCompileFileGenerator: Evaluate genex with cmGeneratorTarget. 48f8b6ac cmExportFileGenerator: Evaluate genex with cmGeneratorTarget.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExportFileGenerator.cxx14
-rw-r--r--Source/cmExportTryCompileFileGenerator.cxx8
2 files changed, 14 insertions, 8 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 9a7d73f..881acee 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -436,7 +436,9 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface(
ImportPropertyMap &properties,
std::vector<std::string> &missingTargets)
{
- cmTarget *target = tei->Target;
+ cmGeneratorTarget *target = tei->Target->GetMakefile()
+ ->GetGlobalGenerator()
+ ->GetGeneratorTarget(tei->Target);
assert(preprocessRule == cmGeneratorExpression::InstallInterface);
const char *propName = "INTERFACE_INCLUDE_DIRECTORIES";
@@ -450,12 +452,12 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface(
true);
this->ReplaceInstallPrefix(dirs);
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(dirs);
- std::string exportDirs = cge->Evaluate(target->GetMakefile(), "",
- false, target);
+ std::string exportDirs = cge->Evaluate(target->Target->GetMakefile(), "",
+ false, target->Target);
if (cge->GetHadContextSensitiveCondition())
{
- cmMakefile* mf = target->GetMakefile();
+ cmMakefile* mf = target->Target->GetMakefile();
std::ostringstream e;
e << "Target \"" << target->GetName() << "\" is installed with "
"INCLUDES DESTINATION set to a context sensitive path. Paths which "
@@ -486,10 +488,10 @@ void cmExportFileGenerator::PopulateIncludeDirectoriesInterface(
true);
if (!prepro.empty())
{
- this->ResolveTargetsInGeneratorExpressions(prepro, target,
+ this->ResolveTargetsInGeneratorExpressions(prepro, target->Target,
missingTargets);
- if (!checkInterfaceDirs(prepro, target, propName))
+ if (!checkInterfaceDirs(prepro, target->Target, propName))
{
return;
}
diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx
index ba66531..026584c 100644
--- a/Source/cmExportTryCompileFileGenerator.cxx
+++ b/Source/cmExportTryCompileFileGenerator.cxx
@@ -76,8 +76,12 @@ std::string cmExportTryCompileFileGenerator::FindTargets(
dummyHead.SetType(cmTarget::EXECUTABLE, "try_compile_dummy_exe");
dummyHead.SetMakefile(tgt->GetMakefile());
- std::string result = cge->Evaluate(tgt->GetMakefile(), this->Config,
- false, &dummyHead, tgt, &dagChecker);
+ cmGeneratorTarget* gtgt =
+ tgt->GetMakefile()->GetGlobalGenerator()->GetGeneratorTarget(tgt);
+
+ std::string result = cge->Evaluate(gtgt->Target->GetMakefile(), this->Config,
+ false, &dummyHead,
+ gtgt->Target, &dagChecker);
const std::set<cmTarget const*> &allTargets = cge->GetAllTargetsSeen();
for(std::set<cmTarget const*>::const_iterator li = allTargets.begin();