summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 11d8653..2c00e06 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -106,6 +106,7 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
const cmNinjaDeps& implicitDeps,
const cmNinjaDeps& orderOnlyDeps,
const cmNinjaVars& variables,
+ bool suppressShell,
int cmdLineLimit)
{
// Make sure there is a rule.
@@ -177,8 +178,15 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
// check if a response file rule should be used
const std::string args = arguments.str();
- if (cmdLineLimit > 0 && args.size() > (size_t)cmdLineLimit)
+ if (suppressShell)
+ {
+ builds << "_NOSHELL";
+ }
+ else if (cmdLineLimit > 0 &&
+ args.size() + builds.str().size() > (size_t)cmdLineLimit)
+ {
builds << "_RSPFILE";
+ }
os << builds.str() << args;