diff options
author | Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> | 2024-05-09 18:32:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-09 09:32:38 -0700 |
commit | d88fa5cf8e7d4de2f40735b2aa9dd02ac81542ab (patch) | |
tree | 77a1436aaf3c58271a802281658d81651ec8e3a0 | |
parent | 2ed0e3d737bf2c371e38952cf81d38295ed6307c (diff) | |
download | spack-d88fa5cf8e7d4de2f40735b2aa9dd02ac81542ab.tar.gz spack-d88fa5cf8e7d4de2f40735b2aa9dd02ac81542ab.tar.bz2 spack-d88fa5cf8e7d4de2f40735b2aa9dd02ac81542ab.tar.xz spack-d88fa5cf8e7d4de2f40735b2aa9dd02ac81542ab.zip |
pythia8: add a cxxstd variant (#44077)
* pythia8: add a cxxstd variant
* Add multi=False, fix regexp
---------
Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
-rw-r--r-- | var/spack/repos/builtin/packages/pythia8/package.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/pythia8/package.py b/var/spack/repos/builtin/packages/pythia8/package.py index f762c01226..0086f2b730 100644 --- a/var/spack/repos/builtin/packages/pythia8/package.py +++ b/var/spack/repos/builtin/packages/pythia8/package.py @@ -58,6 +58,14 @@ class Pythia8(AutotoolsPackage): deprecated=True, ) + variant( + "cxxstd", + default="11", + values=("11", "17", "20", "23"), + multi=False, + description="Use the specified C++ standard when building", + ) + variant("shared", default=True, description="Build shared library") variant("gzip", default=False, description="Build with gzip support, for reading lhe.gz files") variant( @@ -120,6 +128,12 @@ class Pythia8(AutotoolsPackage): filter_compiler_wrappers("Makefile.inc", relative_root="share/Pythia8/examples") + @run_before("configure") + def setup_cxxstd(self): + filter_file( + r"-std=c\+\+[0-9][0-9]", f"-std=c++{self.spec.variants['cxxstd'].value}", "configure" + ) + def configure_args(self): args = [] |