diff options
author | Fred Baksik <fred.baksik@mrcy.com> | 2020-10-26 22:32:59 (GMT) |
---|---|---|
committer | Fred Baksik <fred.baksik@mrcy.com> | 2020-10-26 22:32:59 (GMT) |
commit | f4c7d44d82dc568e659233934a1da2b8a7c42b25 (patch) | |
tree | ea2300e3c22ac8c750fa38fbbaf32fcc37376934 /Source/cmGlobalUnixMakefileGenerator3.cxx | |
parent | b3f1a292266099865e0896be9fd0d40803bda7e0 (diff) | |
download | CMake-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.cxx | 7 |
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)); } } |