Enable -Wnon-virtual-dtor build warning

llvm-svn: 177385
This commit is contained in:
Alexey Samsonov 2013-03-19 10:10:03 +00:00
parent 6d02c1c598
commit ffb4ca8bb4
1 changed files with 2 additions and 0 deletions

View File

@ -209,6 +209,8 @@ elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
append_if(CMAKE_C_FLAGS "-Wcovered-switch-default" C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG) append_if(CMAKE_C_FLAGS "-Wcovered-switch-default" C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG)
append_if(CMAKE_CXX_FLAGS "-Wno-uninitialized" USE_NO_UNINITIALIZED) append_if(CMAKE_CXX_FLAGS "-Wno-uninitialized" USE_NO_UNINITIALIZED)
append_if(CMAKE_CXX_FLAGS "-Wno-maybe-uninitialized" USE_NO_MAYBE_UNINITIALIZED) append_if(CMAKE_CXX_FLAGS "-Wno-maybe-uninitialized" USE_NO_MAYBE_UNINITIALIZED)
check_cxx_compiler_flag("-Werror -Wnon-virtual-dtor" CXX_SUPPORTS_NON_VIRTUAL_DTOR_FLAG)
append_if(CMAKE_CXX_FLAGS "-Wnon-virtual-dtor" CXX_SUPPORTS_NON_VIRTUAL_DTOR_FLAG)
endif (LLVM_ENABLE_WARNINGS) endif (LLVM_ENABLE_WARNINGS)
if (LLVM_ENABLE_WERROR) if (LLVM_ENABLE_WERROR)
add_llvm_definitions( -Werror ) add_llvm_definitions( -Werror )