summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorFred Baksik <fred.baksik@mrcy.com>2020-10-26 22:32:59 (GMT)
committerFred Baksik <fred.baksik@mrcy.com>2020-10-26 22:32:59 (GMT)
commitf4c7d44d82dc568e659233934a1da2b8a7c42b25 (patch)
treeea2300e3c22ac8c750fa38fbbaf32fcc37376934 /Source/cmGlobalUnixMakefileGenerator3.cxx
parentb3f1a292266099865e0896be9fd0d40803bda7e0 (diff)
downloadCMake-f4c7d44d82dc568e659233934a1da2b8a7c42b25.zip
CMake-f4c7d44d82dc568e659233934a1da2b8a7c42b25.tar.gz
CMake-f4c7d44d82dc568e659233934a1da2b8a7c42b25.tar.bz2
Makefiles: Use -j option as "-jN" and not "-j N"
Fixes: #21090
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 2c934e1..c6c540b 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -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));
}
}