diff options
author | Sam Freed <safreed@microsoft.com> | 2021-06-03 15:32:55 -0700 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-06-08 07:47:24 -0400 |
commit | 5d67632813d8f086fb6d2ec26d5bad495aa0d876 (patch) | |
tree | 975cf83e3b3cc857f7695d0f420d72350c8e04a0 | |
parent | 93e396b402d8736bd3c7a0a9b61113ceff819144 (diff) | |
download | cmake-5d67632813d8f086fb6d2ec26d5bad495aa0d876.tar.gz |
presets: Fix buildPreset "jobs"
Fixes: #22273
-rw-r--r-- | Source/cmake.cxx | 4 |
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; } |