[mlir][python] Add a warning for cmake version < 3.15.
authorStella Laurenzo <stellaraccident@gmail.com>
Wed, 13 Oct 2021 02:32:48 +0000 (19:32 -0700)
committerStella Laurenzo <stellaraccident@gmail.com>
Wed, 13 Oct 2021 04:13:54 +0000 (21:13 -0700)
commit3d92722f74993969243d1400bc3257ca3d03902f
treed373611c6eed33b5026e41bcf9714f3a59a2b9fc
parent84fae3bce84db5af976d58446b59773724fe108c
[mlir][python] Add a warning for cmake version < 3.15.

As discussed on discord, we have never actually been able to build with the project-wide published min version of 3.14.3. The buildbot that tests the Python configuration is currently pinned to 3.19.1, and there are a number of non-version/policy controlled features that Python building relies on that makes it unreliable with older versions. Some of the issues are pretty fundamental and I don't know how to do them on the older version. I think that, as an optional feature, at least advertising the PSA as in this patch is a good middle ground until the next project-wide CMake version bump.

Also moves setup logic to a macro so that everyone can use it.
mlir/CMakeLists.txt
mlir/cmake/modules/MLIRDetectPythonEnv.cmake