Skip to content

Commit

Permalink
(#21186) redis-plus-plus: cleanup
Browse files Browse the repository at this point in the history
remove dead code and patches
also, bump deps

identified in #21163 and #21146
  • Loading branch information
ericLemanissier authored Nov 21, 2023
1 parent 764f1e3 commit 1bd648e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 86 deletions.
13 changes: 4 additions & 9 deletions recipes/redis-plus-plus/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file, rmdir
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir
from conan.tools.scm import Version
import os

Expand Down Expand Up @@ -64,9 +64,9 @@ def layout(self):
cmake_layout(self, src_folder="src")

def requirements(self):
self.requires("hiredis/1.1.0", transitive_headers=True, transitive_libs=True)
self.requires("hiredis/1.2.0", transitive_headers=True, transitive_libs=True)
if self.options.get_safe("build_async"):
self.requires("libuv/1.46.0")
self.requires("libuv/1.47.0")

def validate(self):
if self.info.settings.compiler.get_safe("cppstd"):
Expand Down Expand Up @@ -97,18 +97,13 @@ def generate(self):
tc.variables["REDIS_PLUS_PLUS_BUILD_TEST"] = False
tc.variables["REDIS_PLUS_PLUS_BUILD_STATIC"] = not self.options.shared
tc.variables["REDIS_PLUS_PLUS_BUILD_SHARED"] = self.options.shared
if Version(self.version) >= "1.2.3":
tc.variables["REDIS_PLUS_PLUS_BUILD_STATIC_WITH_PIC"] = self.options.shared
tc.variables["REDIS_PLUS_PLUS_BUILD_STATIC_WITH_PIC"] = self.options.shared
tc.generate()
deps = CMakeDeps(self)
deps.generate()

def _patch_sources(self):
apply_conandata_patches(self)
if Version(self.version) < "1.2.3":
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"),
"set_target_properties(${STATIC_LIB} PROPERTIES POSITION_INDEPENDENT_CODE ON)",
"")

def build(self):
self._patch_sources()
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 1bd648e

Please sign in to comment.