File: cmake-link-correct-python-lib.patch

package info (click to toggle)
caffe-contrib 1.0.0%2Bgit20180821.99bd997-2
  • links: PTS, VCS
  • area: contrib
  • in suites: buster
  • size: 16,244 kB
  • sloc: cpp: 61,579; python: 5,783; makefile: 586; sh: 562
file content (31 lines) | stat: -rw-r--r-- 1,518 bytes parent folder | download | duplicates (2)
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 "")