mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 21:00:17 -06:00
Merge topic 'FindPython-3.15' into release-4.2
7f628ea04bFindPython: Add support for Python 3.155b78983813Tests/FindBoost/TestPython: Improve python version list formatting Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Andrej <azhilenkov@gmail.com> Merge-request: !11350
This commit is contained in:
@@ -24,7 +24,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.14 3.13 3.12 3.11 3.10 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.15 3.14 3.13 3.12 3.11 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()
|
||||
|
||||
@@ -117,7 +117,7 @@ unset(_Python_NAMES)
|
||||
|
||||
set(_PYTHON1_VERSIONS 1.6 1.5)
|
||||
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
||||
set(_PYTHON3_VERSIONS 3.14 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
set(_PYTHON3_VERSIONS 3.15 3.14 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
|
||||
if(PythonInterp_FIND_VERSION)
|
||||
if(PythonInterp_FIND_VERSION_COUNT GREATER 1)
|
||||
|
||||
@@ -168,7 +168,7 @@ set(CMAKE_FIND_FRAMEWORK LAST)
|
||||
|
||||
set(_PYTHON1_VERSIONS 1.6 1.5)
|
||||
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
||||
set(_PYTHON3_VERSIONS 3.14 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
set(_PYTHON3_VERSIONS 3.15 3.14 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
|
||||
if(PythonLibs_FIND_VERSION)
|
||||
if(PythonLibs_FIND_VERSION_COUNT GREATER 1)
|
||||
|
||||
@@ -2,10 +2,24 @@ cmake_minimum_required(VERSION 3.14)
|
||||
project(TestFindBoostPython CXX)
|
||||
include(CTest)
|
||||
|
||||
find_package(Boost OPTIONAL_COMPONENTS python27 python34 python35 python36 python37 python38 python39 python310 python311 python312 python313 python314)
|
||||
find_package(Boost OPTIONAL_COMPONENTS
|
||||
python27
|
||||
python34
|
||||
python35
|
||||
python36
|
||||
python37
|
||||
python38
|
||||
python39
|
||||
python310
|
||||
python311
|
||||
python312
|
||||
python313
|
||||
python314
|
||||
python315
|
||||
)
|
||||
|
||||
set(FAILTEST TRUE)
|
||||
foreach (v IN ITEMS 27 34 35 36 37 38 39 310 311 312 313 314)
|
||||
foreach (v IN ITEMS 27 34 35 36 37 38 39 310 311 312 313 314 315)
|
||||
if (Boost_PYTHON${v}_FOUND)
|
||||
set(FAILTEST FALSE)
|
||||
break()
|
||||
|
||||
Reference in New Issue
Block a user