Commit 49007b7f by Henry Schreiner Committed by Henry Schreiner

test: fix warning/error on Python 2 in 14/17 mode

parent 3d20b73e
......@@ -151,6 +151,14 @@ function(pybind11_enable_warnings target_name)
target_compile_options(${target_name} PRIVATE -Werror)
endif()
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND PYTHON_VERSION VERSION_LESS 3.0)
if(CMAKE_CXX_STANDARD STREQUAL "14")
target_compile_options(${target_name} PUBLIC -Wno-deprecated-register)
elseif(NOT CMAKE_CXX_STANDARD VERSION_LESS 17)
target_compile_options(${target_name} PUBLIC -Wno-register)
endif()
endif()
endfunction()
set(test_targets pybind11_tests)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment