Browse Source

presets: Fix buildPreset "jobs"

Fixes: #22273
Sam Freed 4 years ago
parent
commit
5d67632813
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Source/cmake.cxx

+ 3 - 1
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;
     }