Ninja: factor out the test for console pool support
This commit is contained in:
parent
4d1fedf46e
commit
d5eae5563f
|
@ -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,
|
||||
|
|
|
@ -299,6 +299,9 @@ public:
|
|||
virtual void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const;
|
||||
|
||||
std::string ninjaVersion() const;
|
||||
|
||||
bool SupportsConsolePool() const;
|
||||
|
||||
protected:
|
||||
|
||||
/// Overloaded methods. @see cmGlobalGenerator::Generate()
|
||||
|
|
Loading…
Reference in New Issue