diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/flecsi/package.py | 3 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/legion/package.py | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/flecsi/package.py b/var/spack/repos/builtin/packages/flecsi/package.py index e10dfd88cf..2fd13d56b1 100644 --- a/var/spack/repos/builtin/packages/flecsi/package.py +++ b/var/spack/repos/builtin/packages/flecsi/package.py @@ -186,6 +186,9 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage): if "+rocm" in self.spec: options.append(self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc)) options.append(self.define("CMAKE_C_COMPILER", self.spec["hip"].hipcc)) + if "backend=legion" in self.spec: + # CMake pulled in via find_package(Legion) won't work without this + options.append(self.define("HIP_PATH", "{0}/hip".format(spec["hip"].prefix))) elif "+kokkos" in self.spec: options.append(self.define("CMAKE_CXX_COMPILER", self.spec["kokkos"].kokkos_cxx)) else: diff --git a/var/spack/repos/builtin/packages/legion/package.py b/var/spack/repos/builtin/packages/legion/package.py index 152aac297f..156eb24ef8 100644 --- a/var/spack/repos/builtin/packages/legion/package.py +++ b/var/spack/repos/builtin/packages/legion/package.py @@ -277,11 +277,6 @@ class Legion(CMakePackage, ROCmPackage): description="Maximum number of nodes supported by Legion.", ) - def setup_build_environment(self, build_env): - spec = self.spec - if "+rocm" in spec: - build_env.set("HIP_PATH", "{0}/hip".format(spec["hip"].prefix)) - def cmake_args(self): spec = self.spec cmake_cxx_flags = [] @@ -353,6 +348,7 @@ class Legion(CMakePackage, ROCmPackage): options.append(from_variant("Legion_HIP_TARGET", "hip_target")) options.append(from_variant("Legion_HIP_ARCH", "amdgpu_target")) options.append(from_variant("Legion_HIJACK_HIP", "hip_hijack")) + options.append(self.define("HIP_PATH", "{0}/hip".format(spec["hip"].prefix))) if "+fortran" in spec: # default is off. |