]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: check for python(\d)\.(\d+) when building boost 44007/head
authorKefu Chai <tchaikov@gmail.com>
Thu, 18 Nov 2021 16:18:13 +0000 (00:18 +0800)
committerKefu Chai <tchaikov@gmail.com>
Thu, 18 Nov 2021 16:27:34 +0000 (00:27 +0800)
now that python3.10 has two digits as its minor version, we should be
able to match it.

this change fixes the build with python3.10. without this change, we'd
have

error: wrong library name 'python310' in the --with-<library> option.

when building with python3.10

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
cmake/modules/BuildBoost.cmake

index dc8999e3b634229c425845bf8035bc387a8a9b34..36e430e9ed7dd90c37cfdbe90860ca5ecb85d6fe 100644 (file)
@@ -70,7 +70,7 @@ function(do_build_boost root_dir version)
     if(c MATCHES "^python([0-9])\$")
       set(with_python_version "${CMAKE_MATCH_1}")
       list(APPEND boost_with_libs "python")
-    elseif(c MATCHES "^python([0-9])\\.?([0-9])\$")
+    elseif(c MATCHES "^python([0-9])\\.?([0-9]+)\$")
       set(with_python_version "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}")
       list(APPEND boost_with_libs "python")
     else()