geomodel: Allow configuring C++ standard (#47422)

* geomodel: Allow configuring C++ standard

* drop c++11
This commit is contained in:
Paul Gessinger 2024-11-12 20:41:14 +01:00 committed by GitHub
parent 751585f1e3
commit 3dadf569a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,6 +54,14 @@ class Geomodel(CMakePackage):
when="+fullsimlight", when="+fullsimlight",
) )
variant(
"cxxstd",
default="17",
values=("17", "20", "23"),
multi=False,
description="Use the specified C++ standard when building",
)
conflicts("+fullsimlight", when="+fsl", msg="FSL triggers the build of the FullSimLight") conflicts("+fullsimlight", when="+fsl", msg="FSL triggers the build of the FullSimLight")
depends_on("cmake@3.16:", type="build") depends_on("cmake@3.16:", type="build")
@ -80,5 +88,6 @@ def cmake_args(self):
self.define_from_variant("GEOMODEL_BUILD_FSL", "fsl"), self.define_from_variant("GEOMODEL_BUILD_FSL", "fsl"),
self.define_from_variant("GEOMODEL_BUILD_EXAMPLES", "examples"), self.define_from_variant("GEOMODEL_BUILD_EXAMPLES", "examples"),
self.define_from_variant("GEOMODEL_BUILD_TOOLS", "tools"), self.define_from_variant("GEOMODEL_BUILD_TOOLS", "tools"),
self.define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"),
] ]
return args return args