diff --git a/var/spack/repos/builtin/packages/spla/package.py b/var/spack/repos/builtin/packages/spla/package.py index 7e3125268a..bcf242f885 100644 --- a/var/spack/repos/builtin/packages/spla/package.py +++ b/var/spack/repos/builtin/packages/spla/package.py @@ -41,12 +41,10 @@ class Spla(CMakePackage): depends_on('hsa-rocr-dev', when='+rocm', type='link') def cmake_args(self): - args = [] - - if '+openmp' in self.spec: - args += ["-DSPLA_OMP=ON"] - else: - args += ["-DSPLA_OMP=OFF"] + args = [ + self.define_from_variant('SPLA_OMP', 'openmp'), + self.define_from_variant('SPLA_STATIC', 'static') + ] if '+cuda' in self.spec: args += ["-DSPLA_GPU_BACKEND=CUDA"] @@ -55,11 +53,6 @@ def cmake_args(self): else: 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': args += ["-DSPLA_HOST_BLAS=OPENBLAS"] elif self.spec['blas'].name in ['amdblis', 'blis']: