diff options
author | Peter Scheibel <scheibel1@llnl.gov> | 2020-06-12 18:12:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 20:12:35 -0500 |
commit | 2b58b3a1bfc5c30f8640601f3bfd2db8b723eb3a (patch) | |
tree | 78abddea262e64b9e83a8d49e0f58b14efd3f4b6 /var | |
parent | 416e94be7294ccfc3f8d9666c75f2790bb58089f (diff) | |
download | spack-2b58b3a1bfc5c30f8640601f3bfd2db8b723eb3a.tar.gz spack-2b58b3a1bfc5c30f8640601f3bfd2db8b723eb3a.tar.bz2 spack-2b58b3a1bfc5c30f8640601f3bfd2db8b723eb3a.tar.xz spack-2b58b3a1bfc5c30f8640601f3bfd2db8b723eb3a.zip |
replace 'no' with 'none' as possible value of 'threads' variant (#17063)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/libflame/package.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/libflame/package.py b/var/spack/repos/builtin/packages/libflame/package.py index 1a8de4b47a..7d7a9837d3 100644 --- a/var/spack/repos/builtin/packages/libflame/package.py +++ b/var/spack/repos/builtin/packages/libflame/package.py @@ -30,9 +30,9 @@ class Libflame(AutotoolsPackage): ' to their corresponding native C implementations' ' in libflame.') - variant('threads', default='no', + variant('threads', default='none', description='Multithreading support', - values=('pthreads', 'openmp', 'no'), + values=('pthreads', 'openmp', 'none'), multi=False) variant('static', default=True, @@ -70,6 +70,12 @@ class Libflame(AutotoolsPackage): flags.append('-std=gnu99') return (flags, None, None) + def enable_or_disable_threads(self, variant, options): + opt_val = self.spec.variants['threads'].value + if variant_val == 'none': + opt_val = 'no' + return ['--enable-multithreading={0}'.format(opt_val)] + def configure_args(self): # Libflame has a secondary dependency on BLAS, # but doesn't know which library name to expect: @@ -96,10 +102,9 @@ class Libflame(AutotoolsPackage): else: config_args.append("--disable-debug") - config_args.append('--enable-multithreading=' - + self.spec.variants['threads'].value) + config_args.extend(self.enable_or_disable('threads')) - if 'no' != self.spec.variants['threads'].value: + if 'none' != self.spec.variants['threads'].value: config_args.append("--enable-supermatrix") else: config_args.append("--disable-supermatrix") |