Skip to content

Commit

Permalink
fix precedence order of cmake.parallelJobs setting
Browse files Browse the repository at this point in the history
  • Loading branch information
gcampbell-msft committed Jul 10, 2023
1 parent 1ffca88 commit a1f1541
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drivers/cmakeDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,7 @@ export abstract class CMakeDriver implements vscode.Disposable {

const configurationScope = this.workspaceFolder ? vscode.Uri.file(this.workspaceFolder) : null;
const parallelJobsSetting = vscode.workspace.getConfiguration("cmake", configurationScope).inspect<number | undefined>('parallelJobs');
let numJobs: number | undefined = (parallelJobsSetting?.globalValue || parallelJobsSetting?.workspaceValue || parallelJobsSetting?.workspaceFolderValue);
let numJobs: number | undefined = (parallelJobsSetting?.workspaceFolderLanguageValue || parallelJobsSetting?.workspaceFolderValue || parallelJobsSetting?.globalValue);
// for Ninja generator, don't '-j' argument if user didn't define number of jobs
// let numJobs: number | undefined = this.config.numJobs;
if (numJobs === undefined && gen && !/Ninja/.test(gen)) {
Expand Down

0 comments on commit a1f1541

Please sign in to comment.