Skip to content

Commit

Permalink
default to c++14 on mac for build and run active file
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbrow committed Aug 7, 2023
1 parent ae904ec commit 42d1e2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Extension/src/LanguageServer/cppBuildTaskProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ export class CppBuildTaskProvider implements TaskProvider {
isClang ?
['-fcolor-diagnostics', '-fansi-escape-codes', '-g', '${file}', '-o', programName] :
['-fdiagnostics-color=always', '-g', '${file}', '-o', programName];
if (isClang && os.platform() === 'darwin') {
args.unshift('-std=c++14');
}
if (compilerArgs && compilerArgs.length > 0) {
args = args.concat(compilerArgs);
}
Expand Down

0 comments on commit 42d1e2e

Please sign in to comment.