summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2014-11-05 20:42:18 (GMT)
committerBrad King <brad.king@kitware.com>2014-11-14 16:56:33 (GMT)
commitf42d86f0b834c73b28a919ef1b4279753a6ec1bd (patch)
tree69e16035448c6caad5c14d52ad85ae5787b6c260 /Source/cmGlobalNinjaGenerator.cxx
parentf281ae01a2b89d8a7d327b3f6e73b727195d8dfd (diff)
downloadCMake-f42d86f0b834c73b28a919ef1b4279753a6ec1bd.zip
CMake-f42d86f0b834c73b28a919ef1b4279753a6ec1bd.tar.gz
CMake-f42d86f0b834c73b28a919ef1b4279753a6ec1bd.tar.bz2
Ninja: Implement USES_TERMINAL using the console pool if available
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 688eca4..60ab3e4 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -250,6 +250,7 @@ void
cmGlobalNinjaGenerator::WriteCustomCommandBuild(const std::string& command,
const std::string& description,
const std::string& comment,
+ bool uses_terminal,
const cmNinjaDeps& outputs,
const cmNinjaDeps& deps,
const cmNinjaDeps& orderOnly)
@@ -266,6 +267,10 @@ cmGlobalNinjaGenerator::WriteCustomCommandBuild(const std::string& command,
cmNinjaVars vars;
vars["COMMAND"] = cmd;
vars["DESC"] = EncodeLiteral(description);
+ if (uses_terminal && SupportsConsolePool())
+ {
+ vars["pool"] = "console";
+ }
this->WriteBuild(*this->BuildFileStream,
comment,
@@ -826,6 +831,7 @@ void cmGlobalNinjaGenerator::WriteAssumedSourceDependencies()
std::copy(i->second.begin(), i->second.end(), std::back_inserter(deps));
WriteCustomCommandBuild(/*command=*/"", /*description=*/"",
"Assume dependencies for generated source file.",
+ /*uses_terminal*/false,
cmNinjaDeps(1, i->first), deps);
}
}