summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorJames Johnston <johnstonj.public@codenest.com>2015-08-08 20:04:08 (GMT)
committerJames Johnston <johnstonj.public@codenest.com>2015-08-09 17:31:24 (GMT)
commitc5ac2b9df36a57d3b88e80a2d1c382d753faf2da (patch)
tree134214bb83e7335b6382a7a5dde11f1e6a8064a1 /Source/cmLocalNinjaGenerator.cxx
parent101ba25e6a2c177f9f3a81f3879a171256806756 (diff)
downloadCMake-c5ac2b9df36a57d3b88e80a2d1c382d753faf2da.zip
CMake-c5ac2b9df36a57d3b88e80a2d1c382d753faf2da.tar.gz
CMake-c5ac2b9df36a57d3b88e80a2d1c382d753faf2da.tar.bz2
Ninja: Centralized required Ninja version numbers and comparisons.
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r--Source/cmLocalNinjaGenerator.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 9889bd4..aaad075 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -193,16 +193,14 @@ void cmLocalNinjaGenerator::WriteProjectHeader(std::ostream& os)
void cmLocalNinjaGenerator::WriteNinjaRequiredVersion(std::ostream& os)
{
// Default required version
- // Ninja generator uses 'deps' and 'msvc_deps_prefix' introduced in 1.3
- std::string requiredVersion = "1.3";
+ std::string requiredVersion =
+ this->GetGlobalNinjaGenerator()->RequiredNinjaVersion();
// Ninja generator uses the 'console' pool if available (>= 1.5)
- std::string usedVersion = this->GetGlobalNinjaGenerator()->ninjaVersion();
- if(cmSystemTools::VersionCompare(cmSystemTools::OP_LESS,
- usedVersion.c_str(),
- "1.5") == false)
+ if(this->GetGlobalNinjaGenerator()->SupportsConsolePool())
{
- requiredVersion = "1.5";
+ requiredVersion =
+ this->GetGlobalNinjaGenerator()->RequiredNinjaVersionForConsolePool();
}
cmGlobalNinjaGenerator::WriteComment(os,