summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-07-25 19:58:20 +0200
committerStephen Kelly <steveire@gmail.com>2015-07-27 20:09:38 +0200
commit0e0258c8b9c6cab7c55c90687b30d65a83783c2f (patch)
treec2c2b013f26ab82d9ca428f11b174ce11906a430 /Source
parenta8e5d838edcb692ff69c2073cf692d7067f52c67 (diff)
downloadcmake-0e0258c8b9c6cab7c55c90687b30d65a83783c2f.tar.gz
cmGlobalGenerator: Split creation of generator object from initialization.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalGenerator.cxx15
-rw-r--r--Source/cmGlobalGenerator.h1
2 files changed, 15 insertions, 1 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index fcb59982b9..45ef3998c0 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1242,6 +1242,7 @@ void cmGlobalGenerator::Generate()
// Create per-target generator information.
this->CreateGeneratorTargets();
+ this->InitGeneratorTargets();
#ifdef CMAKE_BUILD_WITH_CMAKE
for (AutogensType::iterator it = autogens.begin(); it != autogens.end();
@@ -1471,7 +1472,6 @@ void cmGlobalGenerator::CreateGeneratorTargets(cmLocalGenerator *lg)
{
cmTarget* t = &ti->second;
cmGeneratorTarget* gt = new cmGeneratorTarget(t, lg);
- this->ComputeTargetObjectDirectory(gt);
this->GeneratorTargets[t] = gt;
generatorTargets[t] = gt;
}
@@ -1488,6 +1488,19 @@ void cmGlobalGenerator::CreateGeneratorTargets(cmLocalGenerator *lg)
}
//----------------------------------------------------------------------------
+void cmGlobalGenerator::InitGeneratorTargets()
+{
+ for(cmGeneratorTargetsType::iterator ti =
+ this->GeneratorTargets.begin(); ti != this->GeneratorTargets.end(); ++ti)
+ {
+ if (!ti->second->Target->IsImported())
+ {
+ this->ComputeTargetObjectDirectory(ti->second);
+ }
+ }
+}
+
+//----------------------------------------------------------------------------
void cmGlobalGenerator::CreateGeneratorTargets()
{
// Construct per-target generator information.
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 398335b6f5..b9a32bf7b0 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -485,6 +485,7 @@ private:
cmGeneratorTargetsType GeneratorTargets;
friend class cmake;
void CreateGeneratorTargets(cmLocalGenerator* lg);
+ void InitGeneratorTargets();
void CreateGeneratorTargets();
void ClearGeneratorMembers();