From ec5d2bb91bf175527c346bc03dc9442633024001 Mon Sep 17 00:00:00 2001 From: Sergey Avseyev Date: Mon, 23 Sep 2024 14:05:05 -0700 Subject: [PATCH] Update core to 1.0.2 --- config.w32 | 3 +++ src/CMakeLists.txt | 17 ++++++++++++----- src/deps/couchbase-cxx-client | 2 +- src/wrapper/connection_handle.cxx | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/config.w32 b/config.w32 index e4394a1c..2543bf9d 100644 --- a/config.w32 +++ b/config.w32 @@ -73,6 +73,9 @@ if (PHP_COUCHBASE != "no") { ' -D COUCHBASE_PHP_INCLUDES="' + COUCHBASE_PHP_INCLUDES + '"' + ' -D COUCHBASE_PHP_LIB="' + COUCHBASE_PHP_LIB + '"' + ' -D COUCHBASE_PHP_LIBDIR="' + get_define("BUILD_DIR") + '"' + + ' -D COUCHBASE_CXX_CLIENT_INSTALL=OFF ' + + ' -D COUCHBASE_CXX_CLIENT_BUILD_SHARED=OFF ' + + ' -D COUCHBASE_CXX_CLIENT_BUILD_STATIC=OON ' + ' -D COUCHBASE_CXX_CLIENT_BUILD_EXAMPLES=OFF ' + ' -D COUCHBASE_CXX_CLIENT_BUILD_TOOLS=OFF ' + ' -D COUCHBASE_CXX_CLIENT_BUILD_DOCS=OFF ' + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index daee5b86..83e5442f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -23,12 +23,16 @@ set(COUCHBASE_CXX_CLIENT_BUILD_TESTS set(COUCHBASE_CXX_CLIENT_BUILD_TOOLS OFF CACHE BOOL "" FORCE) +set(COUCHBASE_CXX_CLIENT_BUILD_STATIC + ON + CACHE BOOL "" FORCE) set(COUCHBASE_CXX_CLIENT_BUILD_SHARED OFF CACHE BOOL "" FORCE) set(COUCHBASE_CXX_CLIENT_STATIC_BORINGSSL ON CACHE BOOL "" FORCE) +set(COUCHBASE_CXX_CLIENT_INSTALL OFF CACHE BOOL "" FORCE) set(CMAKE_POSITION_INDEPENDENT_CODE ON) add_subdirectory(deps/couchbase-cxx-client) @@ -83,16 +87,19 @@ endif() if(MSVC) set_target_properties(couchbase PROPERTIES PREFIX "php_" IMPORT_PREFIX "php_") endif() -target_include_directories(couchbase PRIVATE ${PROJECT_BINARY_DIR}/generated) -target_include_directories(couchbase PRIVATE ${PROJECT_SOURCE_DIR}/deps/couchbase-cxx-client) -target_include_directories(couchbase PRIVATE ${PHP_INCLUDE_DIRS}) +target_include_directories(couchbase SYSTEM PRIVATE + ${PHP_INCLUDE_DIRS} + ${PROJECT_BINARY_DIR}/generated + ${PROJECT_SOURCE_DIR}/deps/couchbase-cxx-client + ${PROJECT_SOURCE_DIR}/deps/couchbase-cxx-client/third_party/cxx_function + ${PROJECT_SOURCE_DIR}/deps/couchbase-cxx-client/third_party/expected/include) target_compile_definitions(couchbase PRIVATE ZEND_COMPILE_DL_EXT=1) -set_target_properties(couchbase_cxx_client PROPERTIES C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden) +set_target_properties(couchbase_cxx_client_static PROPERTIES C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden) target_link_libraries( couchbase PRIVATE project_options project_warnings - couchbase_cxx_client + couchbase_cxx_client_static spdlog::spdlog taocpp::json fmt::fmt diff --git a/src/deps/couchbase-cxx-client b/src/deps/couchbase-cxx-client index 58d46d79..51f4775e 160000 --- a/src/deps/couchbase-cxx-client +++ b/src/deps/couchbase-cxx-client @@ -1 +1 @@ -Subproject commit 58d46d79578c8e4ca88e934c3ae8982abaa89ff9 +Subproject commit 51f4775e56fb9ba975f92d7791d4d9feca336f05 diff --git a/src/wrapper/connection_handle.cxx b/src/wrapper/connection_handle.cxx index 40943054..f9a33d8f 100644 --- a/src/wrapper/connection_handle.cxx +++ b/src/wrapper/connection_handle.cxx @@ -44,6 +44,7 @@ #include #include +#include #include #include #include @@ -6015,7 +6016,6 @@ apply_options(couchbase::cluster_options& cluster_options, zval* options) options::assign_string("network", key, value, [&](auto v) { cluster_options.network().preferred_network(v); - cluster_options.behavior().network(v); }); options::assign_string("trustCertificate", key, value, [&](auto v) {