[mlir] use STATUS instead of CHECK_* in MLIRDetectPythonEnv.cmake

CHECK_* directives for message() where added in Cmake 3.17, LLVM
requires 3.14 as minimum so they may not be intepreted correctly and
just print "CHECK_*" into the message stream. Replace them with STATUS.

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D91959
This commit is contained in:
Alex Zinenko 2020-11-23 13:58:03 +01:00
parent 22169e11c3
commit 21b346bd70
1 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@ function(mlir_detect_pybind11_install)
if(pybind11_DIR)
message(STATUS "Using explicit pybind11 cmake directory: ${pybind11_DIR} (-Dpybind11_DIR to change)")
else()
message(CHECK_START "Checking for pybind11 in python path...")
message(STATUS "Checking for pybind11 in python path...")
execute_process(
COMMAND "${Python3_EXECUTABLE}"
-c "import pybind11;print(pybind11.get_cmake_dir(), end='')"
@ -17,10 +17,10 @@ function(mlir_detect_pybind11_install)
OUTPUT_VARIABLE PACKAGE_DIR
ERROR_QUIET)
if(NOT STATUS EQUAL "0")
message(CHECK_FAIL "not found (install via 'pip install pybind11' or set pybind11_DIR)")
message(STATUS "not found (install via 'pip install pybind11' or set pybind11_DIR)")
return()
endif()
message(CHECK_PASS "found (${PACKAGE_DIR})")
message(STATUS "found (${PACKAGE_DIR})")
set(pybind11_DIR "${PACKAGE_DIR}" PARENT_SCOPE)
endif()
endfunction()