[mlir] Limit Python dependency to Development.Module when possible.
authorMike Urbach <mikeurbach@gmail.com>
Mon, 11 Oct 2021 23:23:42 +0000 (16:23 -0700)
committerMike Urbach <mikeurbach@gmail.com>
Tue, 12 Oct 2021 15:31:06 +0000 (08:31 -0700)
commit55e76c70a4f7fd5e13cf6c317a183bc3e6c59a03
tree0abecffaba2ae2a981229bdc59bb356c2df1613a
parenta76e698787e768488f74bd6481467407cba27022
[mlir] Limit Python dependency to Development.Module when possible.

After CMake 3.18, we are able to limit the scope of the search to just
Development.Module. Searching for Development will fail in situations
where the Python libraries are not available. When possible, limit to
just Development.Module. See:
https://pybind11.readthedocs.io/en/stable/compiling.html#findpython-mode

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D111585
mlir/CMakeLists.txt
mlir/cmake/modules/AddMLIRPython.cmake
mlir/docs/Bindings/Python.md