Produce MSVC error when virtual class misses virtual destructor
This is already a warning treated as an error by GCC/Clang:
-Werror=delete-non-virtual-dtor
Bug: b/130335507
Change-Id: I9d44f668168e2a77da8839017871e469f5d53bcb
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44788
Tested-by: Nicolas Capens <nicolascapens@google.com>
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7a2d5a6..db02c7b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -356,6 +356,7 @@
# Treat specific warnings as errors
list(APPEND SWIFTSHADER_COMPILE_OPTIONS
+ "/we4265" # class has virtual functions, but its non-trivial destructor is not virtual; instances of this class may not be destructed correctly
"/we4018" # 'expression' : signed/unsigned mismatch
"/we4471" # 'enumeration': a forward declaration of an unscoped enumeration must have an underlying type (int assumed)
"/we4838" # conversion from 'type_1' to 'type_2' requires a narrowing conversion