mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-31 10:57:16 +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",
|
build_policy = "outdated",
|
||||||
upload_dependencies="all")
|
upload_dependencies="all")
|
||||||
builder.add_common_builds(pure_c=False)
|
builder.add_common_builds(pure_c=False)
|
||||||
|
for settings, options, env_vars, build_requires, reference in builder.items:
|
||||||
|
settings["cppstd"] = "20"
|
||||||
builder.run()
|
builder.run()
|
||||||
|
@ -43,7 +43,7 @@ class UnitsConan(ConanFile):
|
|||||||
url = "https://github.com/mpusz/units"
|
url = "https://github.com/mpusz/units"
|
||||||
description = "Physical Units library for C++"
|
description = "Physical Units library for C++"
|
||||||
exports = ["LICENSE.md"]
|
exports = ["LICENSE.md"]
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "cppstd", "os", "compiler", "build_type", "arch"
|
||||||
requires = (
|
requires = (
|
||||||
"cmcstl2/2019.03.18@mpusz/stable",
|
"cmcstl2/2019.03.18@mpusz/stable",
|
||||||
"gsl-lite/0.33.0@nonstd-lite/stable"
|
"gsl-lite/0.33.0@nonstd-lite/stable"
|
||||||
@ -55,6 +55,10 @@ class UnitsConan(ConanFile):
|
|||||||
}
|
}
|
||||||
generators = "cmake"
|
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):
|
def _configure_cmake(self):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
if tools.get_env("CONAN_RUN_TESTS", False):
|
if tools.get_env("CONAN_RUN_TESTS", False):
|
||||||
|
Reference in New Issue
Block a user