diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d3a82a438..99205ab8f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -386,7 +386,7 @@ function(pybind11_enable_warnings target_name) -Wnon-virtual-dtor) endif() - if(PYBIND11_WERROR AND NOT PYBIND11_WERROR) + if(PYBIND11_WERROR) if(MSVC) target_compile_options(${target_name} PRIVATE /WX) elseif(PYBIND11_CUDA_TESTS)