summaryrefslogtreecommitdiffstats
path: root/Source/cmExportBuildFileGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-09-16 20:08:22 (GMT)
committerBrad King <brad.king@kitware.com>2015-10-14 17:32:09 (GMT)
commit488723f5cd9bec3f7b35b26c89ce2d92ad7d4db4 (patch)
tree9d4abfce9ebe0608ade61c5dab3364d89b899508 /Source/cmExportBuildFileGenerator.cxx
parent1583440509a148d216d6691cdaeede1aa24af95c (diff)
downloadCMake-488723f5cd9bec3f7b35b26c89ce2d92ad7d4db4.zip
CMake-488723f5cd9bec3f7b35b26c89ce2d92ad7d4db4.tar.gz
CMake-488723f5cd9bec3f7b35b26c89ce2d92ad7d4db4.tar.bz2
cmMakefile: Store container of cmExportBuildFileGenerators.
Set a cmLocalGenerator on each instance at compute time. That will soon be needed to access cmGeneratorTarget instances. If a cmExportBuildFileGenerator is processed early during configure time as a result of CMP0024 it must be removed from the list to process later at generate time.
Diffstat (limited to 'Source/cmExportBuildFileGenerator.cxx')
-rw-r--r--Source/cmExportBuildFileGenerator.cxx21
1 files changed, 14 insertions, 7 deletions
diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx
index 400fa17..560cfc5 100644
--- a/Source/cmExportBuildFileGenerator.cxx
+++ b/Source/cmExportBuildFileGenerator.cxx
@@ -18,13 +18,18 @@
//----------------------------------------------------------------------------
cmExportBuildFileGenerator::cmExportBuildFileGenerator()
- : Backtrace()
{
- this->Makefile = 0;
+ this->LG = 0;
this->ExportSet = 0;
}
//----------------------------------------------------------------------------
+void cmExportBuildFileGenerator::Compute(cmLocalGenerator* lg)
+{
+ this->LG = lg;
+}
+
+//----------------------------------------------------------------------------
bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
{
std::vector<cmGeneratorTarget*> allTargets;
@@ -37,7 +42,7 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
tei = targets.begin();
tei != targets.end(); ++tei)
{
- cmGeneratorTarget *te = this->Makefile
+ cmGeneratorTarget *te = this->LG->GetMakefile()
->FindGeneratorTargetToUse(*tei);
expectedTargets += sep + this->Namespace + te->Target->GetExportName();
sep = " ";
@@ -49,8 +54,9 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
{
std::ostringstream e;
e << "given target \"" << te->GetName() << "\" more than once.";
- this->Makefile->GetCMakeInstance()
- ->IssueMessage(cmake::FATAL_ERROR, e.str(), this->Backtrace);
+ this->LG->GetGlobalGenerator()->GetCMakeInstance()
+ ->IssueMessage(cmake::FATAL_ERROR, e.str(),
+ this->LG->GetMakefile()->GetBacktrace());
return false;
}
if (te->GetType() == cmTarget::INTERFACE_LIBRARY)
@@ -328,8 +334,9 @@ cmExportBuildFileGenerator
e << "If the required target is not easy to reference in this call, "
<< "consider using the APPEND option with multiple separate calls.";
- this->Makefile->GetCMakeInstance()
- ->IssueMessage(cmake::FATAL_ERROR, e.str(), this->Backtrace);
+ this->LG->GetGlobalGenerator()->GetCMakeInstance()
+ ->IssueMessage(cmake::FATAL_ERROR, e.str(),
+ this->LG->GetMakefile()->GetBacktrace());
}
std::string