From aca7861faf1076c9d1f65828175f7d0e81ca5d45 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Wed, 8 May 2019 15:09:42 -0600 Subject: [PATCH] cppstd moved to compiler.cppstd --- conanfile.py | 10 ++++++---- test_package/conanfile.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/conanfile.py b/conanfile.py index 0c93520a..6014aaba 100644 --- a/conanfile.py +++ b/conanfile.py @@ -43,7 +43,7 @@ class UnitsConan(ConanFile): url = "https://github.com/mpusz/units" description = "Physical Units library for C++" exports = ["LICENSE.md"] - settings = "cppstd", "os", "compiler", "build_type", "arch" + settings = "os", "compiler", "build_type", "arch" requires = ( "cmcstl2/2019.03.18@mpusz/stable", "gsl-lite/0.33.0@nonstd-lite/stable" @@ -58,9 +58,11 @@ class UnitsConan(ConanFile): def configure(self): if self.settings.compiler != "gcc": - raise ConanInvalidConfiguration("Library units works only with gcc") - if self.settings.cppstd not in ["20", "gnu20"]: - raise ConanInvalidConfiguration("Library units requires at least C++20 support") + raise ConanInvalidConfiguration("Library works only with gcc") + # if int(self.settings.compiler.version) < 8: + # raise ConanInvalidConfiguration("Library works only with at least gcc 8.0") + if self.settings.compiler.cppstd not in ["20", "gnu20"]: + raise ConanInvalidConfiguration("Library requires at least C++20 support") def _configure_cmake(self): cmake = CMake(self) diff --git a/test_package/conanfile.py b/test_package/conanfile.py index e0b31a44..e4065902 100644 --- a/test_package/conanfile.py +++ b/test_package/conanfile.py @@ -24,7 +24,7 @@ from conans import ConanFile, CMake, tools, RunEnvironment import os class TestPackageConan(ConanFile): - settings = "cppstd", "os", "compiler", "build_type", "arch" + settings = "os", "compiler", "build_type", "arch" generators = "cmake" def build(self):