summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
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 f12396f..fadb0cf 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -230,9 +230,10 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
std::string assignments = variable_assignments.str();
const std::string& args = arguments;
bool useResponseFile = false;
- if (cmdLineLimit > 0
- && args.size() + buildstr.size() + assignments.size()
- > (size_t) cmdLineLimit) {
+ if (cmdLineLimit < 0 ||
+ (cmdLineLimit > 0 &&
+ (args.size() + buildstr.size() + assignments.size())
+ > static_cast<size_t>(cmdLineLimit))) {
variable_assignments.str(std::string());
cmGlobalNinjaGenerator::WriteVariable(variable_assignments,
"RSP_FILE", rspfile, "", 1);