[PATCH] D47083: Enable colored diagnostics when building with gcc 4.9+.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 18 14:18:44 PDT 2018


rnk added inline comments.


================
Comment at: cmake/modules/HandleLLVMOptions.cmake:726-729
+    (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
+     (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND
+      NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9))))
+  append("-fdiagnostics-color" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
----------------
rnk wrote:
> Should we simplify these compiler version checks to `add_flag_if_supported("-fdiagnostics-color")`? We'd still need the UNIX && ninja check.
Ignore this, I wrote it before you answered @smeenai and only hit submit just now.


https://reviews.llvm.org/D47083





More information about the llvm-commits mailing list