summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Freed <safreed@microsoft.com>2021-06-03 15:32:55 -0700
committerBrad King <brad.king@kitware.com>2021-06-08 07:47:24 -0400
commit5d67632813d8f086fb6d2ec26d5bad495aa0d876 (patch)
tree975cf83e3b3cc857f7695d0f420d72350c8e04a0
parent93e396b402d8736bd3c7a0a9b61113ceff819144 (diff)
downloadcmake-5d67632813d8f086fb6d2ec26d5bad495aa0d876.tar.gz
presets: Fix buildPreset "jobs"
Fixes: #22273
-rw-r--r--Source/cmake.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 4d03821161..db8600fc73 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -3164,7 +3164,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;
}