caffe: fix python build
This commit is contained in:
parent
5f597d4b4c
commit
955ed925e5
@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
|
|||||||
cmakeFlags =
|
cmakeFlags =
|
||||||
# It's important that caffe is passed the major and minor version only because that's what
|
# It's important that caffe is passed the major and minor version only because that's what
|
||||||
# boost_python expects
|
# boost_python expects
|
||||||
[ (if pythonSupport then "-Dpython_version=3${python.pythonVersion}" else "-DBUILD_python=OFF")
|
[ (if pythonSupport then "-Dpython_version=${python.pythonVersion}" else "-DBUILD_python=OFF")
|
||||||
"-DBLAS=open"
|
"-DBLAS=open"
|
||||||
] ++ (if cudaSupport then [
|
] ++ (if cudaSupport then [
|
||||||
"-DCUDA_ARCH_NAME=All"
|
"-DCUDA_ARCH_NAME=All"
|
||||||
|
@ -64,7 +64,7 @@ index 4a5bac47..be026d43 100644
|
|||||||
- if(PYTHONLIBS_FOUND AND NUMPY_FOUND AND Boost_PYTHON_FOUND)
|
- if(PYTHONLIBS_FOUND AND NUMPY_FOUND AND Boost_PYTHON_FOUND)
|
||||||
+ find_package(NumPy 1.7.1)
|
+ find_package(NumPy 1.7.1)
|
||||||
+ find_package(Boost 1.46 REQUIRED COMPONENTS python@major@@minor@)
|
+ find_package(Boost 1.46 REQUIRED COMPONENTS python@major@@minor@)
|
||||||
+ if(PYTHONLIBS_FOUND AND NUMPY_FOUND AND BOOST_PYTHON@major@@minor@_FOUND)
|
+ if(PYTHONLIBS_FOUND AND NUMPY_FOUND AND Boost_PYTHON@major@@minor@_FOUND)
|
||||||
set(HAVE_PYTHON TRUE)
|
set(HAVE_PYTHON TRUE)
|
||||||
if(BUILD_python_layer)
|
if(BUILD_python_layer)
|
||||||
list(APPEND Caffe_DEFINITIONS PRIVATE -DWITH_PYTHON_LAYER)
|
list(APPEND Caffe_DEFINITIONS PRIVATE -DWITH_PYTHON_LAYER)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user