Always set SPLA_OMP and SPLA_STATIC (#21195)

This commit is contained in:
Harmen Stoppels 2021-01-21 17:43:57 +01:00 committed by GitHub
parent 1ceab34fc8
commit 0cf0be588b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,12 +41,10 @@ class Spla(CMakePackage):
depends_on('hsa-rocr-dev', when='+rocm', type='link') depends_on('hsa-rocr-dev', when='+rocm', type='link')
def cmake_args(self): def cmake_args(self):
args = [] args = [
self.define_from_variant('SPLA_OMP', 'openmp'),
if '+openmp' in self.spec: self.define_from_variant('SPLA_STATIC', 'static')
args += ["-DSPLA_OMP=ON"] ]
else:
args += ["-DSPLA_OMP=OFF"]
if '+cuda' in self.spec: if '+cuda' in self.spec:
args += ["-DSPLA_GPU_BACKEND=CUDA"] args += ["-DSPLA_GPU_BACKEND=CUDA"]
@ -55,11 +53,6 @@ def cmake_args(self):
else: else:
args += ["-DSPLA_GPU_BACKEND=OFF"] args += ["-DSPLA_GPU_BACKEND=OFF"]
if '+static' in self.spec:
args += ["-DSPLA_STATIC=ON"]
else:
args += ["-DSPLA_STATIC=OFF"]
if self.spec['blas'].name == 'openblas': if self.spec['blas'].name == 'openblas':
args += ["-DSPLA_HOST_BLAS=OPENBLAS"] args += ["-DSPLA_HOST_BLAS=OPENBLAS"]
elif self.spec['blas'].name in ['amdblis', 'blis']: elif self.spec['blas'].name in ['amdblis', 'blis']: