File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Extension/src/LanguageServer Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,10 @@ export class CppProperties {
242242 if ( isUnset ( settings . defaultWindowsSdkVersion ) && this . defaultWindowsSdkVersion && process . platform === 'win32' ) {
243243 configuration . windowsSdkVersion = this . defaultWindowsSdkVersion ;
244244 }
245- if ( isUnset ( settings . defaultCompilerPath ) && this . defaultCompilerPath ) {
245+ if ( isUnset ( settings . defaultCompilerPath ) && this . defaultCompilerPath &&
246+ isUnset ( settings . defaultCompileCommands ) && ! configuration . compileCommands ) {
247+ // compile_commands.json already specifies a compiler. compilerPath overrides the compile_commands.json compiler so
248+ // don't set a default when compileCommands is in use.
246249 configuration . compilerPath = this . defaultCompilerPath ;
247250 }
248251 if ( isUnset ( settings . defaultCStandard ) && this . defaultCStandard ) {
You can’t perform that action at this time.
0 commit comments