Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
protobuf: cleanup
Browse files Browse the repository at this point in the history
remove dead code and patches

identified in conan-io#21163 and conan-io#21146
  • Loading branch information
ericLemanissier authored Nov 17, 2023
1 parent 042b4ce commit ce2383f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 26 deletions.
14 changes: 3 additions & 11 deletions recipes/protobuf/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,12 @@ def _is_clang_cl(self):
def _is_clang_x86(self):
return self.settings.compiler == "clang" and self.settings.arch == "x86"

@property
def _can_disable_rtti(self):
return Version(self.version) >= "3.15.4"

def export_sources(self):
export_conandata_patches(self)

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
if not self._can_disable_rtti:
del self.options.with_rtti

def configure(self):
if self.options.shared:
Expand All @@ -79,7 +73,7 @@ def validate(self):
check_min_vs(self, "190")

if self.settings.compiler == "clang":
if Version(self.version) >= "3.15.4" and Version(self.settings.compiler.version) < "4":
if Version(self.settings.compiler.version) < "4":
raise ConanInvalidConfiguration(f"{self.ref} doesn't support clang < 4")

def source(self):
Expand All @@ -97,10 +91,8 @@ def generate(self):
tc.cache_variables["protobuf_BUILD_PROTOC_BINARIES"] = self.settings.os != "tvOS"
if not self.options.debug_suffix:
tc.cache_variables["protobuf_DEBUG_POSTFIX"] = ""
if Version(self.version) >= "3.14.0":
tc.cache_variables["protobuf_BUILD_LIBPROTOC"] = self.settings.os != "tvOS"
if self._can_disable_rtti:
tc.cache_variables["protobuf_DISABLE_RTTI"] = not self.options.with_rtti
tc.cache_variables["protobuf_BUILD_LIBPROTOC"] = self.settings.os != "tvOS"
tc.cache_variables["protobuf_DISABLE_RTTI"] = not self.options.with_rtti
if is_msvc(self) or self._is_clang_cl:
runtime = msvc_runtime_flag(self)
if not runtime:
Expand Down
15 changes: 0 additions & 15 deletions recipes/protobuf/all/patches/upstream-pr-9153-msvc-runtime.patch

This file was deleted.

0 comments on commit ce2383f

Please sign in to comment.