diff options
author | Dr. Christian Tacke <58549698+ChristianTackeGSI@users.noreply.github.com> | 2020-10-30 20:46:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-30 14:46:19 -0500 |
commit | c3630ed26e83151729e2f650fd7517ec2d601ce8 (patch) | |
tree | 2e1dbd7893b7a50c3ec2e43daa932ca390187802 /var | |
parent | 5a5c220d0afa8048631422f18bc5ef992e5ecbae (diff) | |
download | spack-c3630ed26e83151729e2f650fd7517ec2d601ce8.tar.gz spack-c3630ed26e83151729e2f650fd7517ec2d601ce8.tar.bz2 spack-c3630ed26e83151729e2f650fd7517ec2d601ce8.tar.xz spack-c3630ed26e83151729e2f650fd7517ec2d601ce8.zip |
hepmc: Add variants for length and momemtum (#19609)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/hepmc/package.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/hepmc/package.py b/var/spack/repos/builtin/packages/hepmc/package.py index 6581615a2b..eb47504343 100644 --- a/var/spack/repos/builtin/packages/hepmc/package.py +++ b/var/spack/repos/builtin/packages/hepmc/package.py @@ -4,9 +4,6 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from spack import * - - class Hepmc(CMakePackage): """The HepMC package is an object oriented, C++ event record for High Energy Physics Monte Carlo generators and simulation.""" @@ -21,10 +18,18 @@ class Hepmc(CMakePackage): version('2.06.06', sha256='8cdff26c10783ed4248220a84a43b7e1f9b59cc2c9a29bd634d024ca469db125') version('2.06.05', sha256='4c411077cc97522c03b74f973264b8d9fd2b6ccec0efc7ceced2645371c73618') + variant('length', default='MM', values=('CM', 'MM'), multi=False, + description='Unit of length') + variant('momentum', default='GEV', values=('GEV', 'MEV'), multi=False, + description='Unit of momentum') + depends_on('cmake@2.8.9:', type='build') def cmake_args(self): - return ['-Dmomentum:STRING=GEV', '-Dlength:STRING=MM'] + return [ + self.define_from_variant('momentum'), + self.define_from_variant('length') + ] def url_for_version(self, version): if version <= Version("2.06.08"): |