mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-28 18:51:30 +00:00
clang -Wnon-virtual-dtor compatibility (#2626)
* Adding missing virtual destructors, to silence clang -Wnon-virtual-dtor warnings. Tested with clang version 9.0.1-12 under an Ubuntu-like OS. Originally discovered in the Google-internal environment. * adding -Wnon-virtual-dtor for GNU|Intel|Clang
This commit is contained in:
committed by
GitHub
parent
f2e799863b
commit
8290a5a0da
@@ -243,8 +243,15 @@ function(pybind11_enable_warnings target_name)
|
||||
if(MSVC)
|
||||
target_compile_options(${target_name} PRIVATE /W4)
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Intel|Clang)" AND NOT PYBIND11_CUDA_TESTS)
|
||||
target_compile_options(${target_name} PRIVATE -Wall -Wextra -Wconversion -Wcast-qual
|
||||
-Wdeprecated -Wundef)
|
||||
target_compile_options(
|
||||
${target_name}
|
||||
PRIVATE -Wall
|
||||
-Wextra
|
||||
-Wconversion
|
||||
-Wcast-qual
|
||||
-Wdeprecated
|
||||
-Wundef
|
||||
-Wnon-virtual-dtor)
|
||||
endif()
|
||||
|
||||
if(PYBIND11_WERROR)
|
||||
|
||||
Reference in New Issue
Block a user