sherpa: support cxxstd=20 when=@3: (#48829)

* sherpa: support cxxstd=20 when=@3:

* hep: sherpa cxxstd=20
This commit is contained in:
Wouter Deconinck 2025-02-03 22:24:35 -06:00 committed by GitHub
parent 9b032018d6
commit f2f13964fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -83,7 +83,7 @@ spack:
- pythia8 +evtgen +fastjet +hdf5 +hepmc +hepmc3 +lhapdf ~madgraph5amc +python +rivet ~root # pythia8 and root circularly depend
- rivet hepmc=3
- root +davix +dcache +examples +fftw +fits +fortran +gdml +graphviz +gsl +http +math +minuit +mlp +mysql +opengl +postgres +pythia8 +python +r +roofit +root7 +rpath ~shadow +spectrum +sqlite +ssl +tbb +threads +tmva +unuran +vc +vdt +veccore +webgui +x +xml +xrootd
- sherpa +analysis ~blackhat +gzip +hepmc3 +hepmc3root +lhapdf +lhole +openloops +pythia ~python ~recola ~rivet +root +ufo
- sherpa +analysis ~blackhat +gzip +hepmc3 +hepmc3root +lhapdf +lhole +openloops +pythia ~python ~recola ~rivet +root +ufo cxxstd=20
- tauola +hepmc3 +lhapdf cxxstd=20
- thepeg hepmc=3 ~rivet
- vecgeom +gdml +geant4 +root

View File

@ -39,7 +39,7 @@ class Sherpa(CMakePackage, AutotoolsPackage):
depends_on("cxx", type="build") # generated
depends_on("fortran", type="build") # generated
_cxxstd_values = ("11", "14", "17")
_cxxstd_values = (conditional("11", "14", "17", when="@:"), conditional("20", when="@3:"))
variant(
"cxxstd",
default="11",
@ -114,7 +114,8 @@ class Sherpa(CMakePackage, AutotoolsPackage):
filter_compiler_wrappers("share/SHERPA-MC/makelibs")
for std in _cxxstd_values:
depends_on("root cxxstd=" + std, when="+root cxxstd=" + std)
for v in std:
depends_on(f"root cxxstd={v.value}", when=f"+root cxxstd={v.value}")
def patch(self):
filter_file(