diff options
| author | JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> | 2020-12-02 06:16:00 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-01 14:16:00 -0800 |
| commit | 8c3be9ef96144d0fac02eec5c42e2801ba65147a (patch) | |
| tree | 50cb43806e6e29b0f7f6de65b267aaca2121057d /ports/redis-plus-plus | |
| parent | 6b19f55def8ae1b37ff93df4cf3b95ed31b21b60 (diff) | |
| download | vcpkg-8c3be9ef96144d0fac02eec5c42e2801ba65147a.tar.gz vcpkg-8c3be9ef96144d0fac02eec5c42e2801ba65147a.zip | |
[redis-plus-plus] Add c++17 feature (#14762)
* Build using c++17 standard
* Add a feature cxx17 instead
* Update ports/redis-plus-plus/portfile.cmake
* Update ports/redis-plus-plus/CONTROL
* Modify FEATURE_OPTIONS
* Modify feature options
* Add feature Cxx17
* Modify options
* Update ports/redis-plus-plus/portfile.cmake
* Update ports/redis-plus-plus/portfile.cmake
* Update ports/redis-plus-plus/portfile.cmake
* Modify the CONTROL file
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Diffstat (limited to 'ports/redis-plus-plus')
| -rw-r--r-- | ports/redis-plus-plus/CONTROL | 6 | ||||
| -rw-r--r-- | ports/redis-plus-plus/portfile.cmake | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/ports/redis-plus-plus/CONTROL b/ports/redis-plus-plus/CONTROL index d3b824f60..90870a2b8 100644 --- a/ports/redis-plus-plus/CONTROL +++ b/ports/redis-plus-plus/CONTROL @@ -1,5 +1,9 @@ Source: redis-plus-plus Version: 1.2.1 +Port-Version: 1 Homepage: https://github.com/sewenew/redis-plus-plus Description: This is a C++ client for Redis. It's based on hiredis, and written in C++ 11. -Build-Depends: hiredis
\ No newline at end of file +Build-Depends: hiredis + +Feature: cxx17 +Description: Build redis-plus-plus with cxx 17 standard diff --git a/ports/redis-plus-plus/portfile.cmake b/ports/redis-plus-plus/portfile.cmake index fae747289..f71256db2 100644 --- a/ports/redis-plus-plus/portfile.cmake +++ b/ports/redis-plus-plus/portfile.cmake @@ -9,6 +9,12 @@ vcpkg_from_github( fix-conversion.patch ) +if("cxx17" IN_LIST FEATURES) + set(REDIS_PLUS_PLUS_CXX_STANDARD 17) +else() + set(REDIS_PLUS_PLUS_CXX_STANDARD 11) +endif() + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) set(REDIS_PLUS_PLUS_BUILD_STATIC ON) set(REDIS_PLUS_PLUS_BUILD_SHARED OFF) @@ -25,6 +31,7 @@ vcpkg_configure_cmake( -DREDIS_PLUS_PLUS_BUILD_STATIC=${REDIS_PLUS_PLUS_BUILD_STATIC} -DREDIS_PLUS_PLUS_BUILD_SHARED=${REDIS_PLUS_PLUS_BUILD_SHARED} -DREDIS_PLUS_PLUS_BUILD_TEST=OFF + -DREDIS_PLUS_PLUS_CXX_STANDARD=${REDIS_PLUS_PLUS_CXX_STANDARD} ) vcpkg_install_cmake() @@ -34,4 +41,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright )
\ No newline at end of file +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright ) |
