diff options
author | Brad King <brad.king@kitware.com> | 2020-10-28 11:38:00 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-10-28 11:38:07 (GMT) |
commit | 9b4016a61aed3d86add35d70b803211bd60bc74b (patch) | |
tree | 8fa07d2c659044fb2f1c5d3e6017fe99680cb460 /Source/cmGlobalXCodeGenerator.cxx | |
parent | a4a33ef3bec3156510cd75250680ba1a69552f17 (diff) | |
parent | e794509faa4ca430072539e0ab5046fca4cd0028 (diff) | |
download | CMake-9b4016a61aed3d86add35d70b803211bd60bc74b.zip CMake-9b4016a61aed3d86add35d70b803211bd60bc74b.tar.gz CMake-9b4016a61aed3d86add35d70b803211bd60bc74b.tar.bz2 |
Merge topic 'xcode_build_jobs'
e794509faa XCode: Use -j build option when job capacity is specified by user
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5429
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index e7bbf72..dd4a4a8 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -503,16 +503,15 @@ cmGlobalXCodeGenerator::GenerateBuildCommand( } } - if (this->XcodeBuildSystem >= BuildSystem::Twelve) { + if ((this->XcodeBuildSystem >= BuildSystem::Twelve) || + (jobs != cmake::NO_BUILD_PARALLEL_LEVEL)) { makeCommand.Add("-parallelizeTargets"); } makeCommand.Add("-configuration", (config.empty() ? "Debug" : config)); - if (jobs != cmake::NO_BUILD_PARALLEL_LEVEL) { - makeCommand.Add("-jobs"); - if (jobs != cmake::DEFAULT_BUILD_PARALLEL_LEVEL) { - makeCommand.Add(std::to_string(jobs)); - } + if ((jobs != cmake::NO_BUILD_PARALLEL_LEVEL) && + (jobs != cmake::DEFAULT_BUILD_PARALLEL_LEVEL)) { + makeCommand.Add("-jobs", std::to_string(jobs)); } if (this->XcodeVersion >= 70) { |