From ee78bc3c07f6885cb6d2c0b3943bb21c52c584d4 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 19 Feb 2023 16:09:52 +0100 Subject: [PATCH 1/2] modernize more --- recipes/re2/all/conanfile.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/recipes/re2/all/conanfile.py b/recipes/re2/all/conanfile.py index a4b44532b5660..55ed6a3721281 100644 --- a/recipes/re2/all/conanfile.py +++ b/recipes/re2/all/conanfile.py @@ -4,7 +4,7 @@ from conan.tools.files import copy, get, rmdir import os -required_conan_version = ">=1.53.0" +required_conan_version = ">=1.54.0" class Re2Conan(ConanFile): @@ -15,6 +15,7 @@ class Re2Conan(ConanFile): homepage = "https://github.com/google/re2" license = "BSD-3-Clause" + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -37,18 +38,15 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): - if self.info.settings.compiler.get_safe("cppstd"): + if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) tc.variables["RE2_BUILD_TESTING"] = False - # Honor BUILD_SHARED_LIBS from conan_toolchain (see https://github.com/conan-io/conan/issues/11840) - tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" tc.generate() def build(self): From e2aa65c961d48d688dd5450811229eb1d62649ba Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 19 Feb 2023 16:10:08 +0100 Subject: [PATCH 2/2] fix topics --- recipes/re2/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/re2/all/conanfile.py b/recipes/re2/all/conanfile.py index 55ed6a3721281..c8ad0901b061a 100644 --- a/recipes/re2/all/conanfile.py +++ b/recipes/re2/all/conanfile.py @@ -10,7 +10,7 @@ class Re2Conan(ConanFile): name = "re2" description = "Fast, safe, thread-friendly regular expression library" - topics = ("regex") + topics = ("regex",) url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/google/re2" license = "BSD-3-Clause"