From fc9b621e7a46c4c432f68dd3c9692c3fcb85278a Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Wed, 1 Jun 2016 23:29:26 +0000 Subject: [PATCH] cmake: Fix color diags under ninja if the compiler is "AppleClang" Apparently cmake differentiates between Clang and AppleClang, and we fail to color our diagnostics if you have the latter. Fix that. llvm-svn: 271442 --- cmake/modules/HandleLLVMOptions.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index d61f7477252..75918cf7af1 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -559,7 +559,7 @@ add_llvm_definitions( -D__STDC_LIMIT_MACROS ) # clang doesn't print colored diagnostics when invoked from Ninja if (UNIX AND - CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND + CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_GENERATOR STREQUAL "Ninja") append("-fcolor-diagnostics" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) endif()