From fdcece77e745873eb979d2861970bccaad163635 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 4 Mar 2021 16:46:05 +0800 Subject: [PATCH] cmake: do not pass "-fdiagnostics-color" to as this option can be understood by GCC. see https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Message-Formatting-Options.html Signed-off-by: Kefu Chai --- src/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3572cb3fb4e8..1b45100eac8f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -187,7 +187,9 @@ set(DIAGNOSTICS_COLOR "auto" CACHE STRING "Used if the C/C++ compiler supports the -fdiagnostics-color option. May have one of three values -- 'auto' (default), 'always', or 'never'. If set to 'always' and the compiler supports the option, 'make [...] | less -R' will make visible diagnostics colorization of compiler output.") if(COMPILER_SUPPORTS_DIAGNOSTICS_COLOR) - add_compile_options(-fdiagnostics-color=${DIAGNOSTICS_COLOR}) + add_compile_options( + "$<$:-fdiagnostics-color=${DIAGNOSTICS_COLOR}>" + "$<$:-fdiagnostics-color=${DIAGNOSTICS_COLOR}>") endif() set(EXTRALIBS ${CMAKE_DL_LIBS}) -- 2.47.3