diff --git a/recipes/h5pp/all/conandata.yml b/recipes/h5pp/all/conandata.yml index 2aa0b94704f12e..dd08f4511c3dd6 100644 --- a/recipes/h5pp/all/conandata.yml +++ b/recipes/h5pp/all/conandata.yml @@ -17,3 +17,6 @@ sources: "1.10.0": sha256: 27a3e42ed02d8d9341229d58a517134753e1ea46dab4c40d01bb309098c32f13 url: https://github.com/DavidAce/h5pp/archive/v1.10.0.tar.gz + "1.11.0": + sha256: 1c4171275eb50a26ed9da8055397f03a726896c4c49ad0380b16dcb13574ecff + url: https://github.com/DavidAce/h5pp/archive/v1.11.0.tar.gz diff --git a/recipes/h5pp/all/conanfile.py b/recipes/h5pp/all/conanfile.py index 7179031345df57..ac11c70a03a292 100644 --- a/recipes/h5pp/all/conanfile.py +++ b/recipes/h5pp/all/conanfile.py @@ -1,10 +1,12 @@ +from conan import ConanFile from conan.tools.microsoft import is_msvc -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration +from conan.tools.scm import Version +from conan.tools.files import get +from conan.tools.build import check_min_cppstd +from conan.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.45.0" - +required_conan_version = ">=1.50.0" class H5ppConan(ConanFile): name = "h5pp" @@ -39,7 +41,7 @@ def _compilers_minimum_version(self): } def config_options(self): - if tools.Version(self.version) < "1.10.0": + if Version(self.version) < "1.10.0": # These dependencies are always required before h5pp 1.10.0: # * h5pp < 1.10.0 includes any version of headers indiscriminately (e.g. system headers), # and can't tell if the the corresponding library will be linked. This makes the, @@ -50,32 +52,36 @@ def config_options(self): del self.options.with_spdlog def requirements(self): - self.requires("hdf5/1.12.1") - if tools.Version(self.version) < "1.10.0" or self.options.get_safe('with_eigen'): + if Version(self.version) < "1.10.0": + self.requires("hdf5/1.12.1") + else: + self.requires("hdf5/1.13.1") + + if Version(self.version) < "1.10.0" or self.options.get_safe('with_eigen'): self.requires("eigen/3.4.0") - if tools.Version(self.version) < "1.10.0" or self.options.get_safe('with_spdlog'): - self.requires("spdlog/1.10.0") + if Version(self.version) < "1.10.0" or self.options.get_safe('with_spdlog'): + self.requires("spdlog/1.11.0") def package_id(self): - self.info.header_only() + self.info.clear() def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 17) + check_min_cppstd(self, 17) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version: - if tools.Version(self.settings.compiler.version) < minimum_version: + if Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration("h5pp requires C++17, which your compiler does not support.") else: self.output.warn("h5pp requires C++17. Your compiler is unknown. Assuming it supports C++17.") def source(self): - tools.get(**self.conan_data["sources"][self.version], + get(self,**self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) def package(self): self.copy("LICENSE", src=self._source_subfolder, dst="licenses") - if tools.Version(self.version) < "1.9.0": + if Version(self.version) < "1.9.0": includedir = os.path.join(self._source_subfolder, "h5pp", "include") else: includedir = os.path.join(self._source_subfolder, "include") @@ -89,7 +95,7 @@ def package_info(self): self.cpp_info.components["h5pp_flags"].set_property("cmake_target_name", "h5pp::flags") self.cpp_info.components["h5pp_deps"].requires = ["hdf5::hdf5"] - if tools.Version(self.version) >= "1.10.0": + if Version(self.version) >= "1.10.0": if self.options.with_eigen: self.cpp_info.components["h5pp_deps"].requires.append("eigen::eigen") self.cpp_info.components["h5pp_flags"].defines.append("H5PP_USE_EIGEN3") @@ -101,7 +107,7 @@ def package_info(self): self.cpp_info.components["h5pp_deps"].requires.append("eigen::eigen") self.cpp_info.components["h5pp_deps"].requires.append("spdlog::spdlog") - if (self.settings.compiler == "gcc" and tools.Version(self.settings.compiler.version) < "9") or \ + if (self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "9") or \ (self.settings.compiler == "clang" and self.settings.compiler.get_safe("libcxx") in ["libstdc++", "libstdc++11"]): self.cpp_info.components["h5pp_flags"].system_libs = ["stdc++fs"] if is_msvc(self): diff --git a/recipes/h5pp/config.yml b/recipes/h5pp/config.yml index a0e0d5427545b2..2a1bf3aae74878 100644 --- a/recipes/h5pp/config.yml +++ b/recipes/h5pp/config.yml @@ -11,3 +11,5 @@ versions: folder: "all" "1.10.0": folder: "all" + "1.11.0": + folder: "all"