[llvm-commits] [llvm] r156150 - /llvm/trunk/cmake/modules/HandleLLVMOptions.cmake

Rafael Espindola rafael.espindola at gmail.com
Thu May 3 20:23:36 PDT 2012


Author: rafael
Date: Thu May  3 22:23:36 2012
New Revision: 156150

URL: http://llvm.org/viewvc/llvm-project?rev=156150&view=rev
Log:
Pass -fcolor-diagnostics when it is supported. This makes a difference when
using cmake+ninja, since ninja buffers the compiler output.

Modified:
    llvm/trunk/cmake/modules/HandleLLVMOptions.cmake

Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=156150&r1=156149&r2=156150&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Thu May  3 22:23:36 2012
@@ -190,6 +190,10 @@
     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 )





More information about the llvm-commits mailing list