podio: new variant cxxstd=(17,20) (#30437)
This commit is contained in:
parent
51ce370412
commit
29093f13ec
1 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue