From 823a2c1e4bf6ad2e2f7673ec42925f7868a9cf2c Mon Sep 17 00:00:00 2001 From: Richard Berger Date: Thu, 22 Aug 2024 18:09:19 -0600 Subject: [PATCH] kokkos-tools: add new package (#45382) --- .../builtin/packages/kokkos-tools/package.py | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 var/spack/repos/builtin/packages/kokkos-tools/package.py diff --git a/var/spack/repos/builtin/packages/kokkos-tools/package.py b/var/spack/repos/builtin/packages/kokkos-tools/package.py new file mode 100644 index 00000000000000..c35e8dbe8d983e --- /dev/null +++ b/var/spack/repos/builtin/packages/kokkos-tools/package.py @@ -0,0 +1,31 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class KokkosTools(CMakePackage): + """Kokkos Profiling and Debugging Tools""" + + homepage = "https://github.com/kokkos/kokkos-tools/" + git = "https://github.com/kokkos/kokkos-tools.git" + + license("Apache-2.0 WITH LLVM-exception") + + version("develop", branch="develop") + + variant("mpi", default=False, description="Enable MPI support") + variant("papi", default=False, description="Enable PAPI support") + + depends_on("kokkos") + depends_on("mpi", when="+mpi") + depends_on("papi", when="+papi") + + def cmake_args(self): + args = [ + self.define_from_variant("KokkosTools_ENABLE_MPI", "mpi"), + self.define_from_variant("KokkosTools_ENABLE_PAPI", "papi"), + ] + return args