diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py index b9e1f6fe8f..d185eb31fc 100644 --- a/var/spack/repos/builtin/packages/raja/package.py +++ b/var/spack/repos/builtin/packages/raja/package.py @@ -104,6 +104,13 @@ def cache_name(self): self.spec.compiler.version, ) + def initconfig_compiler_entries(self): + spec = self.spec + entries = super(Raja, 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(Raja, self).initconfig_hardware_entries()