From 1ec58d41837f0dd2b1094f2b82b8a22b788133c9 Mon Sep 17 00:00:00 2001 From: Sam Spilsbury Date: Tue, 21 Oct 2014 16:13:59 +0800 Subject: [PATCH] Don't emit an error for deleting an object with a nonvirtual dtor. We want that behaviour at runtime to make sure ubsan works --- FindUBSan.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FindUBSan.cmake b/FindUBSan.cmake index 453d9cf..a31c68f 100644 --- a/FindUBSan.cmake +++ b/FindUBSan.cmake @@ -62,7 +62,7 @@ unset(CMAKE_REQUIRED_FLAGS) # produces a broken package which doesn't include the ubsan # compiler-rt, so check that it actually works with a linked program # before trying to use it -set(CMAKE_REQUIRED_FLAGS "${UNDEFINED_BEHAVIOR_SANITIZER_FLAG}") +set(CMAKE_REQUIRED_FLAGS "${UNDEFINED_BEHAVIOR_SANITIZER_FLAG} -Wno-error=delete-non-virtual-dtor") check_cxx_source_runs( "