summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.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/cmGlobalNinjaGenerator.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/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 088f0e1..b46d85c 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -1256,7 +1256,7 @@ std::string cmGlobalNinjaGenerator::ninjaCmd() const
return "ninja";
}
-std::string cmGlobalNinjaGenerator::ninjaVersion() const
+std::string cmGlobalNinjaGenerator::CurrentNinjaVersion() const
{
std::string version;
std::string command = ninjaCmd() + " --version";
@@ -1264,13 +1264,14 @@ std::string cmGlobalNinjaGenerator::ninjaVersion() const
&version, 0, 0, 0,
cmSystemTools::OUTPUT_NONE);
- return version;
+ return cmSystemTools::TrimWhitespace(version);
}
bool cmGlobalNinjaGenerator::SupportsConsolePool() const
{
return cmSystemTools::VersionCompare(cmSystemTools::OP_LESS,
- ninjaVersion().c_str(), "1.5") == false;
+ CurrentNinjaVersion().c_str(),
+ RequiredNinjaVersionForConsolePool().c_str()) == false;
}
void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os)