diff --git a/3rdParty/iresearch/core/CMakeLists.txt b/3rdParty/iresearch/core/CMakeLists.txt index e2783a91fd..0a31180cd5 100644 --- a/3rdParty/iresearch/core/CMakeLists.txt +++ b/3rdParty/iresearch/core/CMakeLists.txt @@ -523,6 +523,7 @@ target_link_libraries(${IResearch_TARGET_NAME}-static ${DL_LIBRARY} ${MSVC_ONLY_LIBRARIES} ${SIMD_LIBRARY_STATIC} + ${BT_LIBS} ) # setup CRT diff --git a/CMakeLists.txt b/CMakeLists.txt index 7834a313af..2cfba43c7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -303,11 +303,6 @@ set(ARANGO_IMPORT_FRIENDLY_STRING "arangoimport - data importer") set(ARANGOSH_FRIENDLY_STRING "arangosh - commandline client") set(ARANGO_VPACK_FRIENDLY_STRING "arangovpack - VelocyPack formatter") -# libraries -set(LIB_ARANGO arango) -set(LIB_ARANGO_GEO arango_geo) -set(LIB_ARANGO_V8 arango_v8) - # binaries set(BIN_ARANGOBENCH arangobench) set(BIN_ARANGOBACKUP arangobackup) @@ -1016,8 +1011,6 @@ endif () # IResearch # ------------------------------------------------------------------------------ -set(LIB_ARANGO_IRESEARCH arango_iresearch) - # 3rdParty exports: # # V8_VERSION diff --git a/arangod/Aql/EngineInfoContainerDBServer.cpp b/arangod/Aql/EngineInfoContainerDBServer.cpp index 484098ffd0..067dd4d832 100644 --- a/arangod/Aql/EngineInfoContainerDBServer.cpp +++ b/arangod/Aql/EngineInfoContainerDBServer.cpp @@ -36,7 +36,6 @@ #include "Aql/QueryRegistry.h" #include "Basics/Result.h" #include "Cluster/ClusterComm.h" -#include "Cluster/ClusterMethods.h" #include "Cluster/ClusterTrxMethods.h" #include "Cluster/ServerState.h" #include "Cluster/TraverserEngineRegistry.h" diff --git a/arangod/Aql/ExecutionPlan.cpp b/arangod/Aql/ExecutionPlan.cpp index a771b580ab..11b4a28582 100644 --- a/arangod/Aql/ExecutionPlan.cpp +++ b/arangod/Aql/ExecutionPlan.cpp @@ -26,7 +26,6 @@ #include "Aql/AstNode.h" #include "Aql/CollectNode.h" #include "Aql/CollectOptions.h" -#include "Aql/Collection.h" #include "Aql/ExecutionNode.h" #include "Aql/Expression.h" #include "Aql/Function.h" @@ -51,7 +50,6 @@ #include "VocBase/AccessMode.h" #include -#include #include using namespace arangodb; diff --git a/arangod/CMakeLists.txt b/arangod/CMakeLists.txt index 406c5fceb3..22513ac169 100644 --- a/arangod/CMakeLists.txt +++ b/arangod/CMakeLists.txt @@ -47,7 +47,7 @@ endif () find_package(IResearch REQUIRED) -add_library(${LIB_ARANGO_IRESEARCH} +add_library(arango_iresearch STATIC IResearch/ApplicationServerHelper.h IResearch/ApplicationServerHelper.cpp IResearch/Containers.cpp IResearch/Containers.h @@ -77,19 +77,18 @@ add_library(${LIB_ARANGO_IRESEARCH} IResearch/ExpressionFilter.cpp IResearch/ExpressionFilter.h IResearch/AqlHelper.cpp IResearch/AqlHelper.h RestHandler/RestAnalyzerHandler.cpp RestHandler/RestAnalyzerHandler.h - V8Server/v8-analyzers.cpp V8Server/v8-analyzers.h ) -target_compile_definitions(${LIB_ARANGO_IRESEARCH} +target_compile_definitions(arango_iresearch PUBLIC "$<$:IRESEARCH_DEBUG=1>" ) -target_include_directories(${LIB_ARANGO_IRESEARCH} +target_include_directories(arango_iresearch PUBLIC ${IRESEARCH_INCLUDE} ) if (USE_ENTERPRISE) - target_include_directories(${LIB_ARANGO_IRESEARCH} + target_include_directories(arango_iresearch PUBLIC "${PROJECT_SOURCE_DIR}/${ENTERPRISE_INCLUDE_DIR}" ) endif() @@ -100,13 +99,13 @@ else() set(IRESEARCH_TARGET_DEPENDENCY iresearch-static) # use static to match ArangoDB endif() -target_link_libraries(${LIB_ARANGO_IRESEARCH} +target_link_libraries(arango_iresearch ${IRESEARCH_TARGET_DEPENDENCY} s2 # needed for some includes boost_locale # required by iResearch ) -add_dependencies(${LIB_ARANGO_IRESEARCH} +add_dependencies(arango_iresearch ${IRESEARCH_TARGET_DEPENDENCY} v8_build # for ICU required by iResearch ) @@ -147,40 +146,72 @@ else () ) endif () -SET(ARANGOD_SOURCES - ${ProductVersionFiles} - ${ENTERPRISE_FILES} - Actions/ActionFeature.cpp - Actions/RestActionHandler.cpp - Actions/actions.cpp - Agency/ActiveFailoverJob.cpp - Agency/AddFollower.cpp - Agency/AgencyComm.cpp - Agency/AgencyFeature.cpp - Agency/Agent.cpp - Agency/AgentCallback.cpp - Agency/AgentConfiguration.cpp - Agency/CleanOutServer.cpp - Agency/Compactor.cpp - Agency/Constituent.cpp - Agency/FailedFollower.cpp - Agency/FailedLeader.cpp - Agency/FailedServer.cpp - Agency/GossipCallback.cpp - Agency/Inception.cpp - Agency/Job.cpp - Agency/JobContext.cpp - Agency/MoveShard.cpp - Agency/Node.cpp - Agency/RemoveFollower.cpp - Agency/ResignLeadership.cpp - Agency/RestAgencyHandler.cpp - Agency/RestAgencyPrivHandler.cpp - Agency/State.cpp - Agency/Store.cpp - Agency/StoreCallback.cpp - Agency/Supervision.cpp - Agency/v8-agency.cpp +set(LIB_ARANGO_GRAPH_SOURCES + Aql/PruneExpressionEvaluator.cpp + Cluster/ClusterEdgeCursor.cpp + Cluster/ClusterTraverser.cpp + Cluster/TraverserEngine.cpp + Cluster/TraverserEngineRegistry.cpp + Graph/AttributeWeightShortestPathFinder.cpp + Graph/BaseOptions.cpp + Graph/BreadthFirstEnumerator.cpp + Graph/ClusterTraverserCache.cpp + Graph/ConstantWeightShortestPathFinder.cpp + Graph/Graph.cpp + Graph/GraphManager.cpp + Graph/GraphOperations.cpp + Graph/KShortestPathsFinder.cpp + Graph/NeighborsEnumerator.cpp + Graph/PathEnumerator.cpp + Graph/ShortestPathFinder.cpp + Graph/ShortestPathOptions.cpp + Graph/ShortestPathResult.cpp + Graph/SingleServerEdgeCursor.cpp + Graph/SingleServerTraverser.cpp + Graph/Traverser.cpp + Graph/TraverserCache.cpp + Graph/TraverserCacheFactory.cpp + Graph/TraverserDocumentCache.cpp + Graph/TraverserOptions.cpp + InternalRestHandler/InternalRestTraverserHandler.cpp + RestHandler/RestGraphHandler.cpp + RestServer/TraverserEngineRegistryFeature.cpp +) + +set(LIB_ARANGO_PREGEL_SOURCES + Pregel/AggregatorHandler.cpp + Pregel/AlgoRegistry.cpp + Pregel/Algos/AsyncSCC.cpp + Pregel/Algos/ConnectedComponents.cpp + Pregel/Algos/DMID/DMID.cpp + Pregel/Algos/EffectiveCloseness/EffectiveCloseness.cpp + Pregel/Algos/EffectiveCloseness/HLLCounter.cpp + Pregel/Algos/HITS.cpp + Pregel/Algos/LabelPropagation.cpp + Pregel/Algos/LineRank.cpp + Pregel/Algos/PageRank.cpp + Pregel/Algos/RecoveringPageRank.cpp + Pregel/Algos/SCC.cpp + Pregel/Algos/SLPA.cpp + Pregel/Algos/SSSP.cpp + Pregel/Algos/ShortestPath.cpp + Pregel/Conductor.cpp + Pregel/GraphStore.cpp + Pregel/IncomingCache.cpp + Pregel/IndexHelpers.cpp + Pregel/OutgoingCache.cpp + Pregel/PregelFeature.cpp + Pregel/Recovery.cpp + Pregel/Utils.cpp + Pregel/Worker-templates-algorithms.cpp + Pregel/Worker-templates-native-types.cpp + Pregel/Worker.cpp + Pregel/WorkerConfig.cpp + RestHandler/RestControlPregelHandler.cpp + RestHandler/RestPregelHandler.cpp +) + +set(LIB_ARANGO_AQL_SOURCES Aql/Aggregator.cpp Aql/AllRowsFetcher.cpp Aql/AqlFunctionFeature.cpp @@ -197,8 +228,8 @@ SET(ARANGOD_SOURCES Aql/BaseExpressionContext.cpp Aql/BindParameters.cpp Aql/BlockCollector.cpp - Aql/CalculationExecutor.cpp Aql/BlocksWithClients.cpp + Aql/CalculationExecutor.cpp Aql/ClusterNodes.cpp Aql/CollectNode.cpp Aql/CollectOptions.cpp @@ -261,12 +292,9 @@ SET(ARANGOD_SOURCES Aql/OptimizerRulesReplaceFunctions.cpp Aql/OutputAqlItemRow.cpp Aql/Parser.cpp - Aql/PlanCache.cpp - Aql/PruneExpressionEvaluator.cpp Aql/Quantifier.cpp Aql/Query.cpp Aql/QueryCache.cpp - Aql/QueryCursor.cpp Aql/QueryExecutionState.cpp Aql/QueryExpressionContext.cpp Aql/QueryList.cpp @@ -290,14 +318,14 @@ SET(ARANGOD_SOURCES Aql/SingleRemoteModificationExecutor.cpp Aql/SingleRowFetcher.cpp Aql/SortCondition.cpp - Aql/SortedCollectExecutor.cpp Aql/SortExecutor.cpp Aql/SortNode.cpp - Aql/SortingGatherExecutor.cpp Aql/SortRegister.cpp + Aql/SortedCollectExecutor.cpp + Aql/SortingGatherExecutor.cpp Aql/SubqueryExecutor.cpp - Aql/TraversalExecutor.cpp Aql/TraversalConditionFinder.cpp + Aql/TraversalExecutor.cpp Aql/TraversalNode.cpp Aql/V8Executor.cpp Aql/Variable.cpp @@ -305,10 +333,69 @@ SET(ARANGOD_SOURCES Aql/WakeupQueryCallback.cpp Aql/grammar.cpp Aql/tokens.cpp - Auth/Common.cpp - Auth/TokenCache.cpp - Auth/User.cpp - Auth/UserManager.cpp +) + +set(LIB_ARANGO_VOCBASE_SOURCES + Aql/PlanCache.cpp + Aql/QueryCursor.cpp + Replication/DatabaseReplicationApplier.cpp + Utils/CollectionNameResolver.cpp + Utils/CursorRepository.cpp + Utils/DatabaseGuard.cpp + Utils/SingleCollectionTransaction.cpp + VocBase/KeyGenerator.cpp + VocBase/KeyLockInfo.cpp + VocBase/LogicalCollection.cpp + VocBase/LogicalDataSource.cpp + VocBase/LogicalView.cpp + VocBase/ManagedDocumentResult.cpp + VocBase/Methods/AqlUserFunctions.cpp + VocBase/Methods/Collections.cpp + VocBase/Methods/Databases.cpp + VocBase/Methods/Indexes.cpp + VocBase/Methods/Tasks.cpp + VocBase/Methods/Transactions.cpp + VocBase/Methods/Ttl.cpp + VocBase/Methods/Upgrade.cpp + VocBase/Methods/UpgradeTasks.cpp + VocBase/Methods/Version.cpp + VocBase/ticks.cpp + VocBase/vocbase.cpp +) + +set(LIB_ARANGO_UTILS_SOURCES + Utils/CollectionKeys.cpp + Utils/CollectionKeysRepository.cpp + Utils/ExecContext.cpp + Utils/FlushThread.cpp + Utils/OperationCursor.cpp + Utils/UrlHelper.cpp + ${ENTERPRISE_FILES} +) + +set(LIB_ARANGO_STORAGE_ENGINE_SOURCES + StorageEngine/EngineSelectorFeature.cpp + StorageEngine/HotBackup.cpp + StorageEngine/PhysicalCollection.cpp + StorageEngine/TransactionCollection.cpp + StorageEngine/TransactionState.cpp +) + +set(LIB_ARANGO_STORAGE_ENGINE_COMMON_SOURCES + StorageEngine/WalAccess.cpp +) + +set(LIB_ARANGO_INDEXES_SOURCES + GeoIndex/Index.cpp + GeoIndex/Near.cpp + Indexes/Index.cpp + Indexes/IndexFactory.cpp + Indexes/IndexIterator.cpp + Indexes/SimpleAttributeEqualityMatcher.cpp + Indexes/SortedIndexAttributeMatcher.cpp +) + +set(LIB_ARANGO_CACHE_SOURCES Cache/BucketState.cpp Cache/Cache.cpp Cache/CacheManagerFeature.cpp @@ -326,6 +413,91 @@ SET(ARANGOD_SOURCES Cache/TransactionManager.cpp Cache/TransactionalBucket.cpp Cache/TransactionalCache.cpp +) + +set(LIB_ARANGO_REPLICATION_SOURCES + Replication/DatabaseInitialSyncer.cpp + Replication/DatabaseTailingSyncer.cpp + Replication/GlobalInitialSyncer.cpp + Replication/GlobalReplicationApplier.cpp + Replication/GlobalTailingSyncer.cpp + Replication/InitialSyncer.cpp + Replication/ReplicationApplier.cpp + Replication/ReplicationApplierConfiguration.cpp + Replication/ReplicationApplierState.cpp + Replication/ReplicationClients.cpp + Replication/ReplicationFeature.cpp + Replication/Syncer.cpp + Replication/SyncerId.cpp + Replication/TailingSyncer.cpp + Replication/common-defines.cpp + Replication/utilities.cpp +) + +set(LIB_ARANGO_AGENCY_SOURCES + Agency/AgentConfiguration.cpp + Agency/ResignLeadership.cpp + Agency/StoreCallback.cpp + Agency/ActiveFailoverJob.cpp + Agency/AddFollower.cpp + Agency/AgencyComm.cpp + Agency/AgencyFeature.cpp + Agency/Agent.cpp + Agency/AgentCallback.cpp + Agency/CleanOutServer.cpp + Agency/Compactor.cpp + Agency/Constituent.cpp + Agency/FailedFollower.cpp + Agency/FailedLeader.cpp + Agency/FailedServer.cpp + Agency/GossipCallback.cpp + Agency/Inception.cpp + Agency/Job.cpp + Agency/JobContext.cpp + Agency/MoveShard.cpp + Agency/Node.cpp + Agency/RemoveFollower.cpp + Agency/RestAgencyHandler.cpp + Agency/RestAgencyPrivHandler.cpp + Agency/State.cpp + Agency/Store.cpp + Agency/Supervision.cpp + Agency/v8-agency.cpp +) + +set(LIB_ARANGO_V8SERVER_SOURCES + Transaction/V8Context.cpp + V8Server/FoxxQueuesFeature.cpp + V8Server/V8Context.cpp + V8Server/V8DealerFeature.cpp + V8Server/v8-actions.cpp + V8Server/v8-analyzers.cpp + V8Server/v8-collection-util.cpp + V8Server/v8-collection.cpp + V8Server/v8-dispatcher.cpp + V8Server/v8-general-graph.cpp + V8Server/v8-query.cpp + V8Server/v8-replication.cpp + V8Server/v8-statistics.cpp + V8Server/v8-ttl.cpp + V8Server/v8-user-functions.cpp + V8Server/v8-user-structures.cpp + V8Server/v8-users.cpp + V8Server/v8-util.cpp + V8Server/v8-views.cpp + V8Server/v8-vocbase.cpp + V8Server/v8-voccursor.cpp + V8Server/v8-vocindex.cpp +) + +set(LIB_ARANGOSERVER_SOURCES + Actions/ActionFeature.cpp + Actions/RestActionHandler.cpp + Actions/actions.cpp + Auth/Common.cpp + Auth/TokenCache.cpp + Auth/User.cpp + Auth/UserManager.cpp Cluster/Action.cpp Cluster/ActionBase.cpp Cluster/ActionDescription.cpp @@ -333,14 +505,11 @@ SET(ARANGOD_SOURCES Cluster/AgencyCallbackRegistry.cpp Cluster/ClusterCollectionCreationInfo.cpp Cluster/ClusterComm.cpp - Cluster/ClusterEdgeCursor.cpp Cluster/ClusterFeature.cpp Cluster/ClusterHelpers.cpp Cluster/ClusterInfo.cpp - Cluster/ClusterMethods.cpp Cluster/ClusterRepairDistributeShardsLike.cpp Cluster/ClusterRepairOperations.cpp - Cluster/ClusterTraverser.cpp Cluster/ClusterTrxMethods.cpp Cluster/ClusterTypes.cpp Cluster/CreateCollection.cpp @@ -352,7 +521,6 @@ SET(ARANGOD_SOURCES Cluster/DropIndex.cpp Cluster/EnsureIndex.cpp Cluster/FollowerInfo.cpp - Cluster/FollowerInfo.cpp Cluster/HeartbeatThread.cpp Cluster/Maintenance.cpp Cluster/MaintenanceFeature.cpp @@ -367,8 +535,6 @@ SET(ARANGOD_SOURCES Cluster/ServerState.cpp Cluster/SynchronizeShard.cpp Cluster/TakeoverShardLeadership.cpp - Cluster/TraverserEngine.cpp - Cluster/TraverserEngineRegistry.cpp Cluster/UpdateCollection.cpp Cluster/v8-cluster.cpp GeneralServer/Acceptor.cpp @@ -386,85 +552,10 @@ SET(ARANGOD_SOURCES GeneralServer/ServerSecurityFeature.cpp GeneralServer/Task.cpp GeneralServer/VstCommTask.cpp - GeoIndex/Index.cpp - GeoIndex/Near.cpp - Graph/AttributeWeightShortestPathFinder.cpp - Graph/BaseOptions.cpp - Graph/BreadthFirstEnumerator.cpp - Graph/ClusterTraverserCache.cpp - Graph/ConstantWeightShortestPathFinder.cpp - Graph/Graph.cpp - Graph/GraphManager.cpp - Graph/GraphOperations.cpp - Graph/KShortestPathsFinder.cpp - Graph/NeighborsEnumerator.cpp - Graph/PathEnumerator.cpp - Graph/ShortestPathFinder.cpp - Graph/ShortestPathOptions.cpp - Graph/ShortestPathResult.cpp - Graph/SingleServerEdgeCursor.cpp - Graph/SingleServerTraverser.cpp - Graph/Traverser.cpp - Graph/TraverserCache.cpp - Graph/TraverserCacheFactory.cpp - Graph/TraverserDocumentCache.cpp - Graph/TraverserOptions.cpp - Indexes/Index.cpp - Indexes/IndexFactory.cpp - Indexes/IndexIterator.cpp - Indexes/SimpleAttributeEqualityMatcher.cpp - Indexes/SortedIndexAttributeMatcher.cpp - InternalRestHandler/InternalRestTraverserHandler.cpp Network/ConnectionPool.cpp Network/Methods.cpp Network/NetworkFeature.cpp Network/Utils.cpp - Pregel/AggregatorHandler.cpp - Pregel/AlgoRegistry.cpp - Pregel/Algos/AsyncSCC.cpp - Pregel/Algos/ConnectedComponents.cpp - Pregel/Algos/DMID/DMID.cpp - Pregel/Algos/EffectiveCloseness/EffectiveCloseness.cpp - Pregel/Algos/EffectiveCloseness/HLLCounter.cpp - Pregel/Algos/HITS.cpp - Pregel/Algos/LabelPropagation.cpp - Pregel/Algos/LineRank.cpp - Pregel/Algos/PageRank.cpp - Pregel/Algos/RecoveringPageRank.cpp - Pregel/Algos/SCC.cpp - Pregel/Algos/SLPA.cpp - Pregel/Algos/SSSP.cpp - Pregel/Algos/ShortestPath.cpp - Pregel/Conductor.cpp - Pregel/GraphStore.cpp - Pregel/IncomingCache.cpp - Pregel/IndexHelpers.cpp - Pregel/OutgoingCache.cpp - Pregel/PregelFeature.cpp - Pregel/Recovery.cpp - Pregel/Utils.cpp - Pregel/Worker-templates-algorithms.cpp - Pregel/Worker-templates-native-types.cpp - Pregel/Worker.cpp - Pregel/WorkerConfig.cpp - Replication/DatabaseInitialSyncer.cpp - Replication/DatabaseReplicationApplier.cpp - Replication/DatabaseTailingSyncer.cpp - Replication/GlobalInitialSyncer.cpp - Replication/GlobalInitialSyncer.cpp - Replication/GlobalReplicationApplier.cpp - Replication/GlobalTailingSyncer.cpp - Replication/InitialSyncer.cpp - Replication/ReplicationApplier.cpp - Replication/ReplicationApplierConfiguration.cpp - Replication/ReplicationApplierState.cpp - Replication/ReplicationClients.cpp - Replication/ReplicationFeature.cpp - Replication/Syncer.cpp - Replication/SyncerId.cpp - Replication/TailingSyncer.cpp - Replication/common-defines.cpp - Replication/utilities.cpp RestHandler/RestAdminDatabaseHandler.cpp RestHandler/RestAdminExecuteHandler.cpp RestHandler/RestAdminLogHandler.cpp @@ -478,8 +569,6 @@ SET(ARANGOD_SOURCES RestHandler/RestAuthReloadHandler.cpp RestHandler/RestBaseHandler.cpp RestHandler/RestBatchHandler.cpp - RestHandler/RestCollectionHandler.cpp - RestHandler/RestControlPregelHandler.cpp RestHandler/RestCursorHandler.cpp RestHandler/RestDatabaseHandler.cpp RestHandler/RestDebugHandler.cpp @@ -488,16 +577,13 @@ SET(ARANGOD_SOURCES RestHandler/RestEndpointHandler.cpp RestHandler/RestEngineHandler.cpp RestHandler/RestExplainHandler.cpp - RestHandler/RestGraphHandler.cpp RestHandler/RestImportHandler.cpp RestHandler/RestIndexHandler.cpp RestHandler/RestJobHandler.cpp RestHandler/RestPleaseUpgradeHandler.cpp - RestHandler/RestPregelHandler.cpp RestHandler/RestQueryCacheHandler.cpp RestHandler/RestQueryHandler.cpp RestHandler/RestRepairHandler.cpp - RestHandler/RestReplicationHandler.cpp RestHandler/RestShutdownHandler.cpp RestHandler/RestSimpleHandler.cpp RestHandler/RestSimpleQueryHandler.cpp @@ -532,7 +618,6 @@ SET(ARANGOD_SOURCES RestServer/ServerFeature.cpp RestServer/ServerIdFeature.cpp RestServer/SystemDatabaseFeature.cpp - RestServer/TraverserEngineRegistryFeature.cpp RestServer/TtlFeature.cpp RestServer/UpgradeFeature.cpp RestServer/ViewTypesFeature.cpp @@ -551,118 +636,245 @@ SET(ARANGOD_SOURCES Statistics/ServerStatistics.cpp Statistics/StatisticsFeature.cpp Statistics/StatisticsWorker.cpp - StorageEngine/EngineSelectorFeature.cpp - StorageEngine/HotBackup.cpp - StorageEngine/PhysicalCollection.cpp - StorageEngine/TransactionCollection.cpp - StorageEngine/TransactionState.cpp - StorageEngine/WalAccess.cpp Transaction/ClusterUtils.cpp Transaction/Context.cpp Transaction/CountCache.cpp Transaction/Helpers.cpp + Transaction/Manager.cpp + Transaction/ManagerFeature.cpp Transaction/Methods.cpp Transaction/Options.cpp Transaction/SmartContext.cpp Transaction/StandaloneContext.cpp Transaction/Status.cpp - Transaction/Manager.cpp - Transaction/ManagerFeature.cpp - Transaction/V8Context.cpp - Utils/CollectionKeys.cpp - Utils/CollectionKeysRepository.cpp - Utils/CollectionNameResolver.cpp - Utils/CursorRepository.cpp - Utils/DatabaseGuard.cpp - Utils/ExecContext.cpp - Utils/FlushThread.cpp - Utils/OperationCursor.cpp - Utils/SingleCollectionTransaction.cpp - Utils/UrlHelper.cpp - V8Server/FoxxQueuesFeature.cpp - V8Server/V8Context.cpp - V8Server/V8DealerFeature.cpp - V8Server/v8-actions.cpp - V8Server/v8-collection-util.cpp - V8Server/v8-collection.cpp - V8Server/v8-dispatcher.cpp - V8Server/v8-general-graph.cpp - V8Server/v8-query.cpp - V8Server/v8-replication.cpp - V8Server/v8-statistics.cpp - V8Server/v8-ttl.cpp - V8Server/v8-user-functions.cpp - V8Server/v8-user-structures.cpp - V8Server/v8-users.cpp - V8Server/v8-util.cpp - V8Server/v8-views.cpp - V8Server/v8-vocbase.cpp - V8Server/v8-voccursor.cpp - V8Server/v8-vocindex.cpp - VocBase/KeyGenerator.cpp - VocBase/KeyLockInfo.cpp - VocBase/LogicalCollection.cpp - VocBase/LogicalDataSource.cpp - VocBase/LogicalView.cpp - VocBase/ManagedDocumentResult.cpp - VocBase/Methods/AqlUserFunctions.cpp - VocBase/Methods/Collections.cpp - VocBase/Methods/Databases.cpp - VocBase/Methods/Indexes.cpp - VocBase/Methods/Tasks.cpp - VocBase/Methods/Transactions.cpp - VocBase/Methods/Ttl.cpp - VocBase/Methods/Upgrade.cpp - VocBase/Methods/UpgradeTasks.cpp - VocBase/Methods/Version.cpp - VocBase/ticks.cpp - VocBase/vocbase.cpp - ${ADDITIONAL_BIN_ARANGOD_SOURCES} +) + +set(LIB_ARANGO_COMMON_REST_HANDLER_SOURCES + RestHandler/RestCollectionHandler.cpp + RestHandler/RestReplicationHandler.cpp +) + +set(LIB_ARANGO_CLUSTER_METHODS_SOURCES + Cluster/ClusterMethods.cpp ) if (USE_MAINTAINER_MODE) - set(ARANGOD_SOURCES ${ARANGOD_SOURCES} RestHandler/RestTestHandler.cpp) + set(LIB_ARANGOSERVER_SOURCES ${LIB_ARANGOSERVER_SOURCES} RestHandler/RestTestHandler.cpp) endif() if (NOT MSVC) - set(ARANGOD_SOURCES ${ARANGOD_SOURCES} GeneralServer/AcceptorUnixDomain.cpp) + set(LIB_ARANGOSERVER_SOURCES ${LIB_ARANGOSERVER_SOURCES} GeneralServer/AcceptorUnixDomain.cpp) endif() include(ClusterEngine/CMakeLists.txt) include(RocksDBEngine/CMakeLists.txt) include(MMFiles/CMakeLists.txt) -add_library(arangoserver STATIC - ${ARANGOD_SOURCES} - ${CLUSTER_ENGINE_SOURCES} - ${MMFILES_SOURCES} - ${ROCKSDB_SOURCES} +add_library(arango_graph STATIC + ${LIB_ARANGO_GRAPH_SOURCES} + ${ADDITIONAL_LIB_ARANGO_GRAPH_SOURCES} +) + +add_library(arango_pregel STATIC + ${LIB_ARANGO_PREGEL_SOURCES} +) + +add_library(arango_aql STATIC + ${LIB_ARANGO_AQL_SOURCES} + ${ADDITIONAL_LIB_ARANGO_AQL_SOURCES} +) + +add_library(arango_vocbase STATIC + ${LIB_ARANGO_VOCBASE_SOURCES} + ${ADDITIONAL_LIB_ARANGO_VOCBASE_SOURCES} +) + +add_library(arango_v8server STATIC + ${LIB_ARANGO_V8SERVER_SOURCES} +) + +add_library(arango_utils STATIC + ${LIB_ARANGO_UTILS_SOURCES} +) + +add_library(arango_storage_engine STATIC + ${LIB_ARANGO_STORAGE_ENGINE_SOURCES} +) + +# arango_storage_engine uses arango_mmfiles and arango_rocksdb. +# In turn, arango_storage_engine_common provides something for both. +add_library(arango_storage_engine_common STATIC + ${LIB_ARANGO_STORAGE_ENGINE_COMMON_SOURCES} +) + +add_library(arango_indexes STATIC + ${LIB_ARANGO_INDEXES_SOURCES} +) + +add_library(arango_cache STATIC + ${LIB_ARANGO_CACHE_SOURCES} +) + +add_library(arango_replication STATIC + ${LIB_ARANGO_REPLICATION_SOURCES} +) + +add_library(arango_agency STATIC + ${LIB_ARANGO_AGENCY_SOURCES} +) + +add_library(arangoserver STATIC + ${LIB_ARANGOSERVER_SOURCES} + ${ADDITIONAL_LIB_ARANGOSERVER_SOURCES} + ${ProductVersionFiles} +) + +add_library(arango_mmfiles STATIC + ${MMFILES_SOURCES} +) + +add_library(arango_rocksdb STATIC + ${ROCKSDB_SOURCES} + ${ADDITIONAL_LIB_ARANGO_ROCKSDB_SOURCES} +) + +add_library(arango_cluster_engine STATIC + ${CLUSTER_ENGINE_SOURCES} +) + +add_library(arango_common_rest_handler STATIC + ${LIB_ARANGO_COMMON_REST_HANDLER_SOURCES} +) + +add_library(arango_cluster_methods STATIC + ${LIB_ARANGO_CLUSTER_METHODS_SOURCES} + ${ADDITIONAL_LIB_ARANGO_CLUSTER_METHODS_SOURCES} +) + +add_library(llhttp STATIC ${LLHTTP_SOURCES} ) -target_include_directories(arangoserver PUBLIC "${PROJECT_SOURCE_DIR}/3rdParty/llhttp/include") +target_include_directories(llhttp PUBLIC "${PROJECT_SOURCE_DIR}/3rdParty/llhttp/include") + +# Note that arango_geo publicly exports the /J compile option for MSVC, because +# s2 requires /J to be set on Windows. +# /J makes char unsigned. +# Thus all libraries depending on arango_geo will be compiled with /J (and need +# to, if they include s2 headers). +# I think it would safer to compile everything with /J, so we would not get a +# mixture of signed and unsigned char interpretations in the same binary. +# However, just setting +# add_compile_options(/J) +# does not work, either, because +# C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\atlmfc\include\atldef.h(94): fatal error C1189: #error: ATL does not support compilation with /J or _CHAR_UNSIGNED flag enabled [C:\vm04-windows\oskar\work\ArangoDB\build\lib\arango.vcxproj] +# . + +target_link_libraries(arango_agency arango) + +target_link_libraries(arango_aql arango_geo) +target_link_libraries(arango_aql arango_graph) +target_link_libraries(arango_aql arango_indexes) +target_link_libraries(arango_aql arango_iresearch) + +target_link_libraries(arango_cache arango) +target_link_libraries(arango_cache boost_system) + +target_link_libraries(arango_cluster_engine arango_indexes) +target_link_libraries(arango_cluster_engine boost_boost) + +target_link_libraries(arango_cluster_methods arango) + +target_link_libraries(arango_common_rest_handler arango_cluster_methods) +target_link_libraries(arango_common_rest_handler arango_utils) + +target_link_libraries(arango_graph arango_cache) +target_link_libraries(arango_graph arango_vocbase) +target_link_libraries(arango_graph boost_boost) + +target_link_libraries(arango_indexes arango_geo) +target_link_libraries(arango_indexes boost_boost) + +target_link_libraries(arango_iresearch arango_indexes) +target_link_libraries(arango_iresearch arango_cluster_engine) + +target_link_libraries(arango_mmfiles arango_geo) +target_link_libraries(arango_mmfiles arango_indexes) +target_link_libraries(arango_mmfiles arango_storage_engine_common) +target_link_libraries(arango_mmfiles arango_utils) +target_link_libraries(arango_mmfiles boost_boost) +target_link_libraries(arango_mmfiles boost_system) +target_link_libraries(arango_mmfiles llhttp) + +target_link_libraries(arango_pregel arango_agency) +target_link_libraries(arango_pregel boost_boost) +target_link_libraries(arango_pregel boost_system) + +target_link_libraries(arango_replication arango_storage_engine) +target_link_libraries(arango_replication arango_utils) + +target_link_libraries(arango_rocksdb ${ROCKSDB_LIBS}) +target_link_libraries(arango_rocksdb arango_cache) +target_link_libraries(arango_rocksdb arango_common_rest_handler) +target_link_libraries(arango_rocksdb arango_geo) +target_link_libraries(arango_rocksdb arango_indexes) +target_link_libraries(arango_rocksdb arango_storage_engine_common) +target_link_libraries(arango_rocksdb boost_boost) + +target_link_libraries(arango_storage_engine arango_cluster_engine) +target_link_libraries(arango_storage_engine arango_cluster_methods) +target_link_libraries(arango_storage_engine arango_mmfiles) +target_link_libraries(arango_storage_engine arango_rocksdb) + +target_link_libraries(arango_utils boost_boost) + +target_link_libraries(arango_v8server arango_agency) +target_link_libraries(arango_v8server arango_iresearch) +target_link_libraries(arango_v8server arango_replication) +target_link_libraries(arango_v8server arango_v8 ${V8_LIBS}) + +target_link_libraries(arango_vocbase arango_agency) +target_link_libraries(arango_vocbase arango_indexes) +target_link_libraries(arango_vocbase arango_replication) +target_link_libraries(arango_vocbase boost_system) + +target_link_libraries(arangoserver arango_agency) +target_link_libraries(arangoserver arango_aql) +target_link_libraries(arangoserver arango_cluster_engine) +target_link_libraries(arangoserver arango_cluster_methods) +target_link_libraries(arangoserver arango_common_rest_handler) +target_link_libraries(arangoserver arango_geo) +target_link_libraries(arangoserver arango_graph) +target_link_libraries(arangoserver arango_indexes) +target_link_libraries(arangoserver arango_iresearch) +target_link_libraries(arangoserver arango_pregel) +target_link_libraries(arangoserver arango_replication) +target_link_libraries(arangoserver arango_storage_engine) +target_link_libraries(arangoserver arango_utils) +target_link_libraries(arangoserver arango_v8server) +target_link_libraries(arangoserver arango_vocbase) +target_link_libraries(arangoserver boost_boost) +target_link_libraries(arangoserver fuerte) +target_link_libraries(arangoserver llhttp) target_link_libraries(arangoserver - ${LIB_ARANGO_FE} - ${LIB_ARANGO_GEO} - ${LIB_ARANGO_V8} - ${LIB_ARANGO} - ${LINENOISE_LIBS} + ${LINENOISE_LIBS} # Is this ever anything but empty? ${MSVC_LIBS} - ${V8_LIBS} - ${ROCKSDB_LIBS} - ${LIB_ARANGO_IRESEARCH} - s2 - fuerte - boost_boost - boost_system - snappy - ${SYSTEM_LIBRARIES} ) if (USE_ENTERPRISE) - target_compile_definitions(arangoserver PUBLIC "-DUSE_ENTERPRISE=1") - target_include_directories(arangoserver PUBLIC "${PROJECT_SOURCE_DIR}/${ENTERPRISE_INCLUDE_DIR}") + add_library(arango_rclone STATIC + ${LIB_RCLONE_SOURCES} + ) + + target_link_libraries(arango_rclone arango) + + target_link_libraries(arango_rocksdb arango_rclone) +endif() + +if (USE_ENTERPRISE) + add_definitions(-DUSE_ENTERPRISE=1) + if (MSVC) target_link_libraries(arangoserver Wldap32.lib @@ -694,24 +906,40 @@ install( install_config(arangod) if (NOT USE_PRECOMPILED_V8) - add_dependencies(arangod zlibstatic v8_build ${LIB_ARANGO_IRESEARCH}) + add_dependencies(arangod zlibstatic v8_build arango_iresearch) else () - add_dependencies(arangod zlibstatic ${LIB_ARANGO_IRESEARCH}) + add_dependencies(arangod zlibstatic arango_iresearch) endif () if (USE_JEMALLOC) add_dependencies(arangod jemalloc) endif () -if(MSVC) - target_compile_options(arangoserver PRIVATE /WX /D_WINSOCK_DEPRECATED_NO_WARNINGS) - target_compile_options(arangod PRIVATE /WX /D_WINSOCK_DEPRECATED_NO_WARNINGS) -endif() +foreach(TARGET + arango_aql + arango_cache + arango_cluster_engine + arango_graph + arango_indexes + arango_mmfiles + arango_pregel + arango_replication + arango_rocksdb + arango_storage_engine + arango_utils + arango_v8server + arango_vocbase + arangod + arangoserver +) + target_include_directories(${TARGET} PUBLIC "${PROJECT_SOURCE_DIR}/${ENTERPRISE_INCLUDE_DIR}") -if (DARWIN) - target_compile_options(arangoserver PRIVATE -Werror) - target_compile_options(arangod PRIVATE -Werror) -endif() + if(MSVC) + target_compile_options(${TARGET} PRIVATE /WX /D_WINSOCK_DEPRECATED_NO_WARNINGS) + elseif(DARWIN) + target_compile_options(${TARGET} PRIVATE -Werror) + endif() +endforeach() ################################################################################ ## arango-dfdb diff --git a/arangod/Cluster/AgencyCallback.cpp b/arangod/Cluster/AgencyCallback.cpp index 081075cda0..01f5393435 100644 --- a/arangod/Cluster/AgencyCallback.cpp +++ b/arangod/Cluster/AgencyCallback.cpp @@ -30,7 +30,6 @@ #include "ApplicationFeatures/ApplicationServer.h" #include "Basics/ConditionLocker.h" -#include "Basics/MutexLocker.h" #include "Basics/StringUtils.h" #include "Basics/VelocyPackHelper.h" #include "Logger/LogMacros.h" diff --git a/arangod/Cluster/ClusterMethods.cpp b/arangod/Cluster/ClusterMethods.cpp index 0c4d22a3b9..959ea061b0 100644 --- a/arangod/Cluster/ClusterMethods.cpp +++ b/arangod/Cluster/ClusterMethods.cpp @@ -30,7 +30,6 @@ #include "Basics/StaticStrings.h" #include "Basics/StringUtils.h" #include "Basics/VelocyPackHelper.h" -#include "Basics/conversions.h" #include "Basics/system-functions.h" #include "Basics/tri-strings.h" #include "Cluster/ClusterCollectionCreationInfo.h" @@ -41,7 +40,6 @@ #include "Network/Methods.h" #include "Network/Utils.h" #include "StorageEngine/HotBackupCommon.h" -#include "Indexes/Index.h" #include "RestServer/TtlFeature.h" #include "StorageEngine/TransactionCollection.h" #include "StorageEngine/TransactionState.h" @@ -52,12 +50,12 @@ #include "Utils/OperationOptions.h" #include "VocBase/KeyGenerator.h" #include "VocBase/LogicalCollection.h" +#include "VocBase/Methods/Version.h" #include "VocBase/ticks.h" #ifdef USE_ENTERPRISE #include "Enterprise/RocksDBEngine/RocksDBHotBackup.h" #endif #include "Rest/Version.h" -#include "VocBase/Methods/Version.h" #include #include diff --git a/arangod/Cluster/HeartbeatThread.cpp b/arangod/Cluster/HeartbeatThread.cpp index e88a926f7f..ef1740cb8d 100644 --- a/arangod/Cluster/HeartbeatThread.cpp +++ b/arangod/Cluster/HeartbeatThread.cpp @@ -48,12 +48,9 @@ #include "Replication/ReplicationFeature.h" #include "RestServer/DatabaseFeature.h" #include "RestServer/TtlFeature.h" -#include "Scheduler/Scheduler.h" -#include "Scheduler/SchedulerFeature.h" #include "StorageEngine/EngineSelectorFeature.h" #include "StorageEngine/StorageEngine.h" #include "Transaction/ClusterUtils.h" -#include "V8/v8-globals.h" #include "VocBase/vocbase.h" using namespace arangodb; diff --git a/arangod/ClusterEngine/ClusterEngine.cpp b/arangod/ClusterEngine/ClusterEngine.cpp index 7bb650db5a..555fccc3f6 100644 --- a/arangod/ClusterEngine/ClusterEngine.cpp +++ b/arangod/ClusterEngine/ClusterEngine.cpp @@ -24,7 +24,6 @@ #include "Basics/Exceptions.h" #include "Basics/FileUtils.h" #include "Basics/Result.h" -#include "Basics/RocksDBLogger.h" #include "Basics/StaticStrings.h" #include "Basics/StringUtils.h" #include "Basics/Thread.h" @@ -43,10 +42,6 @@ #include "MMFiles/MMFilesOptimizerRules.h" #include "ProgramOptions/ProgramOptions.h" #include "ProgramOptions/Section.h" -#include "Rest/Version.h" -#include "RestHandler/RestHandlerCreator.h" -#include "RestServer/DatabasePathFeature.h" -#include "RestServer/ServerIdFeature.h" #include "RocksDBEngine/RocksDBEngine.h" #include "RocksDBEngine/RocksDBOptimizerRules.h" #include "Transaction/Context.h" diff --git a/arangod/GeneralServer/GeneralServerFeature.cpp b/arangod/GeneralServer/GeneralServerFeature.cpp index c5e3eee18b..408365f5b7 100644 --- a/arangod/GeneralServer/GeneralServerFeature.cpp +++ b/arangod/GeneralServer/GeneralServerFeature.cpp @@ -40,7 +40,6 @@ #include "GeneralServer/AuthenticationFeature.h" #include "GeneralServer/GeneralServer.h" #include "GeneralServer/RestHandlerFactory.h" -#include "Graph/Graph.h" #include "InternalRestHandler/InternalRestTraverserHandler.h" #include "ProgramOptions/Parameters.h" #include "ProgramOptions/ProgramOptions.h" @@ -58,7 +57,6 @@ #include "RestHandler/RestAuthHandler.h" #include "RestHandler/RestAuthReloadHandler.h" #include "RestHandler/RestBatchHandler.h" -#include "RestHandler/RestCollectionHandler.h" #include "RestHandler/RestControlPregelHandler.h" #include "RestHandler/RestCursorHandler.h" #include "RestHandler/RestDatabaseHandler.h" @@ -97,10 +95,7 @@ #include "RestHandler/RestWalAccessHandler.h" #include "RestServer/EndpointFeature.h" #include "RestServer/QueryRegistryFeature.h" -#include "RestServer/ServerFeature.h" #include "RestServer/TraverserEngineRegistryFeature.h" -#include "Scheduler/Scheduler.h" -#include "Scheduler/SchedulerFeature.h" #include "Ssl/SslServerFeature.h" #include "StorageEngine/EngineSelectorFeature.h" #include "StorageEngine/StorageEngine.h" diff --git a/arangod/GeneralServer/GeneralServerFeature.h b/arangod/GeneralServer/GeneralServerFeature.h index d0d5aca102..4a96fd67c1 100644 --- a/arangod/GeneralServer/GeneralServerFeature.h +++ b/arangod/GeneralServer/GeneralServerFeature.h @@ -41,8 +41,6 @@ class RestHandlerFactory; class GeneralServer; } // namespace rest -class RestServerThread; - class GeneralServerFeature final : public application_features::ApplicationFeature { public: static rest::RestHandlerFactory* HANDLER_FACTORY; diff --git a/arangod/MMFiles/MMFilesIndexFactory.cpp b/arangod/MMFiles/MMFilesIndexFactory.cpp index f5da9e71c1..3a2cf6bb88 100644 --- a/arangod/MMFiles/MMFilesIndexFactory.cpp +++ b/arangod/MMFiles/MMFilesIndexFactory.cpp @@ -26,7 +26,6 @@ #include "Basics/StaticStrings.h" #include "Basics/StringUtils.h" #include "Basics/VelocyPackHelper.h" -#include "Basics/memory.h" #include "Cluster/ServerState.h" #include "Indexes/Index.h" #include "MMFiles/MMFilesEdgeIndex.h" @@ -37,18 +36,13 @@ #include "MMFiles/MMFilesPrimaryIndex.h" #include "MMFiles/MMFilesSkiplistIndex.h" #include "MMFiles/MMFilesTtlIndex.h" -#include "MMFiles/mmfiles-fulltext-index.h" #include "VocBase/LogicalCollection.h" #include "VocBase/voc-types.h" #include -#include #include -#include #include -#include "IResearch/IResearchMMFilesLink.h" - using namespace arangodb; namespace { diff --git a/arangod/Replication/DatabaseInitialSyncer.cpp b/arangod/Replication/DatabaseInitialSyncer.cpp index 03a4b8837f..d8118122aa 100644 --- a/arangod/Replication/DatabaseInitialSyncer.cpp +++ b/arangod/Replication/DatabaseInitialSyncer.cpp @@ -33,11 +33,9 @@ #include "Basics/VelocyPackHelper.h" #include "Basics/system-functions.h" #include "Indexes/Index.h" -#include "Indexes/IndexIterator.h" #include "Logger/Logger.h" #include "Replication/DatabaseReplicationApplier.h" #include "Replication/utilities.h" -#include "RestServer/DatabaseFeature.h" #include "SimpleHttpClient/SimpleHttpClient.h" #include "SimpleHttpClient/SimpleHttpResult.h" #include "StorageEngine/EngineSelectorFeature.h" @@ -54,7 +52,6 @@ #include "VocBase/vocbase.h" #include -#include #include #include #include diff --git a/arangod/RestServer/ServerFeature.cpp b/arangod/RestServer/ServerFeature.cpp index 79c4072cee..d2971104c1 100644 --- a/arangod/RestServer/ServerFeature.cpp +++ b/arangod/RestServer/ServerFeature.cpp @@ -35,7 +35,6 @@ #include "Replication/ReplicationFeature.h" #include "RestServer/DatabaseFeature.h" #include "Scheduler/SchedulerFeature.h" -#include "V8/v8-conv.h" #include "V8/v8-globals.h" #include "V8/v8-utils.h" #include "V8Server/V8Context.h" diff --git a/arangod/RocksDBEngine/RocksDBIndexFactory.cpp b/arangod/RocksDBEngine/RocksDBIndexFactory.cpp index 60108502ae..3eeaa97b4c 100644 --- a/arangod/RocksDBEngine/RocksDBIndexFactory.cpp +++ b/arangod/RocksDBEngine/RocksDBIndexFactory.cpp @@ -41,12 +41,9 @@ #include "VocBase/voc-types.h" #include -#include #include #include -#include "IResearch/IResearchRocksDBLink.h" - using namespace arangodb; namespace { diff --git a/arangod/Utils/CollectionNameResolver.cpp b/arangod/Utils/CollectionNameResolver.cpp index 5c1bc1b544..87c1e7bc06 100644 --- a/arangod/Utils/CollectionNameResolver.cpp +++ b/arangod/Utils/CollectionNameResolver.cpp @@ -23,7 +23,6 @@ #include "CollectionNameResolver.h" -#include "Basics/Common.h" #include "Basics/NumberUtils.h" #include "Basics/ReadLocker.h" #include "Basics/StringUtils.h" diff --git a/arangod/Utils/UrlHelper.cpp b/arangod/Utils/UrlHelper.cpp index 5ad4ba97ec..478a1c33f2 100644 --- a/arangod/Utils/UrlHelper.cpp +++ b/arangod/Utils/UrlHelper.cpp @@ -49,10 +49,10 @@ Query::Query(QueryParameters queryParameters) : _content(queryParameters) {} bool Query::empty() const noexcept { struct output { - bool operator()(QueryString const& queryString) { + bool operator()(QueryString const& queryString) const { return queryString.value().empty(); } - bool operator()(QueryParameters const& queryParameters) { + bool operator()(QueryParameters const& queryParameters) const { return queryParameters.empty(); } }; diff --git a/arangosh/CMakeLists.txt b/arangosh/CMakeLists.txt index 0036604e62..a8bdc9c574 100644 --- a/arangosh/CMakeLists.txt +++ b/arangosh/CMakeLists.txt @@ -30,7 +30,7 @@ add_executable(${BIN_ARANGOBENCH} target_include_directories(${BIN_ARANGOBENCH} PRIVATE ${PROJECT_SOURCE_DIR}/arangosh) target_link_libraries(${BIN_ARANGOBENCH} - ${LIB_ARANGO} + arango ${MSVC_LIBS} ${SYSTEM_LIBRARIES} boost_system @@ -89,7 +89,7 @@ add_executable(${BIN_ARANGOBACKUP} target_include_directories(${BIN_ARANGOBACKUP} PRIVATE ${PROJECT_SOURCE_DIR}/arangosh) target_link_libraries(${BIN_ARANGOBACKUP} - ${LIB_ARANGO} + arango ${MSVC_LIBS} ${SYSTEM_LIBRARIES} boost_system @@ -149,7 +149,7 @@ add_executable(${BIN_ARANGODUMP} target_include_directories(${BIN_ARANGODUMP} PRIVATE ${PROJECT_SOURCE_DIR}/arangosh) target_link_libraries(${BIN_ARANGODUMP} - ${LIB_ARANGO} + arango ${MSVC_LIBS} ${SYSTEM_LIBRARIES} boost_system @@ -208,7 +208,7 @@ add_executable(${BIN_ARANGOEXPORT} target_include_directories(${BIN_ARANGOEXPORT} PRIVATE ${PROJECT_SOURCE_DIR}/arangosh) target_link_libraries(${BIN_ARANGOEXPORT} - ${LIB_ARANGO} + arango ${MSVC_LIBS} ${SYSTEM_LIBRARIES} boost_system @@ -270,7 +270,7 @@ add_executable(arangoimport target_include_directories(${BIN_ARANGOIMPORT} PRIVATE ${PROJECT_SOURCE_DIR}/arangosh) target_link_libraries(${BIN_ARANGOIMPORT} - ${LIB_ARANGO} + arango ${MSVC_LIBS} ${SYSTEM_LIBRARIES} fuerte @@ -339,7 +339,7 @@ add_executable(${BIN_ARANGORESTORE} target_include_directories(${BIN_ARANGORESTORE} PRIVATE ${PROJECT_SOURCE_DIR}/arangosh) target_link_libraries(${BIN_ARANGORESTORE} - ${LIB_ARANGO} + arango ${MSVC_LIBS} ${SYSTEM_LIBRARIES} boost_system @@ -403,8 +403,8 @@ add_executable(${BIN_ARANGOSH} target_include_directories(${BIN_ARANGOSH} PRIVATE ${PROJECT_SOURCE_DIR}/arangosh) target_link_libraries(${BIN_ARANGOSH} - ${LIB_ARANGO_V8} - ${LIB_ARANGO} + arango_v8 + arango ${LINENOISE_LIBS} ${V8_LIBS} fuerte @@ -464,7 +464,7 @@ add_executable(${BIN_ARANGOVPACK} target_include_directories(${BIN_ARANGOVPACK} PRIVATE ${PROJECT_SOURCE_DIR}/arangosh) target_link_libraries(${BIN_ARANGOVPACK} - ${LIB_ARANGO} + arango ${MSVC_LIBS} ${SYSTEM_LIBRARIES} boost_system diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index b644885b0e..86309c7286 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -111,7 +111,7 @@ if (USE_LOCAL_CLOCK_GETTIME) set(LIB_CLOCK_GETTIME Utilities/clock_gettime.cpp) endif () -add_library(${LIB_ARANGO} STATIC +add_library(arango STATIC ${LIB_ARANGO_APPLE} ${LIB_ARANGO_MSVC} ${LIB_ARANGO_POSIX} @@ -263,23 +263,25 @@ add_library(${LIB_ARANGO} STATIC ${ADDITIONAL_LIB_ARANGO_SOURCES} ) -target_link_libraries(${LIB_ARANGO} - s2 - boost_system - boost_boost +target_link_libraries(arango + s2 + boost_system + boost_boost + ${V8_LIBS} + ${SYSTEM_LIBRARIES} ) # Enterprise if (USE_ENTERPRISE) - target_compile_definitions(${LIB_ARANGO} PUBLIC "-DUSE_ENTERPRISE=1") - target_include_directories(${LIB_ARANGO} PUBLIC "${PROJECT_SOURCE_DIR}/${ENTERPRISE_INCLUDE_DIR}") + target_compile_definitions(arango PUBLIC "-DUSE_ENTERPRISE=1") + target_include_directories(arango PUBLIC "${PROJECT_SOURCE_DIR}/${ENTERPRISE_INCLUDE_DIR}") endif() ################################################################################ ## LIB_ARANGO_GEO ################################################################################ -add_library(${LIB_ARANGO_GEO} STATIC +add_library(arango_geo STATIC Geo/Ellipsoid.cpp Geo/GeoJson.cpp Geo/GeoParams.cpp @@ -291,27 +293,28 @@ add_library(${LIB_ARANGO_GEO} STATIC Geo/S2/S2MultiPolyline.cpp ) -target_link_libraries(${LIB_ARANGO_GEO} - ${LIB_ARANGO} - boost_system - boost_boost +target_link_libraries(arango_geo + arango + boost_system + boost_boost + s2 ) if (WINDOWS) - target_compile_options(${LIB_ARANGO_GEO} PUBLIC "-J") + target_compile_options(arango_geo PUBLIC "-J") endif() # Enterprise if (USE_ENTERPRISE) - target_compile_definitions(${LIB_ARANGO_GEO} PUBLIC "-DUSE_ENTERPRISE=1") - target_include_directories(${LIB_ARANGO_GEO} PUBLIC "${PROJECT_SOURCE_DIR}/${ENTERPRISE_INCLUDE_DIR}") + target_compile_definitions(arango_geo PUBLIC "-DUSE_ENTERPRISE=1") + target_include_directories(arango_geo PUBLIC "${PROJECT_SOURCE_DIR}/${ENTERPRISE_INCLUDE_DIR}") endif() ################################################################################ ## LIB_ARANGO_V8 ################################################################################ -add_library(${LIB_ARANGO_V8} STATIC +add_library(arango_v8 STATIC ApplicationFeatures/V8SecurityFeature.cpp V8/JavaScriptSecurityContext.cpp V8/JSLoader.cpp @@ -326,26 +329,26 @@ add_library(${LIB_ARANGO_V8} STATIC V8/v8-environment.cpp ) -target_link_libraries(${LIB_ARANGO_V8} +target_link_libraries(arango_v8 boost_system boost_boost ) # Enterprise if (USE_ENTERPRISE) - target_compile_definitions(${LIB_ARANGO_V8} PUBLIC "-DUSE_ENTERPRISE=1") - target_include_directories(${LIB_ARANGO_V8} PUBLIC "${PROJECT_SOURCE_DIR}/${ENTERPRISE_INCLUDE_DIR}") + target_compile_definitions(arango_v8 PUBLIC "-DUSE_ENTERPRISE=1") + target_include_directories(arango_v8 PUBLIC "${PROJECT_SOURCE_DIR}/${ENTERPRISE_INCLUDE_DIR}") endif() if(MSVC) - target_compile_options(${LIB_ARANGO_V8} PRIVATE /WX /D_WINSOCK_DEPRECATED_NO_WARNINGS) - target_compile_options(${LIB_ARANGO_GEO} PRIVATE /WX /D_WINSOCK_DEPRECATED_NO_WARNINGS) - target_compile_options(${LIB_ARANGO} PRIVATE /WX /D_WINSOCK_DEPRECATED_NO_WARNINGS) + target_compile_options(arango_v8 PRIVATE /WX /D_WINSOCK_DEPRECATED_NO_WARNINGS) + target_compile_options(arango_geo PRIVATE /WX /D_WINSOCK_DEPRECATED_NO_WARNINGS) + target_compile_options(arango PRIVATE /WX /D_WINSOCK_DEPRECATED_NO_WARNINGS) endif() if (DARWIN) - target_compile_options(${LIB_ARANGO_V8} PRIVATE -Werror) - target_compile_options(${LIB_ARANGO_GEO} PRIVATE -Werror) - target_compile_options(${LIB_ARANGO} PRIVATE -Werror) + target_compile_options(arango_v8 PRIVATE -Werror) + target_compile_options(arango_geo PRIVATE -Werror) + target_compile_options(arango PRIVATE -Werror) endif() diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f66d0bb064..c08659569a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -234,11 +234,14 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL GNU) endif() target_link_libraries(arangodbtests + arango_mmfiles + arango_rocksdb + arango_cluster_engine arangoserver - rocksdb fuerte - gtest + rocksdb snappy + gtest ) target_include_directories(arangodbtests PRIVATE