Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes conflict between -DCMAKE_GENERATOR:STRING=Ninja and -G "Visual Studio 16 2019" -A x64 #1753

Merged
merged 3 commits into from
May 4, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/drivers/cmfileapi-driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,13 @@ export class CMakeFileApiDriver extends codemodel.CodeModelDriver {
const bindir = util.lightNormalizePath(this.binaryDir);
args.push(`-B${bindir}`);
const gen = this.generator;
if (gen) {
let has_gen = false;
for (const arg of args) {
if (arg.startsWith("-DCMAKE_GENERATOR:STRING=")) {
has_gen = true;
}
}
if (!has_gen && gen) {
args.push('-G');
args.push(gen.name);
if (gen.toolset) {
Expand Down