summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraCodeLiteGenerator.cxx
diff options
context:
space:
mode:
authorJohnny Jazeix <jazeix@gmail.com>2019-11-18 21:10:57 (GMT)
committerJohnny Jazeix <jazeix@gmail.com>2019-11-18 21:10:57 (GMT)
commit7d6639bf8d9298d9f4c81fa035cda5d34a6e1622 (patch)
treed8f45b56a022a9ec2498eab2d4408d7cb6c80fa4 /Source/cmExtraCodeLiteGenerator.cxx
parentcbedead9a25c12272918f1f70c8a1e1417605728 (diff)
downloadCMake-7d6639bf8d9298d9f4c81fa035cda5d34a6e1622.zip
CMake-7d6639bf8d9298d9f4c81fa035cda5d34a6e1622.tar.gz
CMake-7d6639bf8d9298d9f4c81fa035cda5d34a6e1622.tar.bz2
CodeLite: Do not pass -j argument with CPU count 0
Fixes: #15054, #16727
Diffstat (limited to 'Source/cmExtraCodeLiteGenerator.cxx')
-rw-r--r--Source/cmExtraCodeLiteGenerator.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index 269e8dd..3557e5c 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/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;