Skip to content

Commit

Permalink
(#17778) glaze: add version 1.2.5, update dependencies
Browse files Browse the repository at this point in the history
* glaze: add version 1.2.4

* drop support apple-clang for glaze<1.0

* fix validateion

* rename _min_cppstd

* update 1.2.5
  • Loading branch information
toge authored Jun 12, 2023
1 parent ac1171f commit cb81489
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
3 changes: 3 additions & 0 deletions recipes/glaze/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.2.5":
url: "https://github.com/stephenberry/glaze/archive/v1.2.5.tar.gz"
sha256: "bc3ff0b24c8c71557e7aabc5a2bfedd51acea92548c208c3a51815848d2b2c5a"
"1.2.3":
url: "https://github.com/stephenberry/glaze/archive/v1.2.3.tar.gz"
sha256: "003cd3922795319253f080b328dd5c957bc8f446cc2a8145324c2748f4acf10f"
Expand Down
18 changes: 6 additions & 12 deletions recipes/glaze/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class GlazeConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"

@property
def _minimum_cpp_standard(self):
def _min_cppstd(self):
return 20

@property
Expand All @@ -40,11 +40,11 @@ def layout(self):

def requirements(self):
if Version(self.version) < "0.2.4":
self.requires("fmt/9.1.0")
self.requires("fmt/10.0.0")
self.requires("frozen/1.1.1")
self.requires("nanorange/cci.20200706")
if Version(self.version) < "0.2.3":
self.requires("fast_float/4.0.0")
self.requires("fast_float/5.0.0")
if "0.1.5" <= Version(self.version) < "0.2.3":
self.requires("dragonbox/1.1.3")

Expand All @@ -53,18 +53,12 @@ def package_id(self):

def validate(self):
if self.settings.get_safe("compiler.cppstd"):
check_min_cppstd(self, self._minimum_cpp_standard)

def loose_lt_semver(v1, v2):
lv1 = [int(v) for v in v1.split(".")]
lv2 = [int(v) for v in v2.split(".")]
min_length = min(len(lv1), len(lv2))
return lv1[:min_length] < lv2[:min_length]
check_min_cppstd(self, self._min_cppstd)

minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False)
if minimum_version and loose_lt_semver(str(self.settings.compiler.version), minimum_version):
if minimum_version and Version(self.settings.compiler.version) < minimum_version:
raise ConanInvalidConfiguration(
f"{self.name} {self.version} requires C++{self._minimum_cpp_standard}, which your compiler does not support.",
f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support."
)

def source(self):
Expand Down
2 changes: 2 additions & 0 deletions recipes/glaze/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.2.5":
folder: all
"1.2.3":
folder: all
"1.2.2":
Expand Down

0 comments on commit cb81489

Please sign in to comment.