Set CMake policy CMP0074 to the new behaviour in hip package (#48549)
This commit is contained in:
parent
d89ae7bcde
commit
aa88ced154
@ -597,6 +597,12 @@ def cmake_args(self):
|
|||||||
# should find llvm-amdgpu
|
# should find llvm-amdgpu
|
||||||
self.define("LLVM_ROOT", self.spec["llvm-amdgpu"].prefix),
|
self.define("LLVM_ROOT", self.spec["llvm-amdgpu"].prefix),
|
||||||
self.define("Clang_ROOT", self.spec["llvm-amdgpu"].prefix),
|
self.define("Clang_ROOT", self.spec["llvm-amdgpu"].prefix),
|
||||||
|
# Use the new behaviour of the policy CMP0074
|
||||||
|
# (https://cmake.org/cmake/help/latest/policy/CMP0074.html) which will search
|
||||||
|
# "prefixes specified by the <PackageName>_ROOT CMake variable".
|
||||||
|
# From HIP 6.2 onwards the policy is set explicitly by HIP itself:
|
||||||
|
# https://github.com/ROCm/clr/commit/a2a8dad980b0fa1a6086e0c0f95847ae80f5a2c6.
|
||||||
|
self.define("CMAKE_POLICY_DEFAULT_CMP0074", "NEW"),
|
||||||
]
|
]
|
||||||
if self.spec.satisfies("+rocm"):
|
if self.spec.satisfies("+rocm"):
|
||||||
args.append(self.define("HSA_PATH", self.spec["hsa-rocr-dev"].prefix))
|
args.append(self.define("HSA_PATH", self.spec["hsa-rocr-dev"].prefix))
|
||||||
|
Loading…
Reference in New Issue
Block a user