diff options
author | Brad King <brad.king@kitware.com> | 2014-01-27 18:03:35 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-01-27 18:03:35 (GMT) |
commit | adf309cd0db0db51913b2054400e595cb60c0eba (patch) | |
tree | b8576d039be5f9c39f1c4f357fb7d1ab5a3bdc4f | |
parent | 20263b719fd454f0e0c66b588510e18f0213ab68 (diff) | |
parent | 2c426bfb2dbb0d00aee4eb68c53ddaa18d32bdaa (diff) | |
download | CMake-adf309cd0db0db51913b2054400e595cb60c0eba.zip CMake-adf309cd0db0db51913b2054400e595cb60c0eba.tar.gz CMake-adf309cd0db0db51913b2054400e595cb60c0eba.tar.bz2 |
Merge topic 'ninja-normalize-cmake-rerun-deps'
2c426bfb Ninja: Normalize paths of CMake re-run rule dependencies
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 5e1f1ed..731bc00 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -1110,16 +1110,24 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os) /*restat=*/ false, /*generator=*/ true); + cmLocalNinjaGenerator *ng = static_cast<cmLocalNinjaGenerator *>(lg); + 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()); - } + for(std::vector<cmLocalGenerator*>::const_iterator i = + this->LocalGenerators.begin(); i != this->LocalGenerators.end(); ++i) + { + std::vector<std::string> const& lf = (*i)->GetMakefile()->GetListFiles(); + for(std::vector<std::string>::const_iterator fi = lf.begin(); + fi != lf.end(); ++fi) + { + implicitDeps.push_back(ng->ConvertToNinjaPath(fi->c_str())); + } + } + implicitDeps.push_back("CMakeCache.txt"); + std::sort(implicitDeps.begin(), implicitDeps.end()); implicitDeps.erase(std::unique(implicitDeps.begin(), implicitDeps.end()), implicitDeps.end()); - implicitDeps.push_back("CMakeCache.txt"); this->WriteBuild(os, "Re-run CMake if any of its inputs changed.", |