From: Rafael Espindola Date: Fri, 4 May 2012 03:23:36 +0000 (+0000) Subject: Pass -fcolor-diagnostics when it is supported. This makes a difference when X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=18efed7adc79c1970f307bb5b015d199012ba872;p=oota-llvm.git 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 --- diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index d10e59a0972..da31cc4c8dd 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 )