Skip to content

Commit 672f30e

Browse files
committed
CMake python version fix
1 parent b23e9b1 commit 672f30e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmake/Dependencies.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@ if(BUILD_python)
114114
# Find the matching boost python implementation
115115
set(version ${PYTHONLIBS_VERSION_STRING})
116116

117-
STRING( REPLACE "." "" boost_py_version ${version} )
117+
STRING( REGEX REPLACE "[^0-9]" "" boost_py_version ${version} )
118118
find_package(Boost 1.46 COMPONENTS "python-py${boost_py_version}")
119119
set(Boost_PYTHON_FOUND ${Boost_PYTHON-PY${boost_py_version}_FOUND})
120120

121121
while(NOT "${version}" STREQUAL "" AND NOT Boost_PYTHON_FOUND)
122122
STRING( REGEX REPLACE "([0-9.]+).[0-9]+" "\\1" version ${version} )
123123

124-
STRING( REPLACE "." "" boost_py_version ${version} )
124+
STRING( REGEX REPLACE "[^0-9]" "" boost_py_version ${version} )
125125
find_package(Boost 1.46 COMPONENTS "python-py${boost_py_version}")
126126
set(Boost_PYTHON_FOUND ${Boost_PYTHON-PY${boost_py_version}_FOUND})
127127

0 commit comments

Comments
 (0)