From c3630ed26e83151729e2f650fd7517ec2d601ce8 Mon Sep 17 00:00:00 2001 From: "Dr. Christian Tacke" <58549698+ChristianTackeGSI@users.noreply.github.com> Date: Fri, 30 Oct 2020 20:46:19 +0100 Subject: hepmc: Add variants for length and momemtum (#19609) --- var/spack/repos/builtin/packages/hepmc/package.py | 13 +++++++++---- 1 file 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"): -- cgit v1.2.3-70-g09d2