[python] renamed src/tensorflow.cc -> src/bindings.cc
This commit is contained in:
@@ -33,12 +33,13 @@ endif()
|
||||
if(BUILD_PYTHON_MODULE)
|
||||
message(STATUS "Adding Python module")
|
||||
# PyBind11 wrapper source file
|
||||
file(GLOB_RECURSE PYTHON_SRC python/src/tensorflow.cc)
|
||||
file(GLOB_RECURSE PYTHON_SRC python/src/bindings.cc)
|
||||
include_directories(python/src/ ${PYTHON_INCLUDE_DIRS})
|
||||
if(TF_LIBS)
|
||||
# extra tensorflow ops (e.g., alloc_empty)
|
||||
# update directories
|
||||
link_directories(${TF_LIB_DIRS})
|
||||
include_directories(python/src/ ${PYTHON_INCLUDE_DIRS} ${TF_INCLUDE_DIRS})
|
||||
include_directories(${TF_INCLUDE_DIRS})
|
||||
# get sources
|
||||
file(GLOB_RECURSE EXTRA_TF_OPS_SRC python/src/tensorflow/*.cc)
|
||||
add_library(extra_tf_ops SHARED ${EXTRA_TF_OPS_SRC})
|
||||
|
@@ -37,10 +37,9 @@ class CMakeBuild(build_ext):
|
||||
def build_extension(self, ext):
|
||||
self.debug = True
|
||||
extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name)))
|
||||
# python directors
|
||||
# python directories
|
||||
python_include_dirs = distutils.sysconfig.get_python_inc()
|
||||
python_lib_dirs = distutils.sysconfig.get_config_var('LIBDIR')
|
||||
# tensorflow directories
|
||||
cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir,
|
||||
'-DBUILD_TESTS=OFF',
|
||||
'-DBUILD_PYTHON_MODULE=ON',
|
||||
|
Reference in New Issue
Block a user