Skip to content

Commit

Permalink
Update core to 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
avsej committed Sep 23, 2024
1 parent a90168e commit 676e75d
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
7 changes: 3 additions & 4 deletions bin/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def which(name, extra_locations = [])
output_dir = Dir.mktmpdir("cxx_output_")
output_tarball = File.join(output_dir, "cache.tar")
cpm_cache_dir = Dir.mktmpdir("cxx_cache_")
cxx_core_build_dir = Dir.mktmpdir("cxx_build_")
cxx_core_build_dir = Dir.mktmpdir("cxx_build_")
cc = ENV.fetch("CB_CC", nil)
cxx = ENV.fetch("CB_CXX", nil)
ar = ENV.fetch("CB_AR", nil)
Expand Down Expand Up @@ -90,6 +90,7 @@ def which(name, extra_locations = [])
"asio/*/asio/COPYING",
"asio/*/asio/asio/include/*.hpp",
"asio/*/asio/asio/include/asio/**/*.[hi]pp",
"asio/*/asio/asio/src/*.cpp",
"boringssl/*/boringssl/**/*.{cc,h,c,asm,S}",
"boringssl/*/boringssl/**/CMakeLists.txt",
"boringssl/*/boringssl/LICENSE",
Expand Down Expand Up @@ -292,7 +293,5 @@ def traverse(document, reader, writer)
main_header = File.read(File.join(project_root, "src/php_couchbase.hxx"))
sdk_version = main_header[/PHP_COUCHBASE_VERSION "(\d+\.\d+\.\d+)"/, 1]
snapshot = ENV.fetch("BUILD_NUMBER", 0).to_i
if snapshot > 0
FileUtils.mv("couchbase-#{sdk_version}.tgz", "couchbase-#{sdk_version}.#{snapshot}.tgz", verbose: true)
end
FileUtils.mv("couchbase-#{sdk_version}.tgz", "couchbase-#{sdk_version}.#{snapshot}.tgz", verbose: true) if snapshot > 0
end
3 changes: 3 additions & 0 deletions config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -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 ' +
Expand Down
17 changes: 12 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/deps/couchbase-cxx-client
2 changes: 1 addition & 1 deletion src/wrapper/connection_handle.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include <core/utils/json.hxx>

#include <couchbase/cluster.hxx>
#include <couchbase/codec/tao_json_serializer.hxx>
#include <couchbase/collection.hxx>
#include <couchbase/mutation_token.hxx>
#include <couchbase/retry_reason.hxx>
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 676e75d

Please sign in to comment.