diff options
author | Nicolas Despres <nicolas.despres@gmail.com> | 2016-05-13 21:44:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-17 13:34:08 (GMT) |
commit | 0397c92a15e505021d75eb0a156a312b024eb85e (patch) | |
tree | fa65e2a77cb621f484cdbe4c4ef7cca711dbf05a | |
parent | 3b3ecdfa4872a86dcb8eb7d5f5478259890d4707 (diff) | |
download | CMake-0397c92a15e505021d75eb0a156a312b024eb85e.zip CMake-0397c92a15e505021d75eb0a156a312b024eb85e.tar.gz CMake-0397c92a15e505021d75eb0a156a312b024eb85e.tar.bz2 |
Ninja: Pre-compute "CMakeCache.txt" build target name
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 5 | ||||
-rw-r--r-- | Source/cmGlobalNinjaGenerator.h | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 864cd2b..df5a001 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -489,6 +489,7 @@ void cmGlobalNinjaGenerator::Generate() this->OpenRulesFileStream(); this->TargetAll = "all"; + this->CMakeCacheFile = "CMakeCache.txt"; this->PolicyCMP0058 = this->LocalGenerators[0]->GetMakefile()->GetPolicyStatus( @@ -1040,7 +1041,7 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os) } } } - knownDependencies.insert("CMakeCache.txt"); + knownDependencies.insert(this->CMakeCacheFile); for (TargetAliasMap::const_iterator i = this->TargetAliases.begin(); i != this->TargetAliases.end(); ++i) { @@ -1168,7 +1169,7 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os) implicitDeps.push_back(this->ConvertToNinjaPath(*fi)); } } - implicitDeps.push_back("CMakeCache.txt"); + implicitDeps.push_back(this->CMakeCacheFile); std::sort(implicitDeps.begin(), implicitDeps.end()); implicitDeps.erase(std::unique(implicitDeps.begin(), implicitDeps.end()), diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 151950b..28034f6 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -400,6 +400,7 @@ private: private: std::string TargetAll; + std::string CMakeCacheFile; }; #endif // ! cmGlobalNinjaGenerator_h |