presets: Fix buildPreset "jobs"

Fixes: #22273
This commit is contained in:
Sam Freed
2021-06-03 15:32:55 -07:00
committed by Brad King
parent c3206c8bd1
commit 6620e459ed
+3 -1
View File
@@ -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;
}