[PATCH] D64812: [CMake] Fail when Python interpreter doesn't match Python libraries version
Michał Górny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 20:29:38 PDT 2019
mgorny added inline comments.
================
Comment at: lldb/trunk/cmake/modules/LLDBConfig.cmake:197
+ find_package(PythonInterp REQUIRED)
+ find_package(PythonLibs REQUIRED)
+ endif()
----------------
JDevlieghere wrote:
> mgorny wrote:
> > As a small optimization, I think you can prepend major+minor version into `Python_ADDITIONAL_VERSIONS`. Then it will prefer finding the same libs as interpreter.
> The implementation of `PythonLibs` should already honor the minor/major version it gets from the interpreter: https://github.com/Kitware/CMake/blob/master/Modules/FindPythonLibs.cmake#L116
But note that it is appended *after* `Python_ADDITIONAL_VERSIONS`, so in our case full version list takes precedence over that. If I explicitly set `PYTHON_EXECUTABLE` to 2.7, it will still prefer libs from 3.x.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64812/new/
https://reviews.llvm.org/D64812
More information about the llvm-commits
mailing list