summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-02 10:59:06 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-28 16:44:39 (GMT)
commit2b9a25d7f723a9876e2979de8e6c06881e0312dc (patch)
tree026259069752be3f3200c369b11f71cf7a4b9ddb
parent3e08b4df95208286d8891d76234f7910ff5c1d1c (diff)
downloadCMake-2b9a25d7f723a9876e2979de8e6c06881e0312dc.zip
CMake-2b9a25d7f723a9876e2979de8e6c06881e0312dc.tar.gz
CMake-2b9a25d7f723a9876e2979de8e6c06881e0312dc.tar.bz2
cmGlobalGenerator: Create global targets directly after Configure.
-rw-r--r--Source/cmGlobalGenerator.cxx35
1 files changed, 16 insertions, 19 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 08ab163..b3f3cba 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1146,6 +1146,22 @@ void cmGlobalGenerator::Configure()
dirMf->Configure();
dirMf->EnforceDirectoryLevelRules();
+ // Put a copy of each global target in every directory.
+ cmTargets globalTargets;
+ this->CreateDefaultGlobalTargets(&globalTargets);
+
+ for (unsigned int i = 0; i < this->Makefiles.size(); ++i)
+ {
+ cmMakefile* mf = this->Makefiles[i];
+ cmTargets* targets = &(mf->GetTargets());
+ cmTargets::iterator tit;
+ for ( tit = globalTargets.begin(); tit != globalTargets.end(); ++ tit )
+ {
+ (*targets)[tit->first] = tit->second;
+ (*targets)[tit->first].SetMakefile(mf);
+ }
+ }
+
// update the cache entry for the number of local generators, this is used
// for progress
char num[100];
@@ -1183,25 +1199,6 @@ void cmGlobalGenerator::Configure()
}
this->CMakeInstance->UpdateProgress(msg.str().c_str(), -1);
}
-
- unsigned int i;
-
- // Put a copy of each global target in every directory.
- cmTargets globalTargets;
- this->CreateDefaultGlobalTargets(&globalTargets);
-
- for (i = 0; i < this->Makefiles.size(); ++i)
- {
- cmMakefile* mf = this->Makefiles[i];
- cmTargets* targets = &(mf->GetTargets());
- cmTargets::iterator tit;
- for ( tit = globalTargets.begin(); tit != globalTargets.end(); ++ tit )
- {
- (*targets)[tit->first] = tit->second;
- (*targets)[tit->first].SetMakefile(mf);
- }
- }
-
}
void cmGlobalGenerator::CreateGenerationObjects(TargetTypes targetTypes)