foundationdb/fdbclient/CMakeLists.txt

294 lines
8.0 KiB
CMake
Raw Normal View History

2018-05-04 06:48:10 +08:00
set(FDBCLIENT_SRCS
ActorLineageProfiler.h
ActorLineageProfiler.cpp
2022-06-24 08:05:36 +08:00
AnnotateActor.h
AnnotateActor.cpp
AsyncFileS3BlobStore.actor.cpp
AsyncFileS3BlobStore.actor.h
AsyncTaskThread.actor.cpp
AsyncTaskThread.h
2018-05-04 06:48:10 +08:00
Atomic.h
AutoPublicAddress.cpp
BackupAgent.actor.h
2018-05-04 06:48:10 +08:00
BackupAgentBase.actor.cpp
BackupContainer.actor.cpp
BackupContainer.h
BackupContainerFileSystem.actor.cpp
BackupContainerFileSystem.h
BackupContainerLocalDirectory.actor.cpp
BackupContainerLocalDirectory.h
BackupContainerS3BlobStore.actor.cpp
BackupContainerS3BlobStore.h
BlobConnectionProvider.h
BlobConnectionProvider.cpp
BlobWorkerInterface.h
BlobGranuleReader.actor.cpp
BlobGranuleReader.actor.h
BlobGranuleCommon.h
BlobGranuleFiles.cpp
BlobGranuleFiles.h
BlobMetadataUtils.h
2021-09-04 03:05:35 +08:00
BlobWorkerCommon.h
ClientBooleanParams.cpp
ClientBooleanParams.h
2021-06-10 11:50:00 +08:00
ClientKnobCollection.cpp
ClientKnobCollection.h
ClientKnobs.cpp
ClientKnobs.h
2018-05-04 06:48:10 +08:00
ClientLogEvents.h
ClientVersion.h
2018-05-04 06:48:10 +08:00
ClientWorkerInterface.h
ClusterConnectionFile.actor.cpp
ClusterConnectionFile.h
ClusterConnectionKey.actor.cpp
ClusterConnectionKey.actor.h
ClusterConnectionMemoryRecord.actor.cpp
ClusterConnectionMemoryRecord.h
2018-05-04 06:48:10 +08:00
ClusterInterface.h
CommitProxyInterface.h
2018-05-04 06:48:10 +08:00
CommitTransaction.h
ConfigKnobs.cpp
2021-04-25 08:22:58 +08:00
ConfigKnobs.h
ConfigTransactionInterface.cpp
ConfigTransactionInterface.h
2022-02-04 07:33:58 +08:00
ConvertUTF.h
2018-05-04 06:48:10 +08:00
CoordinationInterface.h
DatabaseBackupAgent.actor.cpp
2018-12-14 06:53:19 +08:00
DatabaseConfiguration.cpp
DatabaseConfiguration.h
2018-05-04 06:48:10 +08:00
DatabaseContext.h
EventTypes.actor.h
FDBOptions.h
FDBTypes.cpp
2018-05-04 06:48:10 +08:00
FDBTypes.h
FluentDSampleIngestor.cpp
2018-05-04 06:48:10 +08:00
FileBackupAgent.actor.cpp
GenericManagementAPI.actor.h
GlobalConfig.h
GlobalConfig.actor.h
GlobalConfig.actor.cpp
2020-07-15 15:37:41 +08:00
GrvProxyInterface.h
2022-06-24 07:15:49 +08:00
HTTP.h
HTTP.actor.cpp
HighContentionPrefixAllocator.actor.h
2018-05-04 06:48:10 +08:00
IClientApi.h
IConfigTransaction.cpp
IConfigTransaction.h
ISingleThreadTransaction.cpp
2021-04-30 13:31:16 +08:00
ISingleThreadTransaction.h
2022-06-24 08:05:36 +08:00
JSONDoc.h
2018-12-14 07:52:27 +08:00
JsonBuilder.cpp
JsonBuilder.h
2018-05-04 06:48:10 +08:00
KeyBackedTypes.h
KeyRangeMap.actor.cpp
KeyRangeMap.h
Knobs.h
2021-06-03 14:40:52 +08:00
IKnobCollection.cpp
IKnobCollection.h
LocalClientAPI.cpp
LocalClientAPI.h
2018-05-04 06:48:10 +08:00
ManagementAPI.actor.cpp
ManagementAPI.actor.h
2018-05-04 06:48:10 +08:00
MonitorLeader.actor.cpp
MonitorLeader.h
MultiVersionAssignmentVars.h
MultiVersionTransaction.actor.cpp
MultiVersionTransaction.h
MutationList.h
MutationLogReader.actor.cpp
MutationLogReader.actor.h
NameLineage.h
NameLineage.cpp
2018-05-04 06:48:10 +08:00
NativeAPI.actor.cpp
NativeAPI.actor.h
2018-05-04 06:48:10 +08:00
Notified.h
ParallelStream.actor.cpp
ParallelStream.actor.h
PaxosConfigTransaction.actor.cpp
PaxosConfigTransaction.h
PImpl.h
2022-06-24 08:05:36 +08:00
ProcessInterface.h
SimpleConfigTransaction.actor.cpp
SpecialKeySpace.actor.cpp
SpecialKeySpace.actor.h
2022-06-24 07:15:49 +08:00
RESTClient.h
RESTClient.actor.cpp
RESTUtils.h
RESTUtils.actor.cpp
2018-05-04 06:48:10 +08:00
ReadYourWrites.actor.cpp
ReadYourWrites.h
RestoreInterface.cpp
RestoreInterface.h
2018-05-04 06:48:10 +08:00
RunTransaction.actor.h
RYWIterator.cpp
RYWIterator.h
2022-06-24 08:05:36 +08:00
S3BlobStore.h
S3BlobStore.actor.cpp
2018-12-14 07:52:27 +08:00
Schemas.cpp
Schemas.h
2021-06-10 11:50:00 +08:00
ServerKnobCollection.cpp
ServerKnobCollection.h
2021-06-01 18:12:47 +08:00
ServerKnobs.cpp
ServerKnobs.h
SimpleConfigTransaction.h
2022-02-04 07:33:58 +08:00
SimpleIni.h
2018-05-04 06:48:10 +08:00
SnapshotCache.h
SpecialKeySpace.actor.cpp
SpecialKeySpace.actor.h
2018-05-04 06:48:10 +08:00
Status.h
StatusClient.actor.cpp
StatusClient.h
2021-03-06 03:28:15 +08:00
StorageServerInterface.cpp
2018-05-04 06:48:10 +08:00
StorageServerInterface.h
StorageCheckpoint.h
2018-05-04 06:48:10 +08:00
Subspace.cpp
Subspace.h
2021-05-21 02:16:31 +08:00
StackLineage.h
StackLineage.cpp
2018-05-04 06:48:10 +08:00
SystemData.cpp
SystemData.h
TagThrottle.actor.cpp
TagThrottle.actor.h
2018-05-04 06:48:10 +08:00
TaskBucket.actor.cpp
TaskBucket.h
2022-02-24 00:06:39 +08:00
Tenant.cpp
Tenant.h
2021-06-10 11:50:00 +08:00
TestKnobCollection.cpp
TestKnobCollection.h
ThreadSafeTransaction.cpp
2018-05-04 06:48:10 +08:00
ThreadSafeTransaction.h
2022-06-24 06:35:19 +08:00
Tracing.h
Tracing.actor.cpp
2022-06-24 08:05:36 +08:00
TransactionLineage.h
2018-05-04 06:48:10 +08:00
Tuple.cpp
Tuple.h
VersionedMap.actor.h
VersionedMap.h
VersionedMap.cpp
Versionstamp.cpp
Versionstamp.h
2021-06-30 02:58:59 +08:00
VersionVector.h
VersionVector.cpp
2018-05-04 06:48:10 +08:00
WriteMap.h
WriteMap.cpp
2018-05-04 06:48:10 +08:00
json_spirit/json_spirit_error_position.h
json_spirit/json_spirit_reader_template.h
json_spirit/json_spirit_value.h
json_spirit/json_spirit_writer_options.h
json_spirit/json_spirit_writer_template.h
2022-06-24 08:05:36 +08:00
libb64/encode.h
libb64/decode.h
libb64/cdecode.h
2018-12-14 06:53:19 +08:00
libb64/cdecode.c
2022-06-24 08:05:36 +08:00
libb64/cencode.h
2018-12-14 06:53:19 +08:00
libb64/cencode.c
2022-06-24 08:05:36 +08:00
md5/md5.h
2018-12-14 06:53:19 +08:00
md5/md5.c
2022-06-24 08:05:36 +08:00
rapidxml/rapidxml.hpp
rapidxml/rapidxml_iterators.hpp
rapidxml/rapidxml_print.hpp
rapidxml/rapidxml_utils.hpp
sha1/SHA1.h
sha1/SHA1.cpp
zipf.c
zipf.h)
2018-05-04 06:48:10 +08:00
message(STATUS "FDB version is ${FDB_VERSION}")
message(STATUS "FDB package name is ${FDB_PACKAGE_NAME}")
set(options_srcs ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g.cpp)
2018-05-04 06:48:10 +08:00
2022-06-24 08:05:36 +08:00
make_directory(${CMAKE_CURRENT_BINARY_DIR}/include/fdbclient/)
vexillographer_compile(TARGET fdboptions_vex LANG cpp OUT ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g.h ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g.cpp)
2018-05-04 06:48:10 +08:00
2022-06-24 08:05:36 +08:00
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/include/fdbclient/FDBOptions.g.h
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g.h
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/FDBOptions.g.h ${CMAKE_CURRENT_BINARY_DIR}/include/fdbclient/FDBOptions.g.h)
vexillographer_compile(TARGET fdboptions_c LANG c OUT ${CMAKE_CURRENT_BINARY_DIR}/include/fdbclient/fdb_c_options.g.h
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/include/fdbclient/fdb_c_options.g.h)
add_custom_target(fdboptions DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/include/fdbclient/FDBOptions.g.h)
add_dependencies(fdboptions fdboptions_c)
2022-06-24 08:45:26 +08:00
################################################################################
# Build information
################################################################################
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/BuildFlags.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/fdbclient/BuildFlags.h)
set(BUILD_AZURE_BACKUP OFF CACHE BOOL "Build Azure backup client")
if(BUILD_AZURE_BACKUP)
add_compile_definitions(BUILD_AZURE_BACKUP)
set(FDBCLIENT_SRCS
${FDBCLIENT_SRCS}
BackupContainerAzureBlobStore.actor.cpp
BackupContainerAzureBlobStore.h)
configure_file(azurestorage.cmake azurestorage-download/CMakeLists.txt)
execute_process(
COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
RESULT_VARIABLE results
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/azurestorage-download
)
if(results)
message(FATAL_ERROR "Configuration step for AzureStorage has Failed. ${results}")
endif()
execute_process(
COMMAND ${CMAKE_COMMAND} --build . --config Release
RESULT_VARIABLE results
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/azurestorage-download
)
if(results)
message(FATAL_ERROR "Build step for AzureStorage has Failed. ${results}")
endif()
add_subdirectory(
${CMAKE_CURRENT_BINARY_DIR}/azurestorage-src
${CMAKE_CURRENT_BINARY_DIR}/azurestorage-build
)
endif()
if(WITH_AWS_BACKUP)
add_compile_definitions(BUILD_AWS_BACKUP)
set(FDBCLIENT_SRCS
${FDBCLIENT_SRCS}
FDBAWSCredentialsProvider.h)
include(awssdk)
endif()
add_flow_target(STATIC_LIBRARY NAME fdbclient SRCS ${FDBCLIENT_SRCS} ADDL_SRCS ${options_srcs})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/versions.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/include/fdbclient/versions.h)
add_dependencies(fdbclient fdboptions)
target_link_libraries(fdbclient PUBLIC fdbrpc msgpack)
# Create a separate fdbclient library with sampling enabled. This lets
# fdbserver retain sampling functionality in client code while disabling
# sampling for pure clients.
add_flow_target(STATIC_LIBRARY NAME fdbclient_sampling SRCS ${FDBCLIENT_SRCS} ADDL_SRCS ${options_srcs})
add_dependencies(fdbclient_sampling fdboptions)
target_link_libraries(fdbclient_sampling PUBLIC fdbrpc_sampling msgpack)
target_compile_definitions(fdbclient_sampling PRIVATE -DENABLE_SAMPLING)
if(WIN32)
add_dependencies(fdbclient_sampling_actors fdbclient_actors)
endif()
if(BUILD_AZURE_BACKUP)
target_link_libraries(fdbclient PRIVATE curl uuid azure-storage-lite)
target_link_libraries(fdbclient_sampling PRIVATE curl uuid azure-storage-lite)
endif()
if(BUILD_AWS_BACKUP)
target_link_libraries(fdbclient PUBLIC awssdk_target)
target_link_libraries(fdbclient_sampling PUBLIC awssdk_target)
endif()