aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-03-19 10:10:03 +0000
committerAlexey Samsonov <samsonov@google.com>2013-03-19 10:10:03 +0000
commit8483b4792621d7d0951d1bdddcb95713ffa2f5d5 (patch)
tree00935ae1d9036de9dafebce23d512619eb0682e9 /cmake
parent5ad5f5931e34d5be410b1e901640bc1c2d308612 (diff)
Enable -Wnon-virtual-dtor build warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177385 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/HandleLLVMOptions.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake
index 54c6606447..2ba0106df6 100644
--- a/cmake/modules/HandleLLVMOptions.cmake
+++ b/cmake/modules/HandleLLVMOptions.cmake
@@ -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_CXX_FLAGS "-Wno-uninitialized" USE_NO_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)
if (LLVM_ENABLE_WERROR)
add_llvm_definitions( -Werror )