aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-02-28 02:01:55 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-02-28 02:01:55 +0000
commit33177f591a46e2a476fe8ab49f7055532b48fd40 (patch)
tree71cc9c3d00c6f7a809f35bfe891a0cb2dbfcccc8 /cmake/modules
parent9ca12d2e2f14b0b59c839943e58d8aa5d1a271cb (diff)
downloadexternal_llvm-33177f591a46e2a476fe8ab49f7055532b48fd40.zip
external_llvm-33177f591a46e2a476fe8ab49f7055532b48fd40.tar.gz
external_llvm-33177f591a46e2a476fe8ab49f7055532b48fd40.tar.bz2
Enable -Wcovered-switch-default as it matches the switch style used in llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151609 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/modules')
-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 496e8b3..afe4347 100644
--- a/cmake/modules/HandleLLVMOptions.cmake
+++ b/cmake/modules/HandleLLVMOptions.cmake
@@ -182,6 +182,10 @@ elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
if (LLVM_ENABLE_PEDANTIC)
add_llvm_definitions( -pedantic -Wno-long-long )
endif (LLVM_ENABLE_PEDANTIC)
+ check_cxx_compiler_flag("-Wcovered-switch-default" SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG)
+ if( SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG )
+ add_llvm_definitions( -Wcovered-switch-default )
+ endif()
endif (LLVM_ENABLE_WARNINGS)
if (LLVM_ENABLE_WERROR)
add_llvm_definitions( -Werror )