1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
Description: correctly find boost-python as per requested version, and new upstream naming
Forward: todo
Index: caffe/cmake/Dependencies.cmake
===================================================================
--- caffe.orig/cmake/Dependencies.cmake
+++ caffe/cmake/Dependencies.cmake
@@ -155,18 +155,18 @@ if(BUILD_python)
find_package(PythonLibs 3.0)
find_package(NumPy 1.7.1)
# Find the matching boost python implementation
- set(version ${PYTHONLIBS_VERSION_STRING})
+ set(version ${python_version})
STRING( REGEX REPLACE "[^0-9]" "" boost_py_version ${version} )
- find_package(Boost 1.46 COMPONENTS "python-py${boost_py_version}")
- set(Boost_PYTHON_FOUND ${Boost_PYTHON-PY${boost_py_version}_FOUND})
+ find_package(Boost 1.46 COMPONENTS "python${boost_py_version}")
+ set(Boost_PYTHON_FOUND ${Boost_PYTHON${boost_py_version}_FOUND})
while(NOT "${version}" STREQUAL "" AND NOT Boost_PYTHON_FOUND)
STRING( REGEX REPLACE "([0-9.]+).[0-9]+" "\\1" version ${version} )
STRING( REGEX REPLACE "[^0-9]" "" boost_py_version ${version} )
- find_package(Boost 1.46 COMPONENTS "python-py${boost_py_version}")
- set(Boost_PYTHON_FOUND ${Boost_PYTHON-PY${boost_py_version}_FOUND})
+ find_package(Boost 1.46 COMPONENTS "python${boost_py_version}")
+ set(Boost_PYTHON_FOUND ${Boost_PYTHON${boost_py_version}_FOUND})
STRING( REGEX MATCHALL "([0-9.]+).[0-9]+" has_more_version ${version} )
if("${has_more_version}" STREQUAL "")
|