mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-25 01:09:17 +00:00
fix: C++17 mode on Clang may error
This commit is contained in:
committed by
Henry Schreiner
parent
e428a7f6b8
commit
1f53c373e4
@@ -43,3 +43,13 @@ endforeach()
|
||||
add_dependencies(cpptest external_module)
|
||||
|
||||
add_dependencies(check cpptest)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND PYTHON_VERSION VERSION_LESS 3.0)
|
||||
if(CMAKE_CXX_STANDARD LESS 17)
|
||||
target_compile_options(test_embed PUBLIC -Wno-deprecated-register)
|
||||
target_compile_options(external_module PUBLIC -Wno-deprecated-register)
|
||||
else()
|
||||
target_compile_options(test_embed PUBLIC -Wno-register)
|
||||
target_compile_options(external_module PUBLIC -Wno-register)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user