diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2014-11-05 20:40:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-11-14 16:56:33 (GMT) |
commit | d5eae5563f99fb28c99695fb4886f1bd40d98414 (patch) | |
tree | 5bee2d8c0f7ad0ebb1d043d373ce235ff3c2b148 /Source/cmGlobalNinjaGenerator.cxx | |
parent | 4d1fedf46e9cbdb388728c9a986cbf89db810c73 (diff) | |
download | CMake-d5eae5563f99fb28c99695fb4886f1bd40d98414.zip CMake-d5eae5563f99fb28c99695fb4886f1bd40d98414.tar.gz CMake-d5eae5563f99fb28c99695fb4886f1bd40d98414.tar.bz2 |
Ninja: factor out the test for console pool support
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 498ae9a..688eca4 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -1141,9 +1141,7 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os) cmNinjaVars variables; // Use 'console' pool to get non buffered output of the CMake re-run call // Available since Ninja 1.5 - if(cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, - ninjaVersion().c_str(), - "1.5") == false) + if(SupportsConsolePool()) { variables["pool"] = "console"; } @@ -1185,6 +1183,12 @@ std::string cmGlobalNinjaGenerator::ninjaVersion() const return version; } +bool cmGlobalNinjaGenerator::SupportsConsolePool() const +{ + return cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, + ninjaVersion().c_str(), "1.5") == false; +} + void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os) { WriteRule(*this->RulesFileStream, |