summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/kokkos/package.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/kokkos/package.py b/var/spack/repos/builtin/packages/kokkos/package.py
index b5277e40a8..cf949befbd 100644
--- a/var/spack/repos/builtin/packages/kokkos/package.py
+++ b/var/spack/repos/builtin/packages/kokkos/package.py
@@ -172,6 +172,8 @@ class Kokkos(CMakePackage, CudaPackage):
conflicts("+wrapper", when="~cuda")
variant("std", default="11", values=["11", "14", "17", "20"], multi=False)
+ variant("pic", default=False, description="Build position independent code")
+
# nvcc does not currently work with C++17 or C++20
conflicts("+cuda", when="std=17")
conflicts("+cuda", when="std=20")
@@ -208,6 +210,9 @@ class Kokkos(CMakePackage, CudaPackage):
if isdiy:
options.append("-DSpack_WORKAROUND=On")
+ if "+pic" in spec:
+ options.append("-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
+
spack_microarches = []
if "+cuda" in spec:
# this is a list