summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorphilkr <philkr@users.noreply.github.com>2016-01-06 07:23:35 -0800
committerphilkr <philkr@users.noreply.github.com>2016-01-06 07:23:35 -0800
commit672f30ece38b41c0133d83501882551c53610885 (patch)
treeffccbaadc67dcd97e7c2ff442173683a34ced7d5 /cmake
parentb23e9b1b2196a230d0b5c37db7bbb9e6d6225fb3 (diff)
downloadcaffeonacl-672f30ece38b41c0133d83501882551c53610885.tar.gz
caffeonacl-672f30ece38b41c0133d83501882551c53610885.tar.bz2
caffeonacl-672f30ece38b41c0133d83501882551c53610885.zip
CMake python version fix
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Dependencies.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
index 51a803c1..c7b6a17a 100644
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
@@ -114,14 +114,14 @@ if(BUILD_python)
# Find the matching boost python implementation
set(version ${PYTHONLIBS_VERSION_STRING})
- STRING( REPLACE "." "" boost_py_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})
while(NOT "${version}" STREQUAL "" AND NOT Boost_PYTHON_FOUND)
STRING( REGEX REPLACE "([0-9.]+).[0-9]+" "\\1" version ${version} )
- STRING( REPLACE "." "" boost_py_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})