aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules/HandleLLVMOptions.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/HandleLLVMOptions.cmake')
-rw-r--r--cmake/modules/HandleLLVMOptions.cmake4
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 )