From 70d0077574166a6a145c1901aca68758a4eeb36b Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Wed, 30 Jun 2021 13:30:16 -0700 Subject: [PATCH] cmake: don't enable color diagnostics for xcc The compiler option "-fdiagnostics-color=always" is not known to XCC (which is based on really old GCC). So don't enable color diagnostic output when building with XCC. Signed-off-by: Daniel Leung --- cmake/compiler/gcc/compiler_flags.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/compiler/gcc/compiler_flags.cmake b/cmake/compiler/gcc/compiler_flags.cmake index 4ca64522085..4e8883992de 100644 --- a/cmake/compiler/gcc/compiler_flags.cmake +++ b/cmake/compiler/gcc/compiler_flags.cmake @@ -192,4 +192,6 @@ set_property(TARGET compiler-cpp PROPERTY no_threadsafe_statics "-fno-threadsafe set_property(TARGET asm PROPERTY required "-xassembler-with-cpp") # gcc flag for colourful diagnostic messages +if (NOT COMPILER STREQUAL "xcc") set_compiler_property(PROPERTY diagnostic -fdiagnostics-color=always) +endif()