FindPython: Matches ${CMAKE_SHARED_LIBRARY_SUFFIX} incorrectly
Various parts of FindPython
check against ${CMAKE_SHARED_LIBRARY_SUFFIX}
. However, they don't take into account the fact that ${CMAKE_SHARED_LIBRARY_SUFFIX}
already has its own .
(set to .so
on most Unix-like systems), and they insert a second one before it. We can see that here:
# clean-up: remove prefix character and suffix
if (_values MATCHES "^(\\.${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.so|\\.pyd)$")
# ^ here
set(_values "")
else()
string (REGEX REPLACE "^[.-](.+)(${CMAKE_SHARED_LIBRARY_SUFFIX}|\\.(so|pyd))$" "\\1" _values "${_values}")
# ^ here
endif()
The consequences of this are unknown, since the check already searches for .so
, and all of the tests currently pass.