diff --git a/var/spack/repos/builtin/packages/chai/package.py b/var/spack/repos/builtin/packages/chai/package.py index 724ccf124d..0f4b8457fe 100644 --- a/var/spack/repos/builtin/packages/chai/package.py +++ b/var/spack/repos/builtin/packages/chai/package.py @@ -191,6 +191,9 @@ def initconfig_compiler_entries(self): # Default entries are already defined in CachedCMakePackage, inherit them: entries = super().initconfig_compiler_entries() + if "+rocm" in spec: + entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc)) + llnl_link_helpers(entries, spec, compiler) return entries diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py index f2cd52bcb6..f6432b4d1e 100644 --- a/var/spack/repos/builtin/packages/raja/package.py +++ b/var/spack/repos/builtin/packages/raja/package.py @@ -252,6 +252,9 @@ def initconfig_compiler_entries(self): # Default entries are already defined in CachedCMakePackage, inherit them: entries = super().initconfig_compiler_entries() + if "+rocm" in spec: + entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc)) + llnl_link_helpers(entries, spec, compiler) return entries diff --git a/var/spack/repos/builtin/packages/umpire/package.py b/var/spack/repos/builtin/packages/umpire/package.py index bd6915623f..d7684c207a 100644 --- a/var/spack/repos/builtin/packages/umpire/package.py +++ b/var/spack/repos/builtin/packages/umpire/package.py @@ -307,6 +307,9 @@ def initconfig_compiler_entries(self): # Default entries are already defined in CachedCMakePackage, inherit them: entries = super().initconfig_compiler_entries() + if "+rocm" in spec: + entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc)) + option_prefix = "UMPIRE_" if spec.satisfies("@2022.03.0:") else "" if "+fortran" in spec and compiler.fc is not None: