hepmc3: fix typo in cmake arg for the +protobuf variant (#46872)

* fix typo in variable name in hepmc3 variant

* set cxx standard to 14 when using protobuf

* add myself to hepmc3 maintainer list

* hepmc3: Applied suggestion of @acecbs for spec.satisfies("+protobuf") (agreed!)

Co-authored-by: Alec Scott <hi@alecbcs.com>

* hepmc3: cxx_standard for protobuf

only set cxx standard to meet protobuf minimum (14) if not also rootio variant as that sets the cxx standard to match the root public API standard requirements
This commit is contained in:
Luke Pickering 2024-10-10 07:40:22 +01:00 committed by GitHub
parent f756ab156c
commit de0d5ba883
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,7 +16,7 @@ class Hepmc3(CMakePackage):
tags = ["hep"] tags = ["hep"]
maintainers("vvolkl") maintainers("vvolkl", "luketpickering")
license("LGPL-3.0-or-later") license("LGPL-3.0-or-later")
@ -62,7 +62,7 @@ def cmake_args(self):
spec = self.spec spec = self.spec
from_variant = self.define_from_variant from_variant = self.define_from_variant
args = [ args = [
from_variant("HEPMC3_ENABLE_PROTOBUF", "protobuf"), from_variant("HEPMC3_ENABLE_PROTOBUFIO", "protobuf"),
from_variant("HEPMC3_ENABLE_PYTHON", "python"), from_variant("HEPMC3_ENABLE_PYTHON", "python"),
from_variant("HEPMC3_ENABLE_ROOTIO", "rootio"), from_variant("HEPMC3_ENABLE_ROOTIO", "rootio"),
from_variant("HEPMC3_INSTALL_INTERFACES", "interfaces"), from_variant("HEPMC3_INSTALL_INTERFACES", "interfaces"),
@ -84,5 +84,7 @@ def cmake_args(self):
args.append( args.append(
self.define("HEPMC3_CXX_STANDARD", spec["root"].variants["cxxstd"].value) self.define("HEPMC3_CXX_STANDARD", spec["root"].variants["cxxstd"].value)
) )
elif spec.satisfies("+protobuf"):
args.append(self.define("HEPMC3_CXX_STANDARD", "14"))
return args return args