File amd-device-libs-old-CMP0053-not-supported-by-CMake-4.patch of Package rocm-llvm

diff --git a/amd/device-libs/cmake/OCL.cmake b/amd/device-libs/cmake/OCL.cmake
index 4f16d8cd81d7c..1dabde51b8c08 100644
--- a/amd/device-libs/cmake/OCL.cmake
+++ b/amd/device-libs/cmake/OCL.cmake
@@ -9,7 +9,10 @@
 # command-lines, but the only way to do this as part of the dependency graph is
 # configure_file and we are included from multiple places. To get around this
 # we `file(WRITE)` a file with an @variable reference and `configure_file` it.
-cmake_policy(SET CMP0053 OLD)
+# FIXME: CMP0053 is removed in CMake 4; refine code relying on this policy.
+if(${CMAKE_VERSION} VERSION_LESS "4.0.0")
+  cmake_policy(SET CMP0053 OLD)
+endif()
 
 if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.20.0")
   # The policy change was for handling of relative paths for
openSUSE Build Service is sponsored by