diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-05-04 03:23:36 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-05-04 03:23:36 +0000 |
commit | 18efed7adc79c1970f307bb5b015d199012ba872 (patch) | |
tree | ccd3dd94f2e698bc65dc7d17a189a05097503f3b /cmake | |
parent | e3ee49fb2728dcb9702b5be0c3c80f472ffccefc (diff) |
Pass -fcolor-diagnostics when it is supported. This makes a difference when
using cmake+ninja, since ninja buffers the compiler output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/HandleLLVMOptions.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index d10e59a097..da31cc4c8d 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -190,6 +190,10 @@ elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE ) if( SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG ) add_llvm_definitions( -Wcovered-switch-default ) endif() + check_cxx_compiler_flag("-Werror -fcolor-diagnostics" SUPPORTS_FCOLOR_DIAGNOSTICS_FLAG) + if( SUPPORTS_FCOLOR_DIAGNOSTICS_FLAG ) + add_llvm_definitions( -fcolor-diagnostics ) + endif() endif (LLVM_ENABLE_WARNINGS) if (LLVM_ENABLE_WERROR) add_llvm_definitions( -Werror ) |