summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-03 18:55:34 (GMT)
committerBrad King <brad.king@kitware.com>2020-09-04 13:44:30 (GMT)
commit17aba9c9a6a73dfc110c026abfe1f16e13cb1bec (patch)
tree0d1da07eb06b95bd565452cd5603576ab333f5b3 /Source
parent69ee18163b9cf062d1306386b1bffceccdb24e3c (diff)
downloadCMake-17aba9c9a6a73dfc110c026abfe1f16e13cb1bec.zip
CMake-17aba9c9a6a73dfc110c026abfe1f16e13cb1bec.tar.gz
CMake-17aba9c9a6a73dfc110c026abfe1f16e13cb1bec.tar.bz2
cmLocalUnixMakefileGenerator3: Generate targets in dependency order
Use the globally computed target ordering so that we generate all of a target's dependencies before generating the target itself.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 9825f1c..c449450 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -100,12 +100,13 @@ void cmLocalUnixMakefileGenerator3::Generate()
// Generate the rule files for each target.
cmGlobalUnixMakefileGenerator3* gg =
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
- for (const auto& target : this->GetGeneratorTargets()) {
- if (!target->IsInBuildSystem()) {
+ for (cmGeneratorTarget* gt :
+ this->GlobalGenerator->GetLocalGeneratorTargetsInOrder(this)) {
+ if (!gt->IsInBuildSystem()) {
continue;
}
std::unique_ptr<cmMakefileTargetGenerator> tg(
- cmMakefileTargetGenerator::New(target.get()));
+ cmMakefileTargetGenerator::New(gt));
if (tg) {
tg->WriteRuleFiles();
gg->RecordTargetProgress(tg.get());