From ecaf985ae6804a21a22535b5605da4b7144d9de2 Mon Sep 17 00:00:00 2001 From: Colen Garoutte-Carson Date: Thu, 16 Sep 2021 16:37:50 -0700 Subject: [PATCH] Add to gcc compiler args for generated build tasks, to display colors in gcc output --- Extension/src/LanguageServer/cppBuildTaskProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extension/src/LanguageServer/cppBuildTaskProvider.ts b/Extension/src/LanguageServer/cppBuildTaskProvider.ts index 4f68fb2b1..d8f10724d 100644 --- a/Extension/src/LanguageServer/cppBuildTaskProvider.ts +++ b/Extension/src/LanguageServer/cppBuildTaskProvider.ts @@ -167,7 +167,7 @@ export class CppBuildTaskProvider implements TaskProvider { CppBuildTaskProvider.CppBuildSourceStr + ": " : "") + compilerPathBase + " " + localize("build_active_file", "build active file"); const filePath: string = path.join('${fileDirname}', '${fileBasenameNoExtension}'); const isWindows: boolean = os.platform() === 'win32'; - let args: string[] = isCl ? ['/Zi', '/EHsc', '/nologo', '/Fe:', filePath + '.exe', '${file}'] : ['-g', '${file}', '-o', filePath + (isWindows ? '.exe' : '')]; + let args: string[] = isCl ? ['/Zi', '/EHsc', '/nologo', '/Fe:', filePath + '.exe', '${file}'] : ['-fdiagnostics-color=always', '-g', '${file}', '-o', filePath + (isWindows ? '.exe' : '')]; if (compilerArgs && compilerArgs.length > 0) { args = args.concat(compilerArgs); }