diff options
author | iarspider <iarspider@gmail.com> | 2021-02-19 16:29:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-19 16:29:17 +0100 |
commit | 0880d2572d674e9ca5756a1cc3d8ec285cdae0db (patch) | |
tree | b1ef5036549332a742004b164450cbde9e9b5879 /var | |
parent | e8c2a1085a3f4d5ff82d907b6036a8001f1dd44b (diff) | |
download | spack-0880d2572d674e9ca5756a1cc3d8ec285cdae0db.tar.gz spack-0880d2572d674e9ca5756a1cc3d8ec285cdae0db.tar.bz2 spack-0880d2572d674e9ca5756a1cc3d8ec285cdae0db.tar.xz spack-0880d2572d674e9ca5756a1cc3d8ec285cdae0db.zip |
Add new variants to tauola (hepmc3, lhapdf) (#21802)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/tauola/package.py | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/tauola/package.py b/var/spack/repos/builtin/packages/tauola/package.py index ae10264235..5122aef89b 100644 --- a/var/spack/repos/builtin/packages/tauola/package.py +++ b/var/spack/repos/builtin/packages/tauola/package.py @@ -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 |