Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis-plus-plus: cleanup #21186

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.