Skip to content

Commit

Permalink
spack: add test_portability_strategy variant
Browse files Browse the repository at this point in the history
  • Loading branch information
rbberger committed Sep 5, 2024
1 parent b8392bc commit bb640f0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spack-repo/packages/ports-of-call/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,22 @@ class PortsOfCall(CMakePackage):
when="@:1.2.0",
)
variant("test", default=False, description="Build tests")
variant(
"test_portability_strategy",
description="Portability strategy used by tests",
values=("Kokkos", "Cuda", "None"),
multi=False,
default="None",
when="@1.6.1: +test",
)

depends_on("cmake@3.12:")
depends_on("catch2@3.0.1:", when="+test")

def cmake_args(self):
args = [
self.define_from_variant("PORTS_OF_CALL_BUILD_TESTING", "test"),
self.define_from_variant("PORTS_OF_CALL_TEST_PORTABILITY_STRATEGY", "test_portability_strategy"),
]
if self.spec.satisfies("@:1.2.0"):
args.append(self.define_from_variant("PORTABILITY_STRATEGY", "portability_strategy"))
Expand Down

0 comments on commit bb640f0

Please sign in to comment.