2022-04-08 10:21:00 +08:00
|
|
|
From cd42039f86055090db6c4ad5f8a8ca84f94123df Mon Sep 17 00:00:00 2001
|
2022-04-08 09:07:14 +08:00
|
|
|
From: wangzengliang <wangzengliang1@huawei.com>
|
2022-04-08 10:21:00 +08:00
|
|
|
Date: Fri, 8 Apr 2022 10:19:18 +0800
|
2022-04-08 09:07:14 +08:00
|
|
|
Subject: [PATCH] cmake: add support python 3.10
|
|
|
|
|
|
|
|
|
|
---
|
2022-04-08 10:21:00 +08:00
|
|
|
cmake/modules/BuildBoost.cmake | 2 +-
|
2022-04-08 09:07:14 +08:00
|
|
|
cmake/modules/FindPython/Support.cmake | 2 +-
|
2022-04-08 10:21:00 +08:00
|
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
2022-04-08 09:07:14 +08:00
|
|
|
|
2022-04-08 10:21:00 +08:00
|
|
|
diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake
|
|
|
|
|
index 468ae419c..320c2dcd5 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()
|
2022-04-08 09:07:14 +08:00
|
|
|
diff --git a/cmake/modules/FindPython/Support.cmake b/cmake/modules/FindPython/Support.cmake
|
|
|
|
|
index c05bbe330..fb362bfe2 100644
|
|
|
|
|
--- a/cmake/modules/FindPython/Support.cmake
|
|
|
|
|
+++ b/cmake/modules/FindPython/Support.cmake
|
|
|
|
|
@@ -17,7 +17,7 @@ if (NOT DEFINED _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR)
|
|
|
|
|
message (FATAL_ERROR "FindPython: INTERNAL ERROR")
|
|
|
|
|
endif()
|
|
|
|
|
if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3)
|
|
|
|
|
- set(_${_PYTHON_PREFIX}_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
|
|
|
|
+ set(_${_PYTHON_PREFIX}_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
|
|
|
|
elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2)
|
|
|
|
|
set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
|
|
|
|
else()
|
|
|
|
|
--
|
|
|
|
|
2.30.0
|
|
|
|
|
|