Skip to content

Commit ecaf985

Browse files
committed
Add to gcc compiler args for generated build tasks, to display colors in gcc output
1 parent 4f137fe commit ecaf985

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Extension/src/LanguageServer/cppBuildTaskProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export class CppBuildTaskProvider implements TaskProvider {
167167
CppBuildTaskProvider.CppBuildSourceStr + ": " : "") + compilerPathBase + " " + localize("build_active_file", "build active file");
168168
const filePath: string = path.join('${fileDirname}', '${fileBasenameNoExtension}');
169169
const isWindows: boolean = os.platform() === 'win32';
170-
let args: string[] = isCl ? ['/Zi', '/EHsc', '/nologo', '/Fe:', filePath + '.exe', '${file}'] : ['-g', '${file}', '-o', filePath + (isWindows ? '.exe' : '')];
170+
let args: string[] = isCl ? ['/Zi', '/EHsc', '/nologo', '/Fe:', filePath + '.exe', '${file}'] : ['-fdiagnostics-color=always', '-g', '${file}', '-o', filePath + (isWindows ? '.exe' : '')];
171171
if (compilerArgs && compilerArgs.length > 0) {
172172
args = args.concat(compilerArgs);
173173
}

0 commit comments

Comments
 (0)