cppstd support added

This commit is contained in:
Mateusz Pusz
2019-04-10 17:19:55 +01:00
parent 1dca9fa890
commit 134f137a2f
2 changed files with 7 additions and 1 deletions

View File

@ -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()

View File

@ -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):