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] Add new port #8846

Merged

Conversation

NancyLi1013
Copy link
Contributor

@NancyLi1013 NancyLi1013 commented Nov 1, 2019

This is a C++ client for Redis. It's based on hiredis, and written in C++ 11.
It depends on hiredis, the related PR #8845.
Since hiredis only supports dynamic build on Unix.
redis-plus-plus only supports Unix too.

When building test, it needs find_library(HIREDIS_STATIC_LIB libhiredis.a), so I disable test now.

Related issue #8840.

Note: this port doesn't contain any feature.

@NancyLi1013 NancyLi1013 added the info:internal This PR or Issue was filed by the vcpkg team. label Nov 1, 2019
@NancyLi1013 NancyLi1013 requested a review from JackBoosY November 1, 2019 07:44
@MVoz
Copy link
Contributor

MVoz commented Nov 2, 2019

only supports Unix? windows support

@NancyLi1013
Copy link
Contributor Author

@voskrese thanks for your attention. Since this port needs to depend on hiredis that only supports Unix. redis-plus-plus currently only supports Unix too.

@MVoz
Copy link
Contributor

MVoz commented Nov 4, 2019

vcpkg_download_distfile(ARCHIVE
    URLS "https://github.com/redis/hiredis/archive/f5f855c91239706b173e2412cea301f4a3643e2d.zip"
    FILENAME "hiredis.zip"
    SHA512 89c86c64fe38de8e925f9ca283136ab7a4d7b86a8b94fefd08fa9191b8b05ef4f166da423ce2e50ccdb155b4e8a35c4c49f109f6bfd90000397f36a694a0e46a
)

vcpkg_extract_source_archive_ex(
    OUT_SOURCE_PATH SOURCE_PATH
    ARCHIVE ${ARCHIVE}
)

vcpkg_configure_cmake(
    SOURCE_PATH ${SOURCE_PATH}
    PREFER_NINJA # Disable this option if project cannot be built with Ninja
    NO_CHARSET_FLAG # automatic templates
    OPTIONS_DEBUG # automatic templates
      -DINSTALL_HEADERS_TOOLS=OFF
      -DINSTALL_HEADERS=OFF
)

work msvc 2017

@MVoz
Copy link
Contributor

MVoz commented Nov 4, 2019

old version work msvc 2017

set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/hiredis-0.13.3-windows)

vcpkg_download_distfile(ARCHIVE
    URLS "https://github.com/Intelight/hiredis/archive/v0.13.3-windows.zip"
    FILENAME "hiredis-windows.zip"
    SHA512 bb5a6a8e03f53b5b82c021e4049b4f3b707213458ccf8788e61ba1e4ff601ce11de9d4d66ad1d81727951779e8843e793701dfc4ef454f25372c748ad8d80d17
)

@NancyLi1013
Copy link
Contributor Author

@voskrese thanks again for your comments. I have compared with the two source codes and found that they are from different addresses. The CMakelist.txt files are different too. I will try to support Windows based on current source code URL. But it seems that hiredis currently only supports static build on Windows. Because the source code has no dllexport.

@NancyLi1013
Copy link
Contributor Author

/azp run

1 similar comment
@JackBoosY
Copy link
Contributor

/azp run

@JackBoosY JackBoosY marked this pull request as ready for review November 20, 2019 06:17
@dan-shaw dan-shaw merged commit fb26fc5 into microsoft:master Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants