From 3f4e5e8c3d3926af0a0f000005b4c1547cb3fd15 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 1 Sep 2015 18:37:33 +0200 Subject: [PATCH 1/2] cmState: Return end snapshot for GetBuildsystemDirectoryParent. This is the appropriate snapshot for future use. Existing users of this method are mostly just calling GetDirectory on the result, but the progress tracking of the Makefile generator needs a consistent snapshot to be used, so the end snapshot should be consistently used. --- Source/cmState.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmState.cxx b/Source/cmState.cxx index b30c10b1a..63909ab4c 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -1067,7 +1067,8 @@ cmState::Snapshot cmState::Snapshot::GetBuildsystemDirectoryParent() const PositionType parentPos = this->Position->DirectoryParent; if (parentPos != this->State->SnapshotData.Root()) { - snapshot = Snapshot(this->State, parentPos); + snapshot = Snapshot(this->State, + parentPos->BuildSystemDirectory->DirectoryEnd); } return snapshot; From 5d6aa3648bb6d8f3be320fc08e16e810a782c054 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 1 Sep 2015 18:46:05 +0200 Subject: [PATCH 2/2] cmLocalGenerator: Always return the end snapshot state of a directory. This is needed for proper makefile progress tracking. The cmLocalGenerator is constructed at configure-time, but only used at generate time. The StateSnapshot member is currently populated before configuring, so use the Makefile to get the end snapshot. --- Source/cmLocalGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index b360c2297..46d5cd849 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -487,7 +487,7 @@ cmState* cmLocalGenerator::GetState() const cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const { - return this->StateSnapshot; + return this->Makefile->GetStateSnapshot(); } // List of variables that are replaced when