GHS: Fix gbuild job control

gbuild command line is "-parallel[=n]".

Fixes: #23252
This commit is contained in:
Fred Baksik 2022-03-16 16:24:37 -04:00
parent e91c23402e
commit 2f2e88900e

View File

@ -523,9 +523,10 @@ cmGlobalGhsMultiGenerator::GenerateBuildCommand(
makeCommand.Add(this->SelectMakeProgram(makeProgram, gbuild));
if (jobs != cmake::NO_BUILD_PARALLEL_LEVEL) {
makeCommand.Add("-parallel");
if (jobs != cmake::DEFAULT_BUILD_PARALLEL_LEVEL) {
makeCommand.Add(std::to_string(jobs));
if (jobs == cmake::DEFAULT_BUILD_PARALLEL_LEVEL) {
makeCommand.Add("-parallel");
} else {
makeCommand.Add(std::string("-parallel=") + std::to_string(jobs));
}
}