Makefiles: Use -j option as "-jN" and not "-j N"

Fixes: #21090
This commit is contained in:
Fred Baksik
2020-10-26 18:32:59 -04:00
parent b3f1a29226
commit f4c7d44d82

View File

@@ -590,9 +590,10 @@ cmGlobalUnixMakefileGenerator3::GenerateBuildCommand(
makeCommand.Add(this->SelectMakeProgram(makeProgram));
if (jobs != cmake::NO_BUILD_PARALLEL_LEVEL) {
makeCommand.Add("-j");
if (jobs != cmake::DEFAULT_BUILD_PARALLEL_LEVEL) {
makeCommand.Add(std::to_string(jobs));
if (jobs == cmake::DEFAULT_BUILD_PARALLEL_LEVEL) {
makeCommand.Add("-j");
} else {
makeCommand.Add("-j" + std::to_string(jobs));
}
}