forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cmake-2.8.12.2-FindBoost-python.patch
77 lines (75 loc) · 5.37 KB
/
cmake-2.8.12.2-FindBoost-python.patch
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
--- Modules/FindBoost.cmake
+++ Modules/FindBoost.cmake
@@ -905,6 +905,15 @@
set( _boost_docstring_release "Boost ${COMPONENT} library (release)")
set( _boost_docstring_debug "Boost ${COMPONENT} library (debug)")
+ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python")
+ # Get version of Python.
+ if (NOT PYTHON_EXECUTABLE)
+ #if a certain version of python was detected by cmake before use that one
+ set(PYTHON_EXECUTABLE "python")
+ endif (NOT PYTHON_EXECUTABLE)
+ execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import sys; sys.stdout.write('.'.join(str(x) for x in sys.version_info[:2]))" OUTPUT_VARIABLE _python_version)
+ endif()
+
#
# Find RELEASE libraries
@@ -915,6 +924,14 @@
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
${Boost_LIB_PREFIX}boost_${COMPONENT} )
+ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python")
+ list(APPEND _boost_RELEASE_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version} )
+ endif()
if(_boost_STATIC_RUNTIME_WORKAROUND)
set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}")
list(APPEND _boost_RELEASE_NAMES
@@ -922,6 +939,13 @@
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python")
+ list(APPEND _boost_RELEASE_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+ endif()
endif()
if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
_Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES})
@@ -951,6 +975,15 @@
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
${Boost_LIB_PREFIX}boost_${COMPONENT} )
+ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python")
+ list(APPEND _boost_DEBUG_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version} )
+ endif()
if(_boost_STATIC_RUNTIME_WORKAROUND)
set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
list(APPEND _boost_DEBUG_NAMES
@@ -958,6 +991,13 @@
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+ if(${COMPONENT} STREQUAL "python" OR ${COMPONENT} STREQUAL "mpi_python")
+ list(APPEND _boost_DEBUG_NAMES
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
+ ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_python_version}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+ endif()
endif()
if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
_Boost_PREPEND_LIST_WITH_THREADAPI(_boost_DEBUG_NAMES ${_boost_DEBUG_NAMES})