diff options
author | Fred Baksik <fdk17@ftml.net> | 2022-03-16 20:24:37 (GMT) |
---|---|---|
committer | Fred Baksik <fdk17@ftml.net> | 2022-03-17 20:56:51 (GMT) |
commit | 2f2e88900e922a225264125cbb9d08a002526121 (patch) | |
tree | 2cf142d0f0a880e8f0ec1e64b141eebef9753424 /Source | |
parent | e91c23402ea8d260339533a0ca2895bddc8a3c22 (diff) | |
download | CMake-2f2e88900e922a225264125cbb9d08a002526121.zip CMake-2f2e88900e922a225264125cbb9d08a002526121.tar.gz CMake-2f2e88900e922a225264125cbb9d08a002526121.tar.bz2 |
GHS: Fix gbuild job control
gbuild command line is "-parallel[=n]".
Fixes: #23252
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalGhsMultiGenerator.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx index 5e51dd2..836efb2 100644 --- a/Source/cmGlobalGhsMultiGenerator.cxx +++ b/Source/cmGlobalGhsMultiGenerator.cxx @@ -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)); } } |