From 95b46dca3d73c77c13502a6360e552a65daba95a Mon Sep 17 00:00:00 2001 From: afzpatel <122491982+afzpatel@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:48:50 -0400 Subject: kokkos: modify standlone test to run with +rocm (#46779) --- var/spack/repos/builtin/packages/kokkos/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py index ed95535469..7944a9d403 100644 --- a/var/spack/repos/builtin/packages/kokkos/package.py +++ b/var/spack/repos/builtin/packages/kokkos/package.py @@ -416,8 +416,12 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage): raise SkipTest(f"{cmake_path} is missing") cmake = self.spec["cmake"].command - cmake(cmake_path, "-DEXECUTABLE_OUTPUT_PATH=" + cmake_path) + cmake_args = ["-DEXECUTABLE_OUTPUT_PATH=" + cmake_path] + if self.spec.satisfies("+rocm"): + prefix_paths = ";".join(spack.build_environment.get_cmake_prefix_path(self)) + cmake_args.append("-DCMAKE_PREFIX_PATH={0}".format(prefix_paths)) + cmake(cmake_path, *cmake_args) make = which("make") make() make(cmake_path, "test") -- cgit v1.2.3-70-g09d2