summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/chai/package.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/chai/package.py b/var/spack/repos/builtin/packages/chai/package.py
index 6687b5092b..a52bcb8a08 100644
--- a/var/spack/repos/builtin/packages/chai/package.py
+++ b/var/spack/repos/builtin/packages/chai/package.py
@@ -112,6 +112,13 @@ class Chai(CachedCMakePackage, CudaPackage, ROCmPackage):
self.spec.compiler.version,
)
+ def initconfig_compiler_entries(self):
+ spec = self.spec
+ entries = super(Chai, self).initconfig_compiler_entries()
+ if "+rocm" in spec:
+ entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
+ return entries
+
def initconfig_hardware_entries(self):
spec = self.spec
entries = super(Chai, self).initconfig_hardware_entries()