mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-30 18:37:15 +02:00
cppstd support added
This commit is contained in:
2
build.py
2
build.py
@ -9,4 +9,6 @@ if __name__ == "__main__":
|
||||
build_policy = "outdated",
|
||||
upload_dependencies="all")
|
||||
builder.add_common_builds(pure_c=False)
|
||||
for settings, options, env_vars, build_requires, reference in builder.items:
|
||||
settings["cppstd"] = "20"
|
||||
builder.run()
|
||||
|
@ -43,7 +43,7 @@ class UnitsConan(ConanFile):
|
||||
url = "https://github.com/mpusz/units"
|
||||
description = "Physical Units library for C++"
|
||||
exports = ["LICENSE.md"]
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
settings = "cppstd", "os", "compiler", "build_type", "arch"
|
||||
requires = (
|
||||
"cmcstl2/2019.03.18@mpusz/stable",
|
||||
"gsl-lite/0.33.0@nonstd-lite/stable"
|
||||
@ -55,6 +55,10 @@ class UnitsConan(ConanFile):
|
||||
}
|
||||
generators = "cmake"
|
||||
|
||||
def configure(self):
|
||||
if self.settings.cppstd not in ["20", "gnu20"]:
|
||||
raise ConanInvalidConfiguration("Library units requires at least C++20 support")
|
||||
|
||||
def _configure_cmake(self):
|
||||
cmake = CMake(self)
|
||||
if tools.get_env("CONAN_RUN_TESTS", False):
|
||||
|
Reference in New Issue
Block a user