summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreugeneswalker <38933153+eugeneswalker@users.noreply.github.com>2022-10-24 09:08:16 -0700
committerGitHub <noreply@github.com>2022-10-24 09:08:16 -0700
commitdda2ff46532de49a562ad87d8f606e247020ec11 (patch)
tree1e38d9fc174a57d6db2f0c3c4d00e53d03d88faf
parent560a9eec920e1fba3d334c6506d193aa8d9cb098 (diff)
downloadspack-dda2ff46532de49a562ad87d8f606e247020ec11.tar.gz
spack-dda2ff46532de49a562ad87d8f606e247020ec11.tar.bz2
spack-dda2ff46532de49a562ad87d8f606e247020ec11.tar.xz
spack-dda2ff46532de49a562ad87d8f606e247020ec11.zip
chai +rocm: use hipcc as CMAKE_CXX_COMPILER (#33479)
-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()