diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/raja/package.py | 8 |
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 |