Skip to content

Commit

Permalink
Don't use 'system' include/framework paths as fallback 'user' include…
Browse files Browse the repository at this point in the history
…/framework paths in the base config (#13247)
  • Loading branch information
Colengms authored Feb 7, 2025
1 parent e1d824f commit 60e998b
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions Extension/src/LanguageServer/configurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ export interface CompilerDefaults {
knownCompilers: KnownCompiler[];
cStandard: string;
cppStandard: string;
includes: string[];
frameworks: string[];
windowsSdkVersion: string;
intelliSenseMode: string;
trustedCompilerFound: boolean;
Expand All @@ -143,8 +141,6 @@ export class CppProperties {
private knownCompilers?: KnownCompiler[];
private defaultCStandard: string | null = null;
private defaultCppStandard: string | null = null;
private defaultIncludes: string[] | null = null;
private defaultFrameworks?: string[];
private defaultWindowsSdkVersion: string | null = null;
private isCppPropertiesJsonVisible: boolean = false;
private vcpkgIncludes: string[] = [];
Expand Down Expand Up @@ -295,8 +291,6 @@ export class CppProperties {
this.knownCompilers = compilerDefaults.knownCompilers;
this.defaultCStandard = compilerDefaults.cStandard;
this.defaultCppStandard = compilerDefaults.cppStandard;
this.defaultIncludes = compilerDefaults.includes;
this.defaultFrameworks = compilerDefaults.frameworks;
this.defaultWindowsSdkVersion = compilerDefaults.windowsSdkVersion;
this.defaultIntelliSenseMode = compilerDefaults.intelliSenseMode !== "" ? compilerDefaults.intelliSenseMode : undefined;
this.trustedCompilerFound = compilerDefaults.trustedCompilerFound;
Expand Down Expand Up @@ -349,7 +343,7 @@ export class CppProperties {
}

private async applyDefaultIncludePathsAndFrameworks() {
if (this.configurationIncomplete && this.defaultIncludes && this.defaultFrameworks && this.vcpkgPathReady) {
if (this.configurationIncomplete && this.vcpkgPathReady) {
const configuration: Configuration | undefined = this.CurrentConfiguration;
if (configuration) {
this.applyDefaultConfigurationValues(configuration);
Expand Down Expand Up @@ -382,9 +376,6 @@ export class CppProperties {
if (isUnset(settings.defaultDefines)) {
configuration.defines = (process.platform === 'win32') ? ["_DEBUG", "UNICODE", "_UNICODE"] : [];
}
if (isUnset(settings.defaultMacFrameworkPath) && process.platform === 'darwin') {
configuration.macFrameworkPath = this.defaultFrameworks;
}
if ((isUnset(settings.defaultWindowsSdkVersion) || settings.defaultWindowsSdkVersion === "") && this.defaultWindowsSdkVersion && process.platform === 'win32') {
configuration.windowsSdkVersion = this.defaultWindowsSdkVersion;
}
Expand Down Expand Up @@ -972,13 +963,6 @@ export class CppProperties {
if (!configuration.windowsSdkVersion && !!this.defaultWindowsSdkVersion) {
configuration.windowsSdkVersion = this.defaultWindowsSdkVersion;
}
if (!origIncludePath && !!this.defaultIncludes) {
const includePath: string[] = configuration.includePath || [];
configuration.includePath = includePath.concat(this.defaultIncludes);
}
if (!configuration.macFrameworkPath && !!this.defaultFrameworks) {
configuration.macFrameworkPath = this.defaultFrameworks;
}
}
} else {
// add compiler to list of trusted compilers
Expand Down

0 comments on commit 60e998b

Please sign in to comment.