mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-29 00:22:00 +00:00
Force exact interpreter version found by find_package(PythonLibs)
The call to `find_package(PythonLibs REQUIRED)` will set the `PYTHONLIBS_VERSION_STRING` variable (see the documentation at https://cmake.org/cmake/help/v3.0/module/FindPythonLibs.html) Use that value of the version for the call to `find_package(PythonInterp)` with `EXACT` flag added to enforce consistency between the Python interpreter, the linked Python library and the Python header. See !65.
This commit is contained in:
parent
8bd1f49de7
commit
272e9e19fc
@ -26,7 +26,7 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE)
|
||||
|
||||
set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
find_package(PythonInterp REQUIRED)
|
||||
find_package(PythonInterp ${PYTHONLIBS_VERSION_STRING} EXACT REQUIRED)
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user