diff options
author | Brad King <brad.king@kitware.com> | 2022-04-21 15:50:00 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-04-21 15:50:27 (GMT) |
commit | 7717848f9ea3e10913eee9eb38c975eb9df704ed (patch) | |
tree | d47073113370b68573725e177297119b24771023 | |
parent | c4f35d4077e2690828729b58fb93468c6b0f5c39 (diff) | |
parent | 5440eafaae078153c4b397c4b04e987690f63dc0 (diff) | |
download | CMake-7717848f9ea3e10913eee9eb38c975eb9df704ed.zip CMake-7717848f9ea3e10913eee9eb38c975eb9df704ed.tar.gz CMake-7717848f9ea3e10913eee9eb38c975eb9df704ed.tar.bz2 |
Merge topic 'FindPython-pypy-v7.3.9-support' into release-3.23
5440eafaae FindPython: Add support for pypy v7.3.9 and uppers
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7189
-rw-r--r-- | Modules/FindPython/Support.cmake | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake index afe9743..8391f16 100644 --- a/Modules/FindPython/Support.cmake +++ b/Modules/FindPython/Support.cmake @@ -415,7 +415,6 @@ function (_PYTHON_GET_NAMES _PYTHON_PGN_NAMES) if (_PGN_WIN32) foreach (version IN LISTS _PGN_VERSION) string (REPLACE "." "" version_no_dots ${version}) - set (name "python${version_no_dots}") if (_PGN_DEBUG) string (APPEND name "_d") @@ -423,6 +422,13 @@ function (_PYTHON_GET_NAMES _PYTHON_PGN_NAMES) list (APPEND names "${name}") endforeach() endif() + + if (_PGN_POSIX) + foreach(version IN LISTS _PGN_VERSION) + list (APPEND names "pypy${version}-c") + endforeach() + endif() + list (APPEND names ${_${_PYTHON_PREFIX}_PYPY_LIB_NAMES}) endif() endif() @@ -588,6 +594,11 @@ function (_PYTHON_GET_VERSION) set (${_PGV_PREFIX}VERSION_MINOR "${CMAKE_MATCH_2}" PARENT_SCOPE) set (${_PGV_PREFIX}VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}" PARENT_SCOPE) set (${_PGV_PREFIX}ABI "${CMAKE_MATCH_3}" PARENT_SCOPE) + elseif (library_name MATCHES "pypy([23])\\.([0-9]+)-c") + set (${_PGV_PREFIX}VERSION_MAJOR "${CMAKE_MATCH_1}" PARENT_SCOPE) + set (${_PGV_PREFIX}VERSION_MINOR "${CMAKE_MATCH_2}" PARENT_SCOPE) + set (${_PGV_PREFIX}VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}" PARENT_SCOPE) + set (${_PGV_PREFIX}ABI "" PARENT_SCOPE) elseif (library_name MATCHES "pypy(3)?-c") set (version "${CMAKE_MATCH_1}") # try to pick-up a more precise version from the path |