Browse Source

CodeLite: Do not pass -j argument with CPU count 0

Fixes: #15054, #16727
Johnny Jazeix 6 years ago
parent
commit
7d6639bf8d
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Source/cmExtraCodeLiteGenerator.cxx

+ 4 - 1
Source/cmExtraCodeLiteGenerator.cxx

@@ -635,7 +635,10 @@ std::string cmExtraCodeLiteGenerator::GetBuildCommand(
   if (generator == "NMake Makefiles" || generator == "Ninja") {
     ss << make;
   } else if (generator == "MinGW Makefiles" || generator == "Unix Makefiles") {
-    ss << make << " -f$(ProjectPath)/Makefile -j " << this->CpuCount;
+    ss << make << " -f$(ProjectPath)/Makefile";
+    if (this->CpuCount > 0) {
+      ss << " -j " << this->CpuCount;
+    }
   }
   if (!targetName.empty()) {
     ss << " " << targetName;