Adding pic support for Kokkos (#17751)

* Adding pic support for Kokkos

* Update pic for kokkos
This commit is contained in:
Julien Loiseau 2020-07-29 19:40:12 -06:00 committed by GitHub
parent 4e12dc3303
commit efb456cb0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 @@ def cmake_args(self):
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