Do not set CMAKE_HIP_ARCHITECTURES if none specified (#33156)

This commit is contained in:
Auriane R 2022-10-10 18:21:45 +02:00 committed by GitHub
parent c453d8718b
commit 41f992a2f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -150,7 +150,8 @@ def cmake_args(self):
args += [self.define("__skip_rocmclang", True)]
if self.spec.satisfies("@0.8: +rocm"):
rocm_archs = spec.variants["amdgpu_target"].value
rocm_archs = ";".join(rocm_archs)
args.append(self.define("CMAKE_HIP_ARCHITECTURES", rocm_archs))
if "none" not in rocm_archs:
rocm_archs = ";".join(rocm_archs)
args.append(self.define("CMAKE_HIP_ARCHITECTURES", rocm_archs))
return args