From 862bcc50590d517165f14be39fc6b3be1915fa36 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sun, 3 Oct 2021 23:04:52 -0400 Subject: [PATCH] ArborX: Explicitly set path to Kokkos (#26347) * Explicitly set path to Kokkos for ArborX testing * Improve formatting * Update var/spack/repos/builtin/packages/arborx/package.py Co-authored-by: Seth R. Johnson * Remove blank line Co-authored-by: Seth R. Johnson --- var/spack/repos/builtin/packages/arborx/package.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/var/spack/repos/builtin/packages/arborx/package.py b/var/spack/repos/builtin/packages/arborx/package.py index 1eb5c98e89..20243dc4c9 100644 --- a/var/spack/repos/builtin/packages/arborx/package.py +++ b/var/spack/repos/builtin/packages/arborx/package.py @@ -92,10 +92,6 @@ def cached_tests_work_dir(self): def build_tests(self): """Build the stand-alone/smoke test.""" - # We don't need to append the path to Kokkos to CMAKE_PREFIX_PATH since - # a hint is already hardcoded inside the CMake ArborX configuration. - # Omitting it here allows us to avoid to distinguish between Kokkos - # being installed as a standalone or as part of Trilinos. arborx_dir = self.spec['arborx'].prefix cmake_prefix_path = "-DCMAKE_PREFIX_PATH={0}".format(arborx_dir) if '+mpi' in self.spec: @@ -103,7 +99,10 @@ def build_tests(self): cmake_args = [".", cmake_prefix_path, - "-DCMAKE_CXX_COMPILER={0}".format(self.compiler.cxx)] + "-DCMAKE_CXX_COMPILER={0}".format(self.compiler.cxx), + self.define('Kokkos_ROOT', self.spec['kokkos'].prefix + if '~trilinos' in self.spec + else self.spec['trilinos'].prefix)] self.run_test("cmake", cmake_args, purpose="test: calling cmake",