Skip to content

Commit 60e998b

Browse files
authored
Don't use 'system' include/framework paths as fallback 'user' include/framework paths in the base config (#13247)
1 parent e1d824f commit 60e998b

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

Extension/src/LanguageServer/configurations.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ export interface CompilerDefaults {
120120
knownCompilers: KnownCompiler[];
121121
cStandard: string;
122122
cppStandard: string;
123-
includes: string[];
124-
frameworks: string[];
125123
windowsSdkVersion: string;
126124
intelliSenseMode: string;
127125
trustedCompilerFound: boolean;
@@ -143,8 +141,6 @@ export class CppProperties {
143141
private knownCompilers?: KnownCompiler[];
144142
private defaultCStandard: string | null = null;
145143
private defaultCppStandard: string | null = null;
146-
private defaultIncludes: string[] | null = null;
147-
private defaultFrameworks?: string[];
148144
private defaultWindowsSdkVersion: string | null = null;
149145
private isCppPropertiesJsonVisible: boolean = false;
150146
private vcpkgIncludes: string[] = [];
@@ -295,8 +291,6 @@ export class CppProperties {
295291
this.knownCompilers = compilerDefaults.knownCompilers;
296292
this.defaultCStandard = compilerDefaults.cStandard;
297293
this.defaultCppStandard = compilerDefaults.cppStandard;
298-
this.defaultIncludes = compilerDefaults.includes;
299-
this.defaultFrameworks = compilerDefaults.frameworks;
300294
this.defaultWindowsSdkVersion = compilerDefaults.windowsSdkVersion;
301295
this.defaultIntelliSenseMode = compilerDefaults.intelliSenseMode !== "" ? compilerDefaults.intelliSenseMode : undefined;
302296
this.trustedCompilerFound = compilerDefaults.trustedCompilerFound;
@@ -349,7 +343,7 @@ export class CppProperties {
349343
}
350344

351345
private async applyDefaultIncludePathsAndFrameworks() {
352-
if (this.configurationIncomplete && this.defaultIncludes && this.defaultFrameworks && this.vcpkgPathReady) {
346+
if (this.configurationIncomplete && this.vcpkgPathReady) {
353347
const configuration: Configuration | undefined = this.CurrentConfiguration;
354348
if (configuration) {
355349
this.applyDefaultConfigurationValues(configuration);
@@ -382,9 +376,6 @@ export class CppProperties {
382376
if (isUnset(settings.defaultDefines)) {
383377
configuration.defines = (process.platform === 'win32') ? ["_DEBUG", "UNICODE", "_UNICODE"] : [];
384378
}
385-
if (isUnset(settings.defaultMacFrameworkPath) && process.platform === 'darwin') {
386-
configuration.macFrameworkPath = this.defaultFrameworks;
387-
}
388379
if ((isUnset(settings.defaultWindowsSdkVersion) || settings.defaultWindowsSdkVersion === "") && this.defaultWindowsSdkVersion && process.platform === 'win32') {
389380
configuration.windowsSdkVersion = this.defaultWindowsSdkVersion;
390381
}
@@ -972,13 +963,6 @@ export class CppProperties {
972963
if (!configuration.windowsSdkVersion && !!this.defaultWindowsSdkVersion) {
973964
configuration.windowsSdkVersion = this.defaultWindowsSdkVersion;
974965
}
975-
if (!origIncludePath && !!this.defaultIncludes) {
976-
const includePath: string[] = configuration.includePath || [];
977-
configuration.includePath = includePath.concat(this.defaultIncludes);
978-
}
979-
if (!configuration.macFrameworkPath && !!this.defaultFrameworks) {
980-
configuration.macFrameworkPath = this.defaultFrameworks;
981-
}
982966
}
983967
} else {
984968
// add compiler to list of trusted compilers

0 commit comments

Comments
 (0)