Add new variants to tauola (hepmc3, lhapdf) (#21802)
This commit is contained in:
parent
e8c2a1085a
commit
0880d2572d
@ -16,13 +16,35 @@ class Tauola(AutotoolsPackage):
|
||||
|
||||
version('1.1.8', sha256='3f734e8a967682869cca2c1ffebd3e055562613c40853cc81820d8b666805ed5')
|
||||
|
||||
variant('hepmc', default=True, description="Enable hepmc 2.x support")
|
||||
variant('hepmc3', default=False, description="Enable hepmc3 support")
|
||||
variant('lhapdf', default=False, description="Enable lhapdf support")
|
||||
variant('cxxstd',
|
||||
default='11',
|
||||
values=('11', '14', '17', '20'),
|
||||
multi=False,
|
||||
description='Use the specified C++ standard when building.')
|
||||
|
||||
maintainers = ['vvolkl']
|
||||
|
||||
depends_on('hepmc@:2.99.99')
|
||||
depends_on('hepmc', when='+hepmc')
|
||||
depends_on('hepmc3', when='+hepmc3')
|
||||
depends_on('lhapdf', when='+lhapdf')
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
if name == 'cflags':
|
||||
flags.append('-O2')
|
||||
elif name == 'cxxflags':
|
||||
flags.append('-O2')
|
||||
flags.append('-std=c++{0}'.format(self.spec.variants['cxxstd'].value))
|
||||
elif name == 'fflags':
|
||||
flags.append('-O2')
|
||||
return (None, None, flags)
|
||||
|
||||
def configure_args(self):
|
||||
args = []
|
||||
args = ['--with-pic']
|
||||
|
||||
args.append('--with-hepmc=%s' % self.spec["hepmc"].prefix)
|
||||
args.append('--without-hepmc3')
|
||||
args.extend(self.with_or_without('hepmc', 'prefix'))
|
||||
args.extend(self.with_or_without('hepmc3', 'prefix'))
|
||||
args.extend(self.with_or_without('lhapdf', 'prefix'))
|
||||
return args
|
||||
|
Loading…
Reference in New Issue
Block a user