diff --git a/mlir/CMakeLists.txt b/mlir/CMakeLists.txt --- a/mlir/CMakeLists.txt +++ b/mlir/CMakeLists.txt @@ -101,6 +101,12 @@ "Enables building of Python bindings.") if(MLIR_ENABLE_BINDINGS_PYTHON) + if(CMAKE_VERSION VERSION_LESS "3.15.0") + message(WARNING + "Building MLIR Python bindings is known to rely on CMake features " + "newer than the LLVM minimum: Recommend upgrading to 3.15+") + endif() + include(MLIRDetectPythonEnv) # 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 @@ -108,6 +114,11 @@ # Development.Module. # See https://pybind11.readthedocs.io/en/stable/compiling.html#findpython-mode if(CMAKE_VERSION VERSION_LESS "3.18.0") + message(WARNING + "CMake < 3.18.0 is not compatible with statically built Python " + "installations. If Python fails to detect below, recommend upgrading " + "CMake." + ) set(_python_development_component Development) else() set(_python_development_component Development.Module)