Skip to content

Commit

Permalink
(#15447) Update strong_type, v10
Browse files Browse the repository at this point in the history
* Update strong_type, v9

* Set minimum GCC to 7

* Add version v10
  • Loading branch information
a4z authored Feb 5, 2023
1 parent 1add931 commit f9bc58b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
6 changes: 6 additions & 0 deletions recipes/strong_type/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ sources:
"v8":
url: https://github.com/rollbear/strong_type/archive/refs/tags/v8.tar.gz
sha256: 31ee68e097fec2ce65dbf2ed683911c5ee6a7a37808b28d84479ef7e17990fad
"v9":
url: https://github.com/rollbear/strong_type/archive/refs/tags/v9.tar.gz
sha256: 9d71ee02256b99c7f0189295514dd683cc1be8886444d5c04623fd491cf5aa40
"v10":
url: https://github.com/rollbear/strong_type/archive/refs/tags/v10.tar.gz
sha256: 154e4ceda6cf8fe734deb7eafdf58df5052822d04425dc7c22711ef54cdaeefa
16 changes: 12 additions & 4 deletions recipes/strong_type/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from conan.tools.build import check_min_cppstd
from conan.tools.files import copy, get
from conan.tools.layout import basic_layout
from conan.tools.scm import Version
from conan.errors import ConanInvalidConfiguration
import os

required_conan_version = ">=1.50.0"
Expand All @@ -23,6 +25,8 @@ def package_id(self):
def validate(self):
if self.settings.compiler.get_safe("cppstd"):
check_min_cppstd(self, 14)
if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "7":
raise ConanInvalidConfiguration("GCC < version 7 is not supported")

def layout(self):
basic_layout(self, src_folder="src")
Expand All @@ -35,12 +39,15 @@ def build(self):
pass

def package(self):
copy(self, "*", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include"))
copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
copy(self, "*", src=os.path.join(self.source_folder, "include"),
dst=os.path.join(self.package_folder, "include"))
copy(self, "LICENSE", src=self.source_folder,
dst=os.path.join(self.package_folder, "licenses"))

def package_info(self):
self.cpp_info.set_property("cmake_file_name", "strong_type")
self.cpp_info.set_property("cmake_target_name", "rollbear::strong_type")
self.cpp_info.set_property(
"cmake_target_name", "rollbear::strong_type")
self.cpp_info.bindirs = []
self.cpp_info.frameworkdirs = []
self.cpp_info.libdirs = []
Expand All @@ -53,7 +60,8 @@ def package_info(self):
self.cpp_info.names["cmake_find_package_multi"] = "rollbear"
self.cpp_info.components["strong_type"].names["cmake_find_package"] = "strong_type"
self.cpp_info.components["strong_type"].names["cmake_find_package_multi"] = "strong_type"
self.cpp_info.components["strong_type"].set_property("cmake_target_name", "rollbear::strong_type")
self.cpp_info.components["strong_type"].set_property(
"cmake_target_name", "rollbear::strong_type")
self.cpp_info.components["strong_type"].bindirs = []
self.cpp_info.components["strong_type"].frameworkdirs = []
self.cpp_info.components["strong_type"].libdirs = []
Expand Down
4 changes: 4 additions & 0 deletions recipes/strong_type/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ versions:
folder: all
"v8":
folder: all
"v9":
folder: all
"v10":
folder: all

0 comments on commit f9bc58b

Please sign in to comment.