add share libs variant to raja (#17496)
This commit is contained in:
parent
6aa6e19d34
commit
3e13137f6e
@ -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 @@ def cmake_args(self):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user