summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-01-16 14:24:13 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-01-16 14:24:13 (GMT)
commitce362f27d69686b3d72978e5ae0182357737c1a9 (patch)
tree04fb57bde2e0187ff6ac4f57627a5dc1ba62c3eb
parent2d5d690ea6a783dd781980bbf507b459c726718b (diff)
parent79859689005716ba38048d087ebe12f329e0229f (diff)
downloadCMake-ce362f27d69686b3d72978e5ae0182357737c1a9.zip
CMake-ce362f27d69686b3d72978e5ae0182357737c1a9.tar.gz
CMake-ce362f27d69686b3d72978e5ae0182357737c1a9.tar.bz2
Merge topic 'revert-ninja_fix_rerun'
79859689 Revert "Ninja: Avoid re-running CMake on next build after regeneration"
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx29
1 files changed, 5 insertions, 24 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 65b01db..ec91b0f 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -1107,46 +1107,27 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
/*deptype=*/ "",
/*rspfile=*/ "",
/*rspcontent*/ "",
- /*restat=*/ true,
+ /*restat=*/ false,
/*generator=*/ true);
- cmNinjaDeps implicitDeps, outputs, temp;
- outputs.push_back(NINJA_BUILD_FILE);
+ cmNinjaDeps implicitDeps;
for (std::vector<cmLocalGenerator *>::const_iterator i =
this->LocalGenerators.begin(); i != this->LocalGenerators.end(); ++i) {
const std::vector<std::string>& lf = (*i)->GetMakefile()->GetListFiles();
implicitDeps.insert(implicitDeps.end(), lf.begin(), lf.end());
const std::vector<std::string>& of = (*i)->GetMakefile()->GetOutputFiles();
- temp.insert(temp.end(), of.begin(), of.end());
+ implicitDeps.insert(implicitDeps.end(), of.begin(), of.end());
}
-
- //Add the CMakeCache.txt file to the implicit depends so that we catch
- //when somebody manually modifies the file.
- implicitDeps.push_back("CMakeCache.txt");
-
- //make sure nothing is in implicit depends twice
std::sort(implicitDeps.begin(), implicitDeps.end());
implicitDeps.erase(std::unique(implicitDeps.begin(), implicitDeps.end()),
implicitDeps.end());
-
-
- //make sure nothing is in outputs depends twice
- std::sort(temp.begin(), temp.end());
- temp.erase(std::unique(temp.begin(), temp.end()),
- temp.end());
-
- //make sure that anything that is in implicitDeps is also NOT in outputs
- std::set_difference(temp.begin(),
- temp.end(),
- implicitDeps.begin(),
- implicitDeps.end(),
- std::back_inserter(outputs));
+ implicitDeps.push_back("CMakeCache.txt");
this->WriteBuild(os,
"Re-run CMake if any of its inputs changed.",
"RERUN_CMAKE",
- outputs,
+ /*outputs=*/ cmNinjaDeps(1, NINJA_BUILD_FILE),
/*explicitDeps=*/ cmNinjaDeps(),
implicitDeps,
/*orderOnlyDeps=*/ cmNinjaDeps(),