From 7fbc56ac400fe7aaafaa581bca2f2848287ce7fd Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 2 Aug 2015 10:41:55 +0200 Subject: [PATCH] cmGlobalUnixMakefileGenerator3: Implement progress in terms of cmState. --- Source/cmGlobalUnixMakefileGenerator3.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 6a139777a..8c8c56e8b 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -944,14 +944,17 @@ void cmGlobalUnixMakefileGenerator3::InitializeProgressMarks() continue; } + cmState::Snapshot csnp = lg->GetStateSnapshot(); + cmState::Snapshot tsnp = tlg->GetStateSnapshot(); + // Consider the directory containing the target and all its // parents until something excludes the target. - for(cmLocalGenerator* clg = lg; clg && !this->IsExcluded(clg, tlg); - clg = clg->GetParent()) + for( ; csnp.IsValid() && !this->IsExcluded(csnp, tsnp); + csnp = csnp.GetBuildsystemDirectoryParent()) { // This local generator includes the target. std::set& targetSet = - this->DirectoryTargetsMap[clg->GetStateSnapshot()]; + this->DirectoryTargetsMap[csnp]; targetSet.insert(gt); // Add dependencies of the included target. An excluded