[MLIR] Removes CMake work-arounds.
authorMark de Wever <koraq@xs4all.nl>
Sun, 4 Jun 2023 15:42:38 +0000 (17:42 +0200)
committerMark de Wever <koraq@xs4all.nl>
Wed, 7 Jun 2023 15:47:10 +0000 (17:47 +0200)
CMake older than 3.20.0 is no longer supported.
This removes work-arounds for no longer supported versions.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D152101

mlir/cmake/modules/MLIRDetectPythonEnv.cmake
mlir/tools/mlir-vulkan-runner/CMakeLists.txt

index 71b2ab9..0a486c1 100644 (file)
@@ -2,13 +2,6 @@
 
 # Finds and configures python packages needed to build MLIR Python bindings.
 macro(mlir_configure_python_dev_packages)
-  if(CMAKE_VERSION VERSION_LESS "3.19.0")
-  message(SEND_ERROR
-      "Building MLIR Python bindings is known to rely on CMake features "
-      "that require at least version 3.19. Recommend upgrading to 3.19+ "
-      "for full support. Detected current version: ${CMAKE_VERSION}")
-  endif()
-
   if(MLIR_DETECT_PYTHON_ENV_PRIME_SEARCH)
     # Prime the search for python to see if there is a full development
     # package. This seems to work around cmake bugs searching only for
index c495a35..e4bd9e4 100644 (file)
@@ -8,16 +8,12 @@ set(LLVM_OPTIONAL_SOURCES
 if (MLIR_ENABLE_VULKAN_RUNNER)
   message(STATUS "Building the Vulkan runner")
 
-  # At first try "FindVulkan" from:
-  # https://cmake.org/cmake/help/v3.7/module/FindVulkan.html
-  if (NOT CMAKE_VERSION VERSION_LESS 3.7.0)
-    find_package(Vulkan)
-  endif()
+  find_package(Vulkan)
 
   # If Vulkan is not found try a path specified by VULKAN_SDK.
   if (NOT Vulkan_FOUND)
     if ("$ENV{VULKAN_SDK}" STREQUAL "")
-      message(FATAL_ERROR "Please use at least CMAKE 3.7.0 or provide "
+      message(FATAL_ERROR "Vulkan not found through CMake; please provide "
                           "VULKAN_SDK path as an environment variable")
     endif()