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
This commit is contained in:
Justin Bogner 2016-06-01 23:29:26 +00:00
parent 7f48be03a6
commit 13440b924a

View File

@ -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()