This adds an option to configure the CMake python search priming
behaviour that was introduced in D118148. In some environments the
priming would cause the "real" search to fail. The default behaviour is
unchanged, i.e. the search will be primed.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This works around an issues I was seeing with D118148:
Which results in the following error:
-- Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Development Development.Module Development.Embed) (found suitable version "3.8", minimum required is "3.6") CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Python3 (missing: Development.Module NumPy) (found suitable version "3.7.10", minimum required is "3.6") Call Stack (most recent call first): /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.22/Modules/FindPython/Support.cmake:3166 (find_package_handle_standard_args) /usr/share/cmake-3.22/Modules/FindPython3.cmake:490 (include) /home/ubuntu/llvm-project/mlir/cmake/modules/MLIRDetectPythonEnv.cmake:33 (find_package) /home/ubuntu/llvm-project/mlir/CMakeLists.txt:135 (mlir_configure_python_dev_packages)
I've confirmed that applying this patch and building with -DMLIR_DETECT_PYTHON_ENV_PRIME_SEARCH=0 can configure successfully in the environment mentioned above.
mlir/CMakeLists.txt | ||
---|---|---|
135 | Can you extend the comment a bit with " (this is a temporary measure while we debug Python detection issues on different platforms)". |
Can you extend the comment a bit with " (this is a temporary measure while we debug Python detection issues on different platforms)".