diff --git a/var/spack/repos/builtin/packages/care/package.py b/var/spack/repos/builtin/packages/care/package.py index 90f98749964..ffedd3cd07b 100644 --- a/var/spack/repos/builtin/packages/care/package.py +++ b/var/spack/repos/builtin/packages/care/package.py @@ -89,6 +89,7 @@ class Care(CachedCMakePackage, CudaPackage, ROCmPackage): variant( "implicit_conversions", default=False, + when="@:0.14", description="Enable implicit" "conversions to/from raw pointers", ) variant("tests", default=False, description="Build tests") @@ -227,12 +228,13 @@ def initconfig_hardware_entries(self): if spec.satisfies("+rocm"): entries.append(cmake_cache_option("ENABLE_HIP", True)) - archs = self.spec.variants["amdgpu_target"].value - if archs != "none": - arch_str = ",".join(archs) - entries.append( - cmake_cache_string("HIP_HIPCC_FLAGS", "--amdgpu-target={0}".format(arch_str)) - ) + if spec.satisfies("^blt@:0.6"): + archs = self.spec.variants["amdgpu_target"].value + if archs != "none": + arch_str = ",".join(archs) + entries.append( + cmake_cache_string("HIP_HIPCC_FLAGS", "--amdgpu-target={0}".format(arch_str)) + ) else: entries.append(cmake_cache_option("ENABLE_HIP", False))