replace 'no' with 'none' as possible value of 'threads' variant (#17063)
This commit is contained in:
parent
416e94be72
commit
2b58b3a1bf
1 changed files with 10 additions and 5 deletions
|
@ -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 @@ def flag_handler(self, name, flags):
|
|||
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 @@ def configure_args(self):
|
|||
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")
|
||||
|
|
Loading…
Reference in a new issue