From: Kefu Chai Date: Thu, 4 Mar 2021 08:46:05 +0000 (+0800) Subject: cmake: do not pass "-fdiagnostics-color" to as X-Git-Tag: v17.1.0~2681^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fdcece77e745873eb979d2861970bccaad163635;p=ceph.git 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 --- 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})