mirror of
https://github.com/hanzoai/datastore.git
synced 2026-10-30 14:48:37 +00:00
Merge upstream/changelog-26.6 (9593 commits) into our debranded fork. - 190 conflicts resolved: 24 delete-side kept-removed (grpc/arrowflight/gcloud), submodules+version→26.6, contrib/CMakeLists keeps zap + new libpng, drops capnproto (zap provides kj), Server.cpp/CMakeLists re-apply the ZAP wiring + gRPC/arrowflight/gcloud removal. - Full-tree debrand re-swept over the new 26.6 code (uniform Datastore naming; Azure fork Clickhouse* symbols preserved). 0 clickhouse in product src/programs/CMakeLists. - Version now 26.6.1.1. gRPC/google-cloud/chdig stay removed; ZAP remains the transport.
423 lines
23 KiB
CMake
423 lines
23 KiB
CMake
option(USE_MONGODB "Enable MongoDB support" ${ENABLE_LIBRARIES})
|
|
|
|
if(NOT USE_MONGODB)
|
|
message(STATUS "Not using mongocxx and bsoncxx")
|
|
return()
|
|
endif()
|
|
|
|
set(BSONCXX_SOURCES_DIR "${Datastore_SOURCE_DIR}/contrib/mongo-cxx-driver/src/bsoncxx")
|
|
set(BSONCXX_BINARY_DIR "${Datastore_BINARY_DIR}/contrib/mongo-cxx-driver/src/bsoncxx")
|
|
|
|
include(${Datastore_SOURCE_DIR}/cmake/generate_export_header.cmake)
|
|
|
|
set(BSONCXX_SOURCES
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/private/itoa.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/private/version.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/array/value.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/array/view.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/config/config.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/config/export.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/config/version.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/decimal128.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/detail/postlude.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/detail/prelude.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/document/value.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/document/view.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/element/view.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/exception.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/oid.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/types/id.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/types/value.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/types/view.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/array/element.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/array/value.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/array/view.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/builder/core.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/config/config.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/config/export.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/config/version.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/decimal128.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/document/element.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/document/value.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/document/view.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/exception/error_code.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/exception/exception.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/json.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/oid.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/string/view_or_value.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/types.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/value.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/validate.cpp
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/vector.cpp
|
|
)
|
|
|
|
set(BSONCXX_POLY_USE_IMPLS ON)
|
|
|
|
configure_file(
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/config/config.hpp.in
|
|
${BSONCXX_BINARY_DIR}/lib/bsoncxx/v1/config/config.hpp
|
|
)
|
|
configure_file(
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/config/version.hpp.in
|
|
${BSONCXX_BINARY_DIR}/lib/bsoncxx/v1/config/version.hpp
|
|
)
|
|
configure_file(
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/private/config/config.hh.in
|
|
${BSONCXX_BINARY_DIR}/lib/bsoncxx/private/config/config.hh
|
|
)
|
|
|
|
# Aggregate forward-declaration headers. Upstream generates these by globbing
|
|
# all `*-fwd.hpp` files and concatenating them into a single `fwd.hpp` umbrella.
|
|
file(GLOB_RECURSE bsoncxx_v_noabi_fwd_headers
|
|
RELATIVE "${BSONCXX_SOURCES_DIR}/include/bsoncxx/v_noabi"
|
|
"${BSONCXX_SOURCES_DIR}/include/bsoncxx/v_noabi/bsoncxx/*-fwd.hpp"
|
|
)
|
|
list(SORT bsoncxx_v_noabi_fwd_headers)
|
|
set(BSONCXX_V_NOABI_FWD_INCLUDES "")
|
|
foreach(header IN LISTS bsoncxx_v_noabi_fwd_headers)
|
|
string(APPEND BSONCXX_V_NOABI_FWD_INCLUDES "#include <${header}> // IWYU pragma: export\n")
|
|
endforeach()
|
|
string(STRIP "${BSONCXX_V_NOABI_FWD_INCLUDES}" BSONCXX_V_NOABI_FWD_INCLUDES)
|
|
configure_file(
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi/bsoncxx/fwd.hpp.in
|
|
${BSONCXX_BINARY_DIR}/lib/bsoncxx/v_noabi/bsoncxx/fwd.hpp
|
|
@ONLY
|
|
)
|
|
|
|
file(GLOB_RECURSE bsoncxx_v1_fwd_headers
|
|
RELATIVE "${BSONCXX_SOURCES_DIR}/include"
|
|
"${BSONCXX_SOURCES_DIR}/include/bsoncxx/v1/*-fwd.hpp"
|
|
)
|
|
list(SORT bsoncxx_v1_fwd_headers)
|
|
set(BSONCXX_V1_FWD_INCLUDES "")
|
|
foreach(header IN LISTS bsoncxx_v1_fwd_headers)
|
|
string(APPEND BSONCXX_V1_FWD_INCLUDES "#include <${header}> // IWYU pragma: export\n")
|
|
endforeach()
|
|
string(STRIP "${BSONCXX_V1_FWD_INCLUDES}" BSONCXX_V1_FWD_INCLUDES)
|
|
configure_file(
|
|
${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v1/fwd.hpp.in
|
|
${BSONCXX_BINARY_DIR}/lib/bsoncxx/v1/fwd.hpp
|
|
@ONLY
|
|
)
|
|
|
|
add_library(_bsoncxx ${BSONCXX_SOURCES})
|
|
add_library(ch_contrib::bsoncxx ALIAS _bsoncxx)
|
|
target_include_directories(_bsoncxx SYSTEM PUBLIC
|
|
"${BSONCXX_SOURCES_DIR}/include"
|
|
"${BSONCXX_SOURCES_DIR}/include/bsoncxx/v_noabi"
|
|
"${BSONCXX_SOURCES_DIR}/lib"
|
|
"${BSONCXX_SOURCES_DIR}/lib/bsoncxx/v_noabi"
|
|
|
|
"${BSONCXX_BINARY_DIR}/lib"
|
|
"${BSONCXX_BINARY_DIR}/lib/bsoncxx/v_noabi"
|
|
)
|
|
target_link_libraries(_bsoncxx ch_contrib::libbson)
|
|
|
|
# Taken from mongo-cxx-driver/src/bsoncxx/CMakeLists.txt
|
|
set(bsoncxx_export_header_custom_content "")
|
|
string(APPEND bsoncxx_export_header_custom_content [[
|
|
|
|
#undef BSONCXX_DEPRECATED_EXPORT
|
|
#undef BSONCXX_DEPRECATED_NO_EXPORT
|
|
|
|
#if defined(_MSC_VER)
|
|
#define BSONCXX_ABI_CDECL __cdecl
|
|
#else
|
|
#define BSONCXX_ABI_CDECL
|
|
#endif
|
|
|
|
#define BSONCXX_ABI_EXPORT_CDECL(...) BSONCXX_ABI_EXPORT __VA_ARGS__ BSONCXX_ABI_CDECL
|
|
|
|
]]
|
|
)
|
|
datastore_generate_export_header(_bsoncxx
|
|
BASE_NAME BSONCXX_ABI
|
|
EXPORT_MACRO_NAME BSONCXX_ABI_EXPORT
|
|
DEPRECATED_MACRO_NAME BSONCXX_DEPRECATED
|
|
EXPORT_FILE_NAME ${BSONCXX_BINARY_DIR}/lib/bsoncxx/v_noabi/bsoncxx/v1/config/export.hpp
|
|
STATIC_DEFINE BSONCXX_STATIC
|
|
CUSTOM_CONTENT_FROM_VARIABLE bsoncxx_export_header_custom_content
|
|
)
|
|
|
|
|
|
set(MONGOCXX_SOURCES_DIR "${Datastore_SOURCE_DIR}/contrib/mongo-cxx-driver/src/mongocxx")
|
|
set(MONGOCXX_BINARY_DIR "${Datastore_BINARY_DIR}/contrib/mongo-cxx-driver/src/mongocxx")
|
|
set(MONGOCXX_SOURCES
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/private/mongoc.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/private/scoped_bson.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/aggregate_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/apm.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/auto_encryption_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/bulk_write.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/change_stream.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/client.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/client_encryption.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/client_session.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/collection.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/config/config.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/config/export.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/config/version.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/count_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/cursor.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/data_key_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/database.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/delete_many_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/delete_many_result.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/delete_one_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/delete_one_result.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/detail/postlude.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/detail/prelude.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/distinct_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/encrypt_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/estimated_document_count_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/events/command_failed.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/events/command_started.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/events/command_succeeded.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/events/server_closed.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/events/server_description.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/events/server_description_changed.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/events/server_heartbeat_failed.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/events/server_heartbeat_started.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/events/server_heartbeat_succeeded.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/events/server_opening.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/events/topology_closed.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/events/topology_description.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/events/topology_description_changed.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/events/topology_opening.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/exception.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/find_one_and_delete_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/find_one_and_replace_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/find_one_and_update_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/find_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/gridfs/bucket.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/gridfs/downloader.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/gridfs/upload_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/gridfs/upload_result.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/gridfs/uploader.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/hint.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/indexes.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/insert_many_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/insert_many_result.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/insert_one_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/insert_one_result.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/instance.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/logger.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/pipeline.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/pool.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/range_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/read_concern.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/read_preference.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/replace_one_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/replace_one_result.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/return_document.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/rewrap_many_datakey_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/rewrap_many_datakey_result.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/search_indexes.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/server_api.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/server_error.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/text_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/tls.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/transaction_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/update_many_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/update_many_result.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/update_one_options.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/update_one_result.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/uri.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/write_concern.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/bulk_write.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/change_stream.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/client.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/client_encryption.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/client_session.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/collection.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/config/config.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/config/export.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/config/version.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/conversions.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/cursor.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/database.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/events/command_failed_event.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/events/command_started_event.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/events/command_succeeded_event.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/events/heartbeat_failed_event.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/events/heartbeat_started_event.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/events/heartbeat_succeeded_event.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/events/server_changed_event.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/events/server_closed_event.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/events/server_description.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/events/server_opening_event.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/events/topology_changed_event.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/events/topology_closed_event.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/events/topology_description.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/events/topology_opening_event.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/exception/authentication_exception.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/exception/bulk_write_exception.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/exception/error_code.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/exception/exception.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/exception/gridfs_exception.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/exception/logic_error.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/exception/operation_exception.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/exception/query_exception.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/exception/server_error_code.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/exception/write_exception.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/gridfs/bucket.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/gridfs/downloader.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/gridfs/uploader.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/hint.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/index_model.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/index_view.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/instance.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/logger.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/model/delete_many.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/model/delete_one.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/model/insert_one.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/model/replace_one.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/model/update_many.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/model/update_one.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/model/write.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/aggregate.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/apm.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/auto_encryption.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/bulk_write.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/change_stream.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/client.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/client_encryption.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/client_session.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/count.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/data_key.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/delete.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/distinct.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/encrypt.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/estimated_document_count.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/find.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/find_one_and_delete.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/find_one_and_replace.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/find_one_and_update.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/gridfs/bucket.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/gridfs/upload.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/index.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/index_view.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/insert.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/pool.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/range.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/replace.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/rewrap_many_datakey.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/server_api.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/tls.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/transaction.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/options/update.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/pipeline.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/pool.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/read_concern.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/read_preference.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/result/bulk_write.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/result/delete.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/result/gridfs/upload.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/result/insert_many.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/result/insert_one.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/result/replace_one.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/result/rewrap_many_datakey.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/result/update.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/search_index_model.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/search_index_view.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/uri.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/validation_criteria.cpp
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/write_concern.cpp
|
|
)
|
|
|
|
set(MONGOCXX_COMPILER_VERSION "${CMAKE_CXX_COMPILER_VERSION}")
|
|
set(MONGOCXX_COMPILER_ID "${CMAKE_CXX_COMPILER_ID}")
|
|
|
|
if(ENABLE_SSL)
|
|
set(MONGOCXX_ENABLE_SSL 1)
|
|
endif()
|
|
|
|
set(BSONCXX_STATIC 1)
|
|
set(MONGOCXX_STATIC 1)
|
|
|
|
configure_file(
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/config/config.hpp.in
|
|
${MONGOCXX_BINARY_DIR}/lib/mongocxx/v1/config/config.hpp
|
|
)
|
|
configure_file(
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/config/version.hpp.in
|
|
${MONGOCXX_BINARY_DIR}/lib/mongocxx/v1/config/version.hpp
|
|
)
|
|
configure_file(
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/private/config/config.hh.in
|
|
${MONGOCXX_BINARY_DIR}/lib/mongocxx/private/config/config.hh
|
|
)
|
|
|
|
# Aggregate forward-declaration headers, mirroring upstream's umbrella `fwd.hpp`.
|
|
file(GLOB_RECURSE mongocxx_v_noabi_fwd_headers
|
|
RELATIVE "${MONGOCXX_SOURCES_DIR}/include/mongocxx/v_noabi"
|
|
"${MONGOCXX_SOURCES_DIR}/include/mongocxx/v_noabi/mongocxx/*-fwd.hpp"
|
|
)
|
|
list(SORT mongocxx_v_noabi_fwd_headers)
|
|
set(MONGOCXX_V_NOABI_FWD_INCLUDES "")
|
|
foreach(header IN LISTS mongocxx_v_noabi_fwd_headers)
|
|
string(APPEND MONGOCXX_V_NOABI_FWD_INCLUDES "#include <${header}> // IWYU pragma: export\n")
|
|
endforeach()
|
|
string(STRIP "${MONGOCXX_V_NOABI_FWD_INCLUDES}" MONGOCXX_V_NOABI_FWD_INCLUDES)
|
|
configure_file(
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi/mongocxx/fwd.hpp.in
|
|
${MONGOCXX_BINARY_DIR}/lib/mongocxx/v_noabi/mongocxx/fwd.hpp
|
|
@ONLY
|
|
)
|
|
|
|
file(GLOB_RECURSE mongocxx_v1_fwd_headers
|
|
RELATIVE "${MONGOCXX_SOURCES_DIR}/include"
|
|
"${MONGOCXX_SOURCES_DIR}/include/mongocxx/v1/*-fwd.hpp"
|
|
)
|
|
list(SORT mongocxx_v1_fwd_headers)
|
|
set(MONGOCXX_V1_FWD_INCLUDES "")
|
|
foreach(header IN LISTS mongocxx_v1_fwd_headers)
|
|
string(APPEND MONGOCXX_V1_FWD_INCLUDES "#include <${header}> // IWYU pragma: export\n")
|
|
endforeach()
|
|
string(STRIP "${MONGOCXX_V1_FWD_INCLUDES}" MONGOCXX_V1_FWD_INCLUDES)
|
|
configure_file(
|
|
${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v1/fwd.hpp.in
|
|
${MONGOCXX_BINARY_DIR}/lib/mongocxx/v1/fwd.hpp
|
|
@ONLY
|
|
)
|
|
|
|
add_library(_mongocxx ${MONGOCXX_SOURCES})
|
|
add_library(ch_contrib::mongocxx ALIAS _mongocxx)
|
|
target_include_directories(_mongocxx SYSTEM PUBLIC
|
|
"${MONGOCXX_SOURCES_DIR}/include"
|
|
"${MONGOCXX_SOURCES_DIR}/include/mongocxx/v_noabi"
|
|
"${MONGOCXX_SOURCES_DIR}/lib"
|
|
"${MONGOCXX_SOURCES_DIR}/lib/mongocxx/v_noabi"
|
|
|
|
"${MONGOCXX_BINARY_DIR}/lib"
|
|
"${MONGOCXX_BINARY_DIR}/lib/mongocxx/v_noabi"
|
|
)
|
|
target_link_libraries(_mongocxx ch_contrib::bsoncxx ch_contrib::libmongoc)
|
|
|
|
# Taken from mongo-cxx-driver/src/mongocxx/CMakeLists.txt
|
|
set(mongocxx_export_header_custom_content "")
|
|
string(APPEND mongocxx_export_header_custom_content [[
|
|
|
|
#undef MONGOCXX_DEPRECATED_EXPORT
|
|
#undef MONGOCXX_DEPRECATED_NO_EXPORT
|
|
|
|
#if defined(_MSC_VER)
|
|
#define MONGOCXX_ABI_CDECL __cdecl
|
|
#else
|
|
#define MONGOCXX_ABI_CDECL
|
|
#endif
|
|
|
|
#define MONGOCXX_ABI_EXPORT_CDECL(...) MONGOCXX_ABI_EXPORT __VA_ARGS__ MONGOCXX_ABI_CDECL
|
|
|
|
]]
|
|
)
|
|
datastore_generate_export_header(_mongocxx
|
|
BASE_NAME MONGOCXX_ABI
|
|
EXPORT_MACRO_NAME MONGOCXX_ABI_EXPORT
|
|
DEPRECATED_MACRO_NAME MONGOCXX_DEPRECATED
|
|
EXPORT_FILE_NAME ${MONGOCXX_BINARY_DIR}/lib/mongocxx/v_noabi/mongocxx/v1/config/export.hpp
|
|
STATIC_DEFINE MONGOCXX_STATIC
|
|
CUSTOM_CONTENT_FROM_VARIABLE mongocxx_export_header_custom_content
|
|
)
|