summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorWouter Deconinck <wdconinc@gmail.com>2022-09-12 07:44:16 -0500
committerGitHub <noreply@github.com>2022-09-12 14:44:16 +0200
commit29093f13ecda10d81cea7b4790ba8d73411356c5 (patch)
tree33e57008db4010b00f845a7a670ceddbe27203b1 /var
parent51ce3704128e5af6e8b9fdcfb2a0ba4c12ef70d0 (diff)
downloadspack-29093f13ecda10d81cea7b4790ba8d73411356c5.tar.gz
spack-29093f13ecda10d81cea7b4790ba8d73411356c5.tar.bz2
spack-29093f13ecda10d81cea7b4790ba8d73411356c5.tar.xz
spack-29093f13ecda10d81cea7b4790ba8d73411356c5.zip
podio: new variant cxxstd=(17,20) (#30437)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/podio/package.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/podio/package.py b/var/spack/repos/builtin/packages/podio/package.py
index b4fcc9c769..df543c0588 100644
--- a/var/spack/repos/builtin/packages/podio/package.py
+++ b/var/spack/repos/builtin/packages/podio/package.py
@@ -78,6 +78,13 @@ class Podio(CMakePackage):
deprecated=True,
)
+ variant(
+ "cxxstd",
+ default="17",
+ values=("17", conditional("20", when="@0.15:")),
+ multi=False,
+ description="Use the specified C++ standard when building.",
+ )
variant("sio", default=False, description="Build the SIO I/O backend")
# cpack config throws an error on some systems
@@ -85,7 +92,8 @@ class Podio(CMakePackage):
patch("dictloading.patch", when="@0.10.0")
patch("python-tests.patch", when="@:0.14.0")
- depends_on("root@6.08.06: cxxstd=17")
+ depends_on("root@6.08.06: cxxstd=17", when="cxxstd=17")
+ depends_on("root@6.25.02: cxxstd=20", when="cxxstd=20")
depends_on("cmake@3.8:", type="build")
depends_on("python", type=("build", "run"))
@@ -99,6 +107,7 @@ class Podio(CMakePackage):
def cmake_args(self):
args = [
self.define_from_variant("ENABLE_SIO", "sio"),
+ self.define("CMAKE_CXX_STANDARD", self.spec.variants["cxxstd"].value),
self.define("BUILD_TESTING", self.run_tests),
]
return args