From 2ac509ce9dbb8201a349b46bafbb642a455c54c2 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 19 Nov 2021 00:18:13 +0800 Subject: [PATCH] cmake: check for python(\d)\.(\d+) when building boost 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- option. when building with python3.10 Signed-off-by: Kefu Chai (cherry picked from commit 66b1e8cecdbabd76a131dc239f6f41d5374fbd32) --- cmake/modules/BuildBoost.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake index 468ae419c00..320c2dcd524 100644 --- a/cmake/modules/BuildBoost.cmake +++ b/cmake/modules/BuildBoost.cmake @@ -70,7 +70,7 @@ function(do_build_boost 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() -- 2.47.3