зеркало из https://github.com/microsoft/caffe.git
Merge pull request #2059 from philkr/python_layer_cmake
[cmake] add Python layer
This commit is contained in:
Коммит
a66be31501
|
@ -20,6 +20,7 @@ caffe_option(BUILD_python "Build Python wrapper" ON)
|
|||
set(python_version "2" CACHE STRING "Specify which python version to use")
|
||||
caffe_option(BUILD_matlab "Build Matlab wrapper" OFF IF UNIX OR APPLE)
|
||||
caffe_option(BUILD_docs "Build documentation" ON IF UNIX OR APPLE)
|
||||
caffe_option(BUILD_python_layer "Build the caffe python layer" ON)
|
||||
|
||||
# ---[ Dependencies
|
||||
include(cmake/Dependencies.cmake)
|
||||
|
|
|
@ -127,6 +127,11 @@ if(BUILD_python)
|
|||
endif()
|
||||
if(PYTHONLIBS_FOUND AND NUMPY_FOUND AND Boost_PYTHON_FOUND)
|
||||
set(HAVE_PYTHON TRUE)
|
||||
if(BUILD_python_layer)
|
||||
add_definitions(-DWITH_PYTHON_LAYER)
|
||||
include_directories(SYSTEM ${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIR} ${Boost_INCLUDE_DIRS})
|
||||
list(APPEND Caffe_LINKER_LIBS ${PYTHON_LIBRARIES} ${Boost_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче