Use libs from toolchain (#326)

This commit is contained in:
Antonio Andelic 2022-01-21 10:22:36 +01:00 committed by GitHub
parent e1f31d3d02
commit bb1308acc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 73 additions and 103 deletions

View File

@ -8,6 +8,15 @@ if (NPROC EQUAL 0)
set(NPROC 1) set(NPROC 1)
endif() endif()
find_package(Boost 1.78 REQUIRED)
find_package(BZip2 1.0.6 REQUIRED)
find_package(Threads REQUIRED)
set(GFLAGS_NOTHREADS OFF)
find_package(gflags REQUIRED)
find_package(fmt 8.0.1)
find_package(Jemalloc REQUIRED)
find_package(ZLIB 1.2.11 REQUIRED)
set(LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR})
# convenience functions # convenience functions
@ -109,12 +118,6 @@ import_external_library(benchmark STATIC
include(FetchContent) include(FetchContent)
# setup fmt format
FetchContent_Declare(fmt
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/fmt)
FetchContent_MakeAvailable(fmt)
# setup rapidcheck (it cannot be external, since it doesn't have install # setup rapidcheck (it cannot be external, since it doesn't have install
# target) # target)
set(RC_ENABLE_GTEST ON CACHE BOOL "Build Google Test integration" FORCE) set(RC_ENABLE_GTEST ON CACHE BOOL "Build Google Test integration" FORCE)
@ -140,58 +143,19 @@ import_library(gtest_main STATIC ${GTEST_MAIN_LIBRARY} ${GTEST_INCLUDE_DIR} gtes
import_library(gmock STATIC ${GMOCK_LIBRARY} ${GTEST_INCLUDE_DIR} gtest-proj) import_library(gmock STATIC ${GMOCK_LIBRARY} ${GTEST_INCLUDE_DIR} gtest-proj)
import_library(gmock_main STATIC ${GMOCK_MAIN_LIBRARY} ${GTEST_INCLUDE_DIR} gtest-proj) import_library(gmock_main STATIC ${GMOCK_MAIN_LIBRARY} ${GTEST_INCLUDE_DIR} gtest-proj)
# setup google flags
set(GFLAGS_NO_FILENAMES "0")
if ("${CMAKE_BUILD_TYPE}" MATCHES "^(R|r)(E|e)(L|l).+")
set(GFLAGS_NO_FILENAMES "1")
endif()
# setup google flags
import_external_library(gflags STATIC
${CMAKE_CURRENT_SOURCE_DIR}/gflags/lib/libgflags.a
${CMAKE_CURRENT_SOURCE_DIR}/gflags/include
# Not needed, since gflags is C++ only.
NO_C_COMPILER
# Don't register installation in ~/.cmake
CMAKE_ARGS -DREGISTER_INSTALL_PREFIX=OFF
-DBUILD_gflags_nothreads_LIB=OFF
-DGFLAGS_NO_FILENAMES=${GFLAGS_NO_FILENAMES})
# Setup cppitertools # Setup cppitertools
import_header_library(cppitertools ${CMAKE_CURRENT_SOURCE_DIR}) import_header_library(cppitertools ${CMAKE_CURRENT_SOURCE_DIR})
# Setup json # Setup json
import_header_library(json ${CMAKE_CURRENT_SOURCE_DIR}) import_header_library(json ${CMAKE_CURRENT_SOURCE_DIR})
# Setup bzip2
import_external_library(bzip2 STATIC
${CMAKE_CURRENT_SOURCE_DIR}/bzip2/libbz2.a
${CMAKE_CURRENT_SOURCE_DIR}/bzip2
# bzip2's Makefile has -g CFLAG which is redundant
CONFIGURE_COMMAND sed -i "s/-Wall -Winline -O2 -g/-Wall -Winline -O2/g" ${CMAKE_CURRENT_SOURCE_DIR}/bzip2/Makefile
BUILD_COMMAND make -C ${CMAKE_CURRENT_SOURCE_DIR}/bzip2
CC=${CMAKE_C_COMPILER}
CXX=${CMAKE_CXX_COMPILER}
INSTALL_COMMAND true)
# Setup zlib
set(ZLIB_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/zlib)
set(ZLIB_LIBRARIES ${ZLIB_ROOT}/lib/libz.a)
set(ZLIB_INCLUDE_DIRS ${ZLIB_ROOT}/include)
import_external_library(zlib STATIC
${ZLIB_LIBRARIES}
${ZLIB_INCLUDE_DIRS}
CMAKE_ARGS -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=true
BUILD_COMMAND $(MAKE) zlibstatic)
# Setup RocksDB # Setup RocksDB
import_external_library(rocksdb STATIC import_external_library(rocksdb STATIC
${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/lib/librocksdb.a ${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/lib/librocksdb.a
${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/include ${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/include
DEPENDS gflags-proj CMAKE_ARGS -DUSE_RTTI=ON
CMAKE_ARGS -Dgflags_DIR=${CMAKE_CURRENT_SOURCE_DIR}/gflags/lib/cmake/gflags
-DUSE_RTTI=ON
-DWITH_TESTS=OFF -DWITH_TESTS=OFF
-DGFLAGS_NOTHREADS=OFF
-DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=true -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=true
BUILD_COMMAND $(MAKE) rocksdb) BUILD_COMMAND $(MAKE) rocksdb)
@ -232,8 +196,6 @@ FetchContent_Declare(spdlog
FetchContent_MakeAvailable(spdlog) FetchContent_MakeAvailable(spdlog)
include(jemalloc.cmake)
# Setup librdkafka. # Setup librdkafka.
import_external_library(librdkafka STATIC import_external_library(librdkafka STATIC
${CMAKE_CURRENT_SOURCE_DIR}/librdkafka/lib/librdkafka.a ${CMAKE_CURRENT_SOURCE_DIR}/librdkafka/lib/librdkafka.a
@ -247,7 +209,7 @@ import_external_library(librdkafka STATIC
-DWITH_SSL=ON -DWITH_SSL=ON
# If we want SASL, we need to install it on build machines # If we want SASL, we need to install it on build machines
-DWITH_SASL=OFF) -DWITH_SASL=OFF)
target_link_libraries(librdkafka INTERFACE ${OPENSSL_LIBRARIES} zlib) target_link_libraries(librdkafka INTERFACE ${OPENSSL_LIBRARIES} ZLIB::ZLIB)
import_library(librdkafka++ STATIC import_library(librdkafka++ STATIC
${CMAKE_CURRENT_SOURCE_DIR}/librdkafka/lib/librdkafka++.a ${CMAKE_CURRENT_SOURCE_DIR}/librdkafka/lib/librdkafka++.a
@ -262,9 +224,6 @@ import_external_library(protobuf STATIC
BUILD_IN_SOURCE 1 BUILD_IN_SOURCE 1
CONFIGURE_COMMAND true) CONFIGURE_COMMAND true)
set(BOOST_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/boost/lib)
set(BOOST_ROOT ${BOOST_ROOT} PARENT_SCOPE)
import_external_library(pulsar STATIC import_external_library(pulsar STATIC
${CMAKE_CURRENT_SOURCE_DIR}/pulsar/pulsar-client-cpp/lib/libpulsarwithdeps.a ${CMAKE_CURRENT_SOURCE_DIR}/pulsar/pulsar-client-cpp/lib/libpulsarwithdeps.a
${CMAKE_CURRENT_SOURCE_DIR}/pulsar/install/include ${CMAKE_CURRENT_SOURCE_DIR}/pulsar/install/include
@ -281,10 +240,8 @@ import_external_library(pulsar STATIC
-DBOOST_ROOT=${BOOST_ROOT} -DBOOST_ROOT=${BOOST_ROOT}
-DCMAKE_PREFIX_PATH=${PROTOBUF_ROOT} -DCMAKE_PREFIX_PATH=${PROTOBUF_ROOT}
-DProtobuf_INCLUDE_DIRS=${PROTOBUF_ROOT}/include -DProtobuf_INCLUDE_DIRS=${PROTOBUF_ROOT}/include
-DZLIB_LIBRARIES=${ZLIB_LIBRARIES}
-DZLIB_INCLUDE_DIRS=${ZLIB_INCLUDE_DIRS}
-DBUILD_PYTHON_WRAPPER=OFF -DBUILD_PYTHON_WRAPPER=OFF
-DBUILD_PERF_TOOLS=OFF -DBUILD_PERF_TOOLS=OFF
-DUSE_LOG4CXX=OFF -DUSE_LOG4CXX=OFF
BUILD_COMMAND $(MAKE) pulsarStaticWithDeps) BUILD_COMMAND $(MAKE) pulsarStaticWithDeps)
add_dependencies(pulsar-proj protobuf zlib) add_dependencies(pulsar-proj protobuf)

View File

@ -172,10 +172,6 @@ popd
cppitertools_ref="cb3635456bdb531121b82b4d2e3afc7ae1f56d47" cppitertools_ref="cb3635456bdb531121b82b4d2e3afc7ae1f56d47"
repo_clone_try_double "${primary_urls[cppitertools]}" "${secondary_urls[cppitertools]}" "cppitertools" "$cppitertools_ref" repo_clone_try_double "${primary_urls[cppitertools]}" "${secondary_urls[cppitertools]}" "cppitertools" "$cppitertools_ref"
# fmt
fmt_tag="8.0.1" # (2021-07-03)
repo_clone_try_double "${primary_urls[fmt]}" "${secondary_urls[fmt]}" "fmt" "$fmt_tag" true
# rapidcheck # rapidcheck
rapidcheck_tag="7bc7d302191a4f3d0bf005692677126136e02f60" # (2020-05-04) rapidcheck_tag="7bc7d302191a4f3d0bf005692677126136e02f60" # (2020-05-04)
repo_clone_try_double "${primary_urls[rapidcheck]}" "${secondary_urls[rapidcheck]}" "rapidcheck" "$rapidcheck_tag" repo_clone_try_double "${primary_urls[rapidcheck]}" "${secondary_urls[rapidcheck]}" "rapidcheck" "$rapidcheck_tag"
@ -188,10 +184,6 @@ repo_clone_try_double "${primary_urls[gbenchmark]}" "${secondary_urls[gbenchmark
googletest_tag="release-1.8.0" googletest_tag="release-1.8.0"
repo_clone_try_double "${primary_urls[gtest]}" "${secondary_urls[gtest]}" "googletest" "$googletest_tag" true repo_clone_try_double "${primary_urls[gtest]}" "${secondary_urls[gtest]}" "googletest" "$googletest_tag" true
# google flags
gflags_tag="b37ceb03a0e56c9f15ce80409438a555f8a67b7c" # custom version (May 6, 2017)
repo_clone_try_double "${primary_urls[gflags]}" "${secondary_urls[gflags]}" "gflags" "$gflags_tag"
# libbcrypt # libbcrypt
libbcrypt_tag="8aa32ad94ebe06b76853b0767c910c9fbf7ccef4" # custom version (Dec 16, 2016) libbcrypt_tag="8aa32ad94ebe06b76853b0767c910c9fbf7ccef4" # custom version (Dec 16, 2016)
repo_clone_try_double "${primary_urls[libbcrypt]}" "${secondary_urls[libbcrypt]}" "libbcrypt" "$libbcrypt_tag" repo_clone_try_double "${primary_urls[libbcrypt]}" "${secondary_urls[libbcrypt]}" "libbcrypt" "$libbcrypt_tag"
@ -210,14 +202,6 @@ cd json
file_get_try_double "${primary_urls[nlohmann]}" "${secondary_urls[nlohmann]}" file_get_try_double "${primary_urls[nlohmann]}" "${secondary_urls[nlohmann]}"
cd .. cd ..
bzip2_tag="0405487e2b1de738e7f1c8afb50d19cf44e8d580" # v1.0.6 (May 26, 2011)
repo_clone_try_double "${primary_urls[bzip2]}" "${secondary_urls[bzip2]}" "bzip2" "$bzip2_tag"
zlib_tag="v1.2.11" # v1.2.11.
repo_clone_try_double "${primary_urls[zlib]}" "${secondary_urls[zlib]}" "zlib" "$zlib_tag" true
# remove shared library from install dependencies
sed -i 's/install(TARGETS zlib zlibstatic/install(TARGETS zlibstatic/g' zlib/CMakeLists.txt
rocksdb_tag="v6.14.6" # (2020-10-14) rocksdb_tag="v6.14.6" # (2020-10-14)
repo_clone_try_double "${primary_urls[rocksdb]}" "${secondary_urls[rocksdb]}" "rocksdb" "$rocksdb_tag" true repo_clone_try_double "${primary_urls[rocksdb]}" "${secondary_urls[rocksdb]}" "rocksdb" "$rocksdb_tag" true
pushd rocksdb pushd rocksdb
@ -240,25 +224,6 @@ repo_clone_try_double "${primary_urls[mgconsole]}" "${secondary_urls[mgconsole]}
spdlog_tag="v1.9.2" # (2021-08-12) spdlog_tag="v1.9.2" # (2021-08-12)
repo_clone_try_double "${primary_urls[spdlog]}" "${secondary_urls[spdlog]}" "spdlog" "$spdlog_tag" true repo_clone_try_double "${primary_urls[spdlog]}" "${secondary_urls[spdlog]}" "spdlog" "$spdlog_tag" true
jemalloc_tag="ea6b3e973b477b8061e0076bb257dbd7f3faa756" # (2021-02-11)
repo_clone_try_double "${primary_urls[jemalloc]}" "${secondary_urls[jemalloc]}" "jemalloc" "$jemalloc_tag"
pushd jemalloc
# ThreadPool select job randomly, and there can be some threads that had been
# performed some memory heavy task before and will be inactive for some time,
# but until it will became active again, the memory will not be freed since by
# default each thread has it's own arena, but there should be not more then
# 4*CPU arenas (see opt.nareans description).
#
# By enabling percpu_arena number of arenas limited to number of CPUs and hence
# this problem should go away.
#
# muzzy_decay_ms -- use MADV_FREE when available on newer Linuxes, to
# avoid spurious latencies and additional work associated with
# MADV_DONTNEED. See
# https://github.com/ClickHouse/ClickHouse/issues/11121 for motivation.
./autogen.sh --with-malloc-conf="percpu_arena:percpu,oversize_threshold:0,muzzy_decay_ms:5000,dirty_decay_ms:5000"
popd
# librdkafka # librdkafka
librdkafka_tag="v1.7.0" # (2021-05-06) librdkafka_tag="v1.7.0" # (2021-05-06)
repo_clone_try_double "${primary_urls[librdkafka]}" "${secondary_urls[librdkafka]}" "librdkafka" "$librdkafka_tag" true repo_clone_try_double "${primary_urls[librdkafka]}" "${secondary_urls[librdkafka]}" "librdkafka" "$librdkafka_tag" true
@ -270,15 +235,6 @@ pushd protobuf
./autogen.sh && ./configure CC=clang CXX=clang++ --prefix=$(pwd)/lib ./autogen.sh && ./configure CC=clang CXX=clang++ --prefix=$(pwd)/lib
popd popd
# boost
file_get_try_double "${primary_urls[boost]}" "${secondary_urls[boost]}"
tar -xzf boost_1_77_0.tar.gz
mv boost_1_77_0 boost
pushd boost
./bootstrap.sh --prefix=$(pwd)/lib --with-libraries="system,regex" --with-toolset=clang
./b2 toolset=clang -j$(nproc) install variant=release
popd
#pulsar #pulsar
pulsar_tag="v2.8.1" pulsar_tag="v2.8.1"
repo_clone_try_double "${primary_urls[pulsar]}" "${secondary_urls[pulsar]}" "pulsar" "$pulsar_tag" true repo_clone_try_double "${primary_urls[pulsar]}" "${secondary_urls[pulsar]}" "pulsar" "$pulsar_tag" true

View File

@ -1,5 +1,8 @@
set(audit_src_files log.cpp) set(audit_src_files log.cpp)
find_package(fmt REQUIRED)
find_package(gflags REQUIRED)
add_library(mg-audit STATIC ${audit_src_files}) add_library(mg-audit STATIC ${audit_src_files})
target_link_libraries(mg-audit json gflags fmt::fmt) target_link_libraries(mg-audit json gflags fmt::fmt)
target_link_libraries(mg-audit mg-utils mg-storage-v2) target_link_libraries(mg-audit mg-utils mg-storage-v2)

View File

@ -5,6 +5,9 @@ set(auth_src_files
module.cpp) module.cpp)
find_package(Seccomp REQUIRED) find_package(Seccomp REQUIRED)
find_package(fmt REQUIRED)
find_package(gflags REQUIRED)
add_library(mg-auth STATIC ${auth_src_files}) add_library(mg-auth STATIC ${auth_src_files})
target_link_libraries(mg-auth json libbcrypt gflags fmt::fmt) target_link_libraries(mg-auth json libbcrypt gflags fmt::fmt)

View File

@ -1,3 +1,6 @@
find_package(fmt REQUIRED)
find_package(gflags REQUIRED)
set(communication_src_files set(communication_src_files
bolt/v1/value.cpp bolt/v1/value.cpp
buffer.cpp buffer.cpp

View File

@ -4,5 +4,8 @@ set(io_src_files
network/socket.cpp network/socket.cpp
network/utils.cpp) network/utils.cpp)
find_package(fmt REQUIRED)
find_package(Threads REQUIRED)
add_library(mg-io STATIC ${io_src_files}) add_library(mg-io STATIC ${io_src_files})
target_link_libraries(mg-io stdc++fs Threads::Threads fmt::fmt mg-utils) target_link_libraries(mg-io stdc++fs Threads::Threads fmt::fmt mg-utils)

View File

@ -1,6 +1,10 @@
find_package(gflags REQUIRED)
find_package(BZip2 REQUIRED)
find_package(ZLIB REQUIRED)
# STATIC library used to store key-value pairs # STATIC library used to store key-value pairs
add_library(mg-kvstore STATIC kvstore.cpp) add_library(mg-kvstore STATIC kvstore.cpp)
target_link_libraries(mg-kvstore stdc++fs mg-utils rocksdb bzip2 zlib gflags) target_link_libraries(mg-kvstore stdc++fs mg-utils rocksdb BZip2::BZip2 ZLIB::ZLIB gflags)
# STATIC library for dummy key-value storage # STATIC library for dummy key-value storage
# add_library(mg-kvstore-dummy STATIC kvstore_dummy.cpp) # add_library(mg-kvstore-dummy STATIC kvstore_dummy.cpp)

View File

@ -2,9 +2,11 @@ set(memory_src_files
new_delete.cpp new_delete.cpp
memory_control.cpp) memory_control.cpp)
find_package(Jemalloc REQUIRED)
add_library(mg-memory STATIC ${memory_src_files}) add_library(mg-memory STATIC ${memory_src_files})
target_link_libraries(mg-memory mg-utils fmt) target_link_libraries(mg-memory mg-utils fmt)
if (ENABLE_JEMALLOC) if (ENABLE_JEMALLOC)
target_link_libraries(mg-memory jemalloc) target_link_libraries(mg-memory Jemalloc::Jemalloc)
endif() endif()

View File

@ -2,6 +2,9 @@ set(requests_src_files
requests.cpp) requests.cpp)
find_package(CURL REQUIRED) find_package(CURL REQUIRED)
find_package(fmt REQUIRED)
find_package(gflags REQUIRED)
add_library(mg-requests STATIC ${requests_src_files}) add_library(mg-requests STATIC ${requests_src_files})
target_link_libraries(mg-requests mg-utils spdlog::spdlog fmt::fmt gflags json ${CURL_LIBRARIES}) target_link_libraries(mg-requests mg-utils spdlog::spdlog fmt::fmt gflags json ${CURL_LIBRARIES})

View File

@ -3,6 +3,9 @@ set(rpc_src_files
protocol.cpp protocol.cpp
server.cpp) server.cpp)
find_package(fmt REQUIRED)
find_package(gflags REQUIRED)
add_library(mg-rpc STATIC ${rpc_src_files}) add_library(mg-rpc STATIC ${rpc_src_files})
target_link_libraries(mg-rpc Threads::Threads mg-communication mg-utils mg-io fmt::fmt gflags) target_link_libraries(mg-rpc Threads::Threads mg-communication mg-utils mg-io fmt::fmt gflags)
target_link_libraries(mg-rpc mg-slk) target_link_libraries(mg-rpc mg-slk)

View File

@ -1,6 +1,8 @@
set(slk_src_files set(slk_src_files
streams.cpp) streams.cpp)
find_package(gflags REQUIRED)
add_library(mg-slk STATIC ${slk_src_files}) add_library(mg-slk STATIC ${slk_src_files})
target_link_libraries(mg-slk gflags) target_link_libraries(mg-slk gflags)
target_link_libraries(mg-slk mg-utils) target_link_libraries(mg-slk mg-utils)

View File

@ -30,6 +30,9 @@ set(storage_v2_src_files
####################### #######################
find_package(gflags REQUIRED)
find_package(Threads REQUIRED)
add_library(mg-storage-v2 STATIC ${storage_v2_src_files}) add_library(mg-storage-v2 STATIC ${storage_v2_src_files})
target_link_libraries(mg-storage-v2 Threads::Threads mg-utils gflags) target_link_libraries(mg-storage-v2 Threads::Threads mg-utils gflags)

View File

@ -16,6 +16,9 @@ set(utils_src_files
uuid.cpp) uuid.cpp)
find_package(Boost REQUIRED) find_package(Boost REQUIRED)
find_package(fmt REQUIRED)
find_package(gflags REQUIRED)
find_package(Threads REQUIRED)
add_library(mg-utils STATIC ${utils_src_files}) add_library(mg-utils STATIC ${utils_src_files})
target_link_libraries(mg-utils PUBLIC Boost::headers fmt::fmt spdlog::spdlog) target_link_libraries(mg-utils PUBLIC Boost::headers fmt::fmt spdlog::spdlog)

View File

@ -1,5 +1,7 @@
set(test_prefix memgraph__benchmark__) set(test_prefix memgraph__benchmark__)
find_package(gflags REQUIRED)
add_custom_target(memgraph__benchmark) add_custom_target(memgraph__benchmark)
function(add_benchmark test_cpp) function(add_benchmark test_cpp)

View File

@ -1,5 +1,7 @@
set(test_prefix memgraph__concurrent__) set(test_prefix memgraph__concurrent__)
find_package(gflags)
add_custom_target(memgraph__concurrent) add_custom_target(memgraph__concurrent)
function(add_concurrent_test test_cpp) function(add_concurrent_test test_cpp)

View File

@ -1,2 +1,4 @@
find_package(gflags REQUIRED)
add_executable(memgraph__e2e__isolation_levels isolation_levels.cpp) add_executable(memgraph__e2e__isolation_levels isolation_levels.cpp)
target_link_libraries(memgraph__e2e__isolation_levels gflags mgclient mg-utils mg-io Threads::Threads) target_link_libraries(memgraph__e2e__isolation_levels gflags mgclient mg-utils mg-io Threads::Threads)

View File

@ -1,5 +1,7 @@
add_subdirectory(procedures) add_subdirectory(procedures)
find_package(gflags REQUIRED)
add_executable(memgraph__e2e__memory__control memory_control.cpp) add_executable(memgraph__e2e__memory__control memory_control.cpp)
target_link_libraries(memgraph__e2e__memory__control gflags mgclient mg-utils mg-io Threads::Threads) target_link_libraries(memgraph__e2e__memory__control gflags mgclient mg-utils mg-io Threads::Threads)

View File

@ -1,3 +1,5 @@
find_package(gflags REQUIRED)
add_executable(memgraph__e2e__replication__constraints constraints.cpp) add_executable(memgraph__e2e__replication__constraints constraints.cpp)
target_link_libraries(memgraph__e2e__replication__constraints gflags mgclient mg-utils mg-io Threads::Threads) target_link_libraries(memgraph__e2e__replication__constraints gflags mgclient mg-utils mg-io Threads::Threads)

View File

@ -1,3 +1,6 @@
find_package(gflags REQUIRED)
add_executable(memgraph__e2e__temporal_roundtrip roundtrip.cpp) add_executable(memgraph__e2e__temporal_roundtrip roundtrip.cpp)
target_link_libraries(memgraph__e2e__temporal_roundtrip PUBLIC mgclient mg-utils gflags) target_link_libraries(memgraph__e2e__temporal_roundtrip PUBLIC mgclient mg-utils gflags)

View File

@ -1,3 +1,5 @@
find_package(gflags REQUIRED)
add_library(memgraph__e2e__triggers_common STATIC common.hpp common.cpp) add_library(memgraph__e2e__triggers_common STATIC common.hpp common.cpp)
target_link_libraries(memgraph__e2e__triggers_common PUBLIC gflags mgclient mg-utils) target_link_libraries(memgraph__e2e__triggers_common PUBLIC gflags mgclient mg-utils)

View File

@ -1,5 +1,7 @@
set(test_prefix memgraph__manual__) set(test_prefix memgraph__manual__)
find_package(gflags REQUIRED)
add_custom_target(memgraph__manual) add_custom_target(memgraph__manual)
function(add_manual_test test_cpp) function(add_manual_test test_cpp)

View File

@ -1,5 +1,9 @@
set(test_prefix memgraph__unit__) set(test_prefix memgraph__unit__)
find_package(fmt REQUIRED)
find_package(gflags REQUIRED)
find_package(Threads REQUIRED)
add_custom_target(memgraph__unit) add_custom_target(memgraph__unit)
set(memgraph_unit_main main.cpp) set(memgraph_unit_main main.cpp)

View File

@ -3,10 +3,14 @@ set(VERSION_STRING ${MEMGRAPH_VERSION})
configure_file(../../src/version.hpp.in version.hpp @ONLY) configure_file(../../src/version.hpp.in version.hpp @ONLY)
include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR})
find_package(gflags REQUIRED)
find_package(fmt REQUIRED)
find_package(Threads REQUIRED)
# Memgraph Dump Target # Memgraph Dump Target
add_executable(mg_dump mg_dump/main.cpp) add_executable(mg_dump mg_dump/main.cpp)
target_include_directories(mg_dump PRIVATE ${MGCLIENT_INCLUDE_DIR}) target_include_directories(mg_dump PRIVATE ${MGCLIENT_INCLUDE_DIR})
target_link_libraries(mg_dump gflags spdlog fmt mgclient pthread) target_link_libraries(mg_dump gflags spdlog fmt::fmt mgclient Threads::Threads)
install(TARGETS mg_dump RUNTIME DESTINATION bin) install(TARGETS mg_dump RUNTIME DESTINATION bin)
# Target for building all the tool executables. # Target for building all the tool executables.