fix: C++17 mode on Clang may error

This commit is contained in:
Henry Schreiner
2020-07-23 22:55:29 -04:00
committed by Henry Schreiner
parent e428a7f6b8
commit 1f53c373e4
7 changed files with 56 additions and 3 deletions

View File

@@ -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()