summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-06-09 11:57:27 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-06-09 11:57:34 (GMT)
commit072f8b7d0e3ee6b9e57de640957af752410becd4 (patch)
tree4416907131e20322bc886870318c3e1ebf421759 /Source/cmake.cxx
parent5d8cb4be4843e90aeb087eda972253b7a9de6379 (diff)
parentde2b14a7117be203544f3014d2a0a9cac93f9a1e (diff)
downloadCMake-072f8b7d0e3ee6b9e57de640957af752410becd4.zip
CMake-072f8b7d0e3ee6b9e57de640957af752410becd4.tar.gz
CMake-072f8b7d0e3ee6b9e57de640957af752410becd4.tar.bz2
Merge topic 'presets-build-fixes'
de2b14a711 Merge branch 'backport-3.20-presets-build-fixes' into presets-build-fixes 534c40e6d8 presets: Fix buildPreset "targets" not allowing a single string 5d67632813 presets: Fix buildPreset "jobs" 93e396b402 presets: Fix buildPreset "jobs" field test case efe7ac9022 presets: Fix buildPreset "targets" not allowing a single string Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kyle Edwards <kyle.edwards@kitware.com> Merge-request: !6190
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index eb4c0b6..7868859 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -3276,7 +3276,9 @@ int cmake::Build(int jobs, std::string dir, std::vector<std::string> targets,
this->UnprocessedPresetEnvironment = expandedPreset->Environment;
this->ProcessPresetEnvironment();
- if (jobs == cmake::DEFAULT_BUILD_PARALLEL_LEVEL && expandedPreset->Jobs) {
+ if ((jobs == cmake::DEFAULT_BUILD_PARALLEL_LEVEL ||
+ jobs == cmake::NO_BUILD_PARALLEL_LEVEL) &&
+ expandedPreset->Jobs) {
jobs = *expandedPreset->Jobs;
}