Skip to content

Commit a18cc4c

Browse files
authored
[DeviceLibs][CMake] Policy CMP0053 is no longer supported by CMake 4+ (llvm#1519)
The part of the code needs to be refined; otherwise we will have multiple breaks after users upgrade to CMake 4 on Windows.
1 parent 6facbaa commit a18cc4c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

amd/device-libs/cmake/OCL.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
# command-lines, but the only way to do this as part of the dependency graph is
1010
# configure_file and we are included from multiple places. To get around this
1111
# we `file(WRITE)` a file with an @variable reference and `configure_file` it.
12-
cmake_policy(SET CMP0053 OLD)
12+
# FIXME: CMP0053 is removed in CMake 4; refine code relying on this policy.
13+
if(${CMAKE_VERSION} VERSION_LESS "4.0.0")
14+
cmake_policy(SET CMP0053 OLD)
15+
endif()
1316

1417
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.20.0")
1518
# The policy change was for handling of relative paths for

0 commit comments

Comments
 (0)