Skip to content

Commit

Permalink
User defined generator has priority over any other selection criteria (
Browse files Browse the repository at this point in the history
  • Loading branch information
andreeis authored Nov 12, 2019
1 parent f524926 commit 45fa57f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/drivers/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,17 @@ export abstract class CMakeDriver implements vscode.Disposable {
if (kit.preferredGenerator)
preferredGenerators.push(kit.preferredGenerator);

this._generator = await this.findBestGenerator(preferredGenerators);
// Use the "best generator" selection logic only if the user did not define already
// in settings (via "cmake.generator") a particular generator to be used.
if (this.config.generator) {
this._generator = {
name: this.config.generator,
platform: this.config.platform || undefined,
toolset: this.config.toolset || undefined,
};
} else {
this._generator = await this.findBestGenerator(preferredGenerators);
}
}

protected abstract doSetKit(needsClean: boolean, cb: () => Promise<void>): Promise<void>;
Expand Down

0 comments on commit 45fa57f

Please sign in to comment.