Skip to content

Commit

Permalink
(#23964) 7bitdi: add version 3.3.0
Browse files Browse the repository at this point in the history
* 7bitdi: add version 3.3.0

* remove setting package_type on setting header_only
  • Loading branch information
toge committed Jun 11, 2024
1 parent c6f94bb commit a9704b0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
3 changes: 3 additions & 0 deletions recipes/7bitdi/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"3.3.0":
url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v3.3.0.tar.gz"
sha256: "b9ddb2fc263c79cb414544e97d44dcc8cd1e1a91b38129d96b7051728a4583b9"
"3.2.0":
url: "https://github.com/7bitcoder/7bitDI/archive/refs/tags/v3.2.0.tar.gz"
sha256: "4549b651a28b309a31cb3b879b7f31069cbca041cfb9ffad82ccc26f78b8e5e0"
Expand Down
16 changes: 9 additions & 7 deletions recipes/7bitdi/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@

required_conan_version = ">=1.53.0"


class SevenBitDIConan(ConanFile):
name = "7bitdi"
description = "a simple C++ dependency injection library."
license = "MIT"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/7bitcoder/7bitDI"
description = "7bitDI is a simple C++ dependency injection library."
topics = ("cpp17", "dependency-injector", "injector", "header-only")
url = "https://github.com/conan-io/conan-center-index"
license = "MIT"
package_type = "library"
settings = "os", "arch", "compiler", "build_type"
options = {
Expand All @@ -29,6 +28,10 @@ class SevenBitDIConan(ConanFile):
"fPIC": True,
}

@property
def _min_cppstd(self):
return 17

@property
def _minimum_compilers_version(self):
return {
Expand Down Expand Up @@ -61,12 +64,11 @@ def validate(self):
compiler_name = str(compiler)

if compiler.get_safe("cppstd"):
check_min_cppstd(self, 17)

check_min_cppstd(self, self._min_cppstd)
minimum_version = self._minimum_compilers_version.get(compiler_name, False)
if minimum_version and Version(compiler.version) < minimum_version:
raise ConanInvalidConfiguration(
f"Requires compiler {compiler_name} minimum version: {minimum_version} with C++17 support."
f"{self.ref} requires compiler {compiler_name} minimum version: {minimum_version} with C++{self._min_cppstd} support."
)

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

0 comments on commit a9704b0

Please sign in to comment.