mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 04:39:44 +00:00
Add colored diagnostics when building LLVM with cmake + ninja + clang
When invoked from Ninja, clang does not detect that it can use colors : see https://github.com/martine/ninja/issues/174 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182878 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f567a6d39b
commit
745825f582
@ -266,3 +266,10 @@ endif()
|
||||
add_llvm_definitions( -D__STDC_CONSTANT_MACROS )
|
||||
add_llvm_definitions( -D__STDC_FORMAT_MACROS )
|
||||
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_GENERATOR STREQUAL "Ninja")
|
||||
append("-fcolor-diagnostics" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user