summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorSam Freed <safreed@microsoft.com>2021-06-03 22:32:55 (GMT)
committerBrad King <brad.king@kitware.com>2021-06-08 11:47:24 (GMT)
commit5d67632813d8f086fb6d2ec26d5bad495aa0d876 (patch)
tree975cf83e3b3cc857f7695d0f420d72350c8e04a0 /Source/cmake.cxx
parent93e396b402d8736bd3c7a0a9b61113ceff819144 (diff)
downloadCMake-5d67632813d8f086fb6d2ec26d5bad495aa0d876.zip
CMake-5d67632813d8f086fb6d2ec26d5bad495aa0d876.tar.gz
CMake-5d67632813d8f086fb6d2ec26d5bad495aa0d876.tar.bz2
presets: Fix buildPreset "jobs"
Fixes: #22273
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 4d03821..db8600f 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;
}