Просмотр исходного кода

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

Fixes: #15054, #16727
Johnny Jazeix 6 лет назад
Родитель
Сommit
7d6639bf8d
1 измененных файлов с 4 добавлено и 1 удалено
  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;