Closed dirk-zimoch closed 1 year ago
Colors could be tuned setting the GCC_COLORS
environment variable, if desired.
Core group: This looks okay, approved.
Error free builds of EPICS base using this feature are here: 7.0: https://github.com/dirk-zimoch/epics-base/actions/runs/5044238284 3.15: https://github.com/dirk-zimoch/epics-base/actions/runs/5070554989
Newer gcc and clang support colored warning and error messages. This makes it easier to find warning in the bulk of make output. Unfortunately, this is disabled by default in a CI environment like github workers, because the compiler only colorizes its output to a terminal, which is not the case here. But it can be enabled explicitly with the flag
-fdiagnostics-color
in both, gcc and clang, provided the compiler is new enough to support colors.This merge requests enables the
-fdiagnostics-colors
flag if the (cross) compiler supports it. This is tested at the end ofCONFIG
, after the (cross) compiler has been set up. If other compilers support other flags to enable colors, those may be added later.I have added this feature in this ci-scripts repo only and not in EPICS base, because I do not want to add
-fdiagnostics-colors
to "normal" compilations in user's environments, because they may break if color is added unexpectedly.To see this feature in action, see https://github.com/epics-base/ci-scripts/actions/runs/5044562166/jobs/9047768964?pr=79#step:4:217 or my EPICS base run with this change enabled: https://github.com/dirk-zimoch/epics-base/actions/runs/5044238284