[PYTHON] Fixed torch ABI issue

This commit is contained in:
Philippe Tillet
2020-11-05 12:37:00 -05:00
committed by Philippe Tillet
parent 06abc8cb40
commit cf80ccc798
3 changed files with 5 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ if(BUILD_PYTHON_MODULE)
message(STATUS "Adding Python module")
# PyBind11 wrapper source file
set(PYTHON_SRC bindings.cc launch.cc)
set_source_files_properties(launch.cc PROPERTIES COMPILE_FLAGS "-std=c++14 -D_GLIBCXX_USE_CXX11_ABI=0")
set_source_files_properties(launch.cc PROPERTIES COMPILE_FLAGS "-std=c++14 -D_GLIBCXX_USE_CXX11_ABI=${TORCH_CXX11_ABI}")
include_directories("." ${PYTHON_INCLUDE_DIRS})
link_directories(${PYTHON_LINK_DIRS})
endif()