How to force GCC/G++ to provide colored output

Just add the

-fdiagnostics-color=always

compiler flag