Fixed pyngraph compilation with python 3.9.2 (#4940)

This commit is contained in:
Ilya Lavrenov 2021-03-25 13:15:01 +03:00 committed by GitHub
parent 64874fa69c
commit f205ba9459
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,6 +66,11 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Wno-error=attributes)
endif()
if(CMAKE_COMPILER_IS_GNUCXX AND Python_VERSION VERSION_GREATER_EQUAL "3.9")
# for proper fix need to update pybind to version which does not use PyEval_InitThreads()
add_compile_options(-Wno-deprecated-declarations)
endif()
# create target
file(GLOB_RECURSE SOURCES src/pyngraph/*.cpp)