summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Loiseau <jloiseau@lanl.gov>2020-07-29 19:40:12 -0600
committerGitHub <noreply@github.com>2020-07-29 20:40:12 -0500
commitefb456cb0a84c771cae3c7f0f36f8d300f767253 (patch)
tree28380a6740b1539ad7525699ecb637439fe14c05
parent4e12dc33032d01e0a949e226c8195d34ec58cd0f (diff)
downloadspack-efb456cb0a84c771cae3c7f0f36f8d300f767253.tar.gz
spack-efb456cb0a84c771cae3c7f0f36f8d300f767253.tar.bz2
spack-efb456cb0a84c771cae3c7f0f36f8d300f767253.tar.xz
spack-efb456cb0a84c771cae3c7f0f36f8d300f767253.zip
Adding pic support for Kokkos (#17751)
* Adding pic support for Kokkos * Update pic for kokkos
-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