Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions repos/spack_repo/builtin/packages/kokkos/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,14 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
variant("cxxstd", default="17", values=("14", "17", "20"), when="@3")
variant("cxxstd", default="17", values=("17", "20", "23"), when="@4")
variant("cxxstd", default="20", values=("20", "23"), when="@5:")

variant(
"deprecated_code",
default=True,
when="@5:",
description="Whether to enable deprecated code",
)

variant("pic", default=False, description="Build position independent code")

conflicts("+cuda", when="cxxstd=17 ^cuda@:10")
Expand Down Expand Up @@ -404,6 +412,14 @@ def cmake_args(self):
from_variant("Kokkos_ENABLE_COMPILE_AS_CMAKE_LANGUAGE", "cmake_lang"),
]

if spec.satisfies("@5: +deprecated_code"):
if spec.version == Version("develop"):
highest = max(v for v in self.versions if not v.isdevelop())
major_version = int(str(highest.up_to(1)))
else:
major_version = int(str(spec.version.up_to(1)))
options.append(self.define(f"Kokkos_ENABLE_DEPRECATED_CODE_{major_version}", True))

spack_microarches = []
if spec.satisfies("+cuda"):
cuda_arch = spec.variants["cuda_arch"].value
Expand Down
Loading