diff --git a/mlir/CMakeLists.txt b/mlir/CMakeLists.txt --- a/mlir/CMakeLists.txt +++ b/mlir/CMakeLists.txt @@ -79,9 +79,14 @@ if(MLIR_BINDINGS_PYTHON_ENABLED) include(MLIRDetectPythonEnv) - find_package(Python3 COMPONENTS Interpreter Development REQUIRED) + find_package(Python3 COMPONENTS Interpreter Development REQUIRED OPTIONAL_COMPONENTS NumPy) message(STATUS "Found python include dirs: ${Python3_INCLUDE_DIRS}") message(STATUS "Found python libraries: ${Python3_LIBRARIES}") + if(Python3_NumPy_FOUND) + message(STATUS "Found numpy v${Python3_NumPy_VERSION}: ${Python3_NumPy_INCLUDE_DIRS}") + else() + message(WARNING "Not found numpy (install via 'pip install numpy')") + endif() mlir_detect_pybind11_install() find_package(pybind11 2.6 CONFIG REQUIRED) message(STATUS "Found pybind11 v${pybind11_VERSION}: ${pybind11_INCLUDE_DIR}")