diff options
| author | Griffin Downs <35574547+grdowns@users.noreply.github.com> | 2019-06-09 17:21:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-09 17:21:07 -0700 |
| commit | 7b0df74ced4e72841d29f89ea021cc215129dcbc (patch) | |
| tree | 0219ffb189fcf8966c1d2808e63cee7995b9513e | |
| parent | a6960ed0b168a06414fce1e4063772134f319f3d (diff) | |
| parent | 895660f35c269028634cfab814d623ea7ef6bf7e (diff) | |
| download | vcpkg-7b0df74ced4e72841d29f89ea021cc215129dcbc.tar.gz vcpkg-7b0df74ced4e72841d29f89ea021cc215129dcbc.zip | |
Merge pull request #6818 from Pospelove/mongo-cxx-driver-polyfill
[mongo-cxx-driver] Add options for C++17 polyfill selection
| -rw-r--r-- | ports/mongo-cxx-driver/CONTROL | 12 | ||||
| -rw-r--r-- | ports/mongo-cxx-driver/portfile.cmake | 17 |
2 files changed, 29 insertions, 0 deletions
diff --git a/ports/mongo-cxx-driver/CONTROL b/ports/mongo-cxx-driver/CONTROL index 4d89b54c0..f143f422f 100644 --- a/ports/mongo-cxx-driver/CONTROL +++ b/ports/mongo-cxx-driver/CONTROL @@ -2,3 +2,15 @@ Source: mongo-cxx-driver Version: 3.2.0-2 Build-Depends: libbson, mongo-c-driver, boost-smart-ptr, boost-optional, boost-utility Description: MongoDB C++ Driver. + +Feature: mnmlstc +Description: Use MNMLSTC/core C++17 polyfill. + +Feature: system-mnmlstc +Description: Use an available version of MNMLSTC on your system as C++17 polyfill. + +Feature: boost +Description: Use Boost C++17 polyfill. The only option under MSVC. + +Feature: std-experimental +Description: Use optional and string_view from std::experimental. diff --git a/ports/mongo-cxx-driver/portfile.cmake b/ports/mongo-cxx-driver/portfile.cmake index 69ac66b04..e94902bcc 100644 --- a/ports/mongo-cxx-driver/portfile.cmake +++ b/ports/mongo-cxx-driver/portfile.cmake @@ -17,6 +17,22 @@ vcpkg_from_github( disable-c2338-mongo-cxx-driver.patch
)
+if ("mnmlstc" IN_LIST FEATURES)
+ set(BSONCXX_POLY MNMLSTC)
+elseif ("system-mnmlstc" IN_LIST FEATURES)
+ set(BSONCXX_POLY SYSTEM_MNMLSTC)
+elseif ("boost" IN_LIST FEATURES)
+ set(BSONCXX_POLY BOOST)
+elseif("std-experimental" IN_LIST FEATURES)
+ set(BSONCXX_POLY STD_EXPERIMENTAL)
+else()
+ if (WIN32)
+ set(BSONCXX_POLY BOOST)
+ else()
+ set(BSONCXX_POLY MNMLSTC)
+ endif()
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
@@ -25,6 +41,7 @@ vcpkg_configure_cmake( -DLIBMONGOC_DIR=${CURRENT_INSTALLED_DIR}
-DMONGOCXX_HEADER_INSTALL_DIR=include
-DBSONCXX_HEADER_INSTALL_DIR=include
+ -DBSONCXX_POLY_USE_${BSONCXX_POLY}=1
)
vcpkg_install_cmake()
|
