Merge topic 'FindPython-fix-regex' into release-3.18

6c094c1c1e FindPython: Fix erroneous regex in ABI check

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5257
This commit is contained in:
Brad King
2020-09-24 19:08:38 +00:00
committed by Kitware Robot

View File

@@ -612,7 +612,7 @@ function (_PYTHON_GET_VERSION)
if (NOT config)
# pyconfig.h can be a wrapper to a platform specific pyconfig.h
# In this case, try to identify ABI from include directory
if (_${_PYTHON_PREFIX}_INCLUDE_DIR MATCHES "python${version_major}\.${version_minor}+([dmu]*)")
if (_${_PYTHON_PREFIX}_INCLUDE_DIR MATCHES "python${version_major}\\.${version_minor}+([dmu]*)")
set (abi "${CMAKE_MATCH_1}")
else()
set (abi "")