@@ -220,7 +220,9 @@ export class CppProperties {
220
220
if ( process . platform === 'darwin' ) {
221
221
this . configurationJson . configurations [ this . CurrentConfiguration ] . macFrameworkPath = this . defaultFrameworks ;
222
222
}
223
- this . configurationJson . configurations [ this . CurrentConfiguration ] . compilerPath = this . defaultCompilerPath ;
223
+ if ( this . defaultCompilerPath ) {
224
+ this . configurationJson . configurations [ this . CurrentConfiguration ] . compilerPath = this . defaultCompilerPath ;
225
+ }
224
226
if ( this . defaultCStandard ) {
225
227
this . configurationJson . configurations [ this . CurrentConfiguration ] . cStandard = this . defaultCStandard ;
226
228
}
@@ -475,15 +477,16 @@ export class CppProperties {
475
477
476
478
// Update the compilerPath, cStandard, and cppStandard with the default if they're missing.
477
479
let config : Configuration = this . configurationJson . configurations [ this . CurrentConfiguration ] ;
478
- if ( config . compilerPath === undefined ) {
480
+ // Don't set the default if compileCommands exist, until it is fixed to have the correct value.
481
+ if ( config . compilerPath === undefined && this . defaultCompilerPath && ! config . compileCommands ) {
479
482
config . compilerPath = this . defaultCompilerPath ;
480
483
dirty = true ;
481
484
}
482
- if ( ! config . cStandard ) {
485
+ if ( ! config . cStandard && this . defaultCStandard ) {
483
486
config . cStandard = this . defaultCStandard ;
484
487
dirty = true ;
485
488
}
486
- if ( ! config . cppStandard ) {
489
+ if ( ! config . cppStandard && this . defaultCppStandard ) {
487
490
config . cppStandard = this . defaultCppStandard ;
488
491
dirty = true ;
489
492
}
0 commit comments