From 9721faa71662b8b7fb9684bc8eac5f1dae94f45a Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Wed, 17 May 2023 16:36:55 +0200 Subject: [PATCH] enable compiler color output if available --- cue.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cue.py b/cue.py index cac3af2..26a1d3d 100644 --- a/cue.py +++ b/cue.py @@ -1209,6 +1209,15 @@ PERL = C:/Strawberry/perl/bin/perl -CSD''' with open(os.path.join(places['EPICS_BASE'], 'configure', 'CONFIG_SITE'), 'a') as f: f.write(extra_config) + # enable color in error and warning messages if the (cross) compiler supports it + with open(os.path.join(places['EPICS_BASE'], 'configure', 'CONFIG'), 'a') as f: + f.write(''' +ifdef T_A + COLOR_FLAG_$(T_A) := $(shell $(CPP) -fdiagnostics-color -E - /dev/null 2>/dev/null && echo -fdiagnostics-color) + $(info Checking if $(CPP) supports -fdiagnostics-color: $(if $(COLOR_FLAG_$(T_A)),yes,no)) + USR_CPPFLAGS += $(COLOR_FLAG_$(T_A)) +endif''') + fold_end('set.up.epics_build', 'Configuring EPICS build system') if ci['os'] == 'windows' and ci['choco']: