summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrus Harrison <cyrush@llnl.gov>2020-07-13 14:57:25 -0700
committerGitHub <noreply@github.com>2020-07-13 14:57:25 -0700
commit3e13137f6eabc66b0c3d60acfbe3e5e834742849 (patch)
tree566d76fa27c577e486cd8b157240840fc39c7098
parent6aa6e19d34ee8bb2163d6b23211cd0cb5be47b3f (diff)
downloadspack-3e13137f6eabc66b0c3d60acfbe3e5e834742849.tar.gz
spack-3e13137f6eabc66b0c3d60acfbe3e5e834742849.tar.bz2
spack-3e13137f6eabc66b0c3d60acfbe3e5e834742849.tar.xz
spack-3e13137f6eabc66b0c3d60acfbe3e5e834742849.zip
add share libs variant to raja (#17496)
-rw-r--r--var/spack/repos/builtin/packages/raja/package.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/raja/package.py b/var/spack/repos/builtin/packages/raja/package.py
index b7a6218056..5f984c8e08 100644
--- a/var/spack/repos/builtin/packages/raja/package.py
+++ b/var/spack/repos/builtin/packages/raja/package.py
@@ -29,6 +29,7 @@ class Raja(CMakePackage, CudaPackage):
version('0.4.0', tag='v0.4.0', submodules="True")
variant('openmp', default=True, description='Build OpenMP backend')
+ variant('shared', default=True, description='Build Shared Libs')
depends_on('cmake@3.8:', type='build')
depends_on('cmake@3.9:', when='+cuda', type='build')
@@ -44,11 +45,14 @@ class Raja(CMakePackage, CudaPackage):
options.extend([
'-DENABLE_CUDA=On',
'-DCUDA_TOOLKIT_ROOT_DIR=%s' % (spec['cuda'].prefix)])
-
if not spec.satisfies('cuda_arch=none'):
cuda_arch = spec.variants['cuda_arch'].value
options.append('-DCUDA_ARCH=sm_{0}'.format(cuda_arch[0]))
-
+ # shared vs static libs
+ if "+shared" in spec:
+ options.append('-DBUILD_SHARED_LIBS=ON')
+ else:
+ options.append('-DBUILD_SHARED_LIBS=OFF')
# Work around spack adding -march=ppc64le to SPACK_TARGET_ARGS which
# is used by the spack compiler wrapper. This can go away when BLT
# removes -Werror from GTest flags