diff options
-rw-r--r-- | var/spack/repos/builtin/packages/podio/package.py | 11 |
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 |