mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Enable -Wcovered-switch-default again, but add -Werror to the checks to make
sure we don't use it with compilers that don't support it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151665 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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("-Werror -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 )
|
||||
|
Reference in New Issue
Block a user