From bb1308acc7faeb010764ec06eeb587847bc47610 Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Fri, 21 Jan 2022 10:22:36 +0100 Subject: [PATCH] Use libs from toolchain (#326) --- libs/CMakeLists.txt | 69 +++++------------------ libs/setup.sh | 44 --------------- src/audit/CMakeLists.txt | 3 + src/auth/CMakeLists.txt | 3 + src/communication/CMakeLists.txt | 3 + src/io/CMakeLists.txt | 3 + src/kvstore/CMakeLists.txt | 6 +- src/memory/CMakeLists.txt | 4 +- src/requests/CMakeLists.txt | 3 + src/rpc/CMakeLists.txt | 3 + src/slk/CMakeLists.txt | 2 + src/storage/v2/CMakeLists.txt | 3 + src/utils/CMakeLists.txt | 3 + tests/benchmark/CMakeLists.txt | 2 + tests/concurrent/CMakeLists.txt | 2 + tests/e2e/isolation_levels/CMakeLists.txt | 2 + tests/e2e/memory/CMakeLists.txt | 2 + tests/e2e/replication/CMakeLists.txt | 2 + tests/e2e/temporal_types/CMakeLists.txt | 3 + tests/e2e/triggers/CMakeLists.txt | 2 + tests/manual/CMakeLists.txt | 2 + tests/unit/CMakeLists.txt | 4 ++ tools/src/CMakeLists.txt | 6 +- 23 files changed, 73 insertions(+), 103 deletions(-) diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt index 5c8a68e38..849810373 100644 --- a/libs/CMakeLists.txt +++ b/libs/CMakeLists.txt @@ -8,6 +8,15 @@ if (NPROC EQUAL 0) set(NPROC 1) 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}) # convenience functions @@ -109,12 +118,6 @@ import_external_library(benchmark STATIC 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 # target) 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_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 import_header_library(cppitertools ${CMAKE_CURRENT_SOURCE_DIR}) # Setup json 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 import_external_library(rocksdb STATIC ${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/lib/librocksdb.a ${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/include - DEPENDS gflags-proj - CMAKE_ARGS -Dgflags_DIR=${CMAKE_CURRENT_SOURCE_DIR}/gflags/lib/cmake/gflags - -DUSE_RTTI=ON + CMAKE_ARGS -DUSE_RTTI=ON -DWITH_TESTS=OFF + -DGFLAGS_NOTHREADS=OFF -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=true BUILD_COMMAND $(MAKE) rocksdb) @@ -232,8 +196,6 @@ FetchContent_Declare(spdlog FetchContent_MakeAvailable(spdlog) -include(jemalloc.cmake) - # Setup librdkafka. import_external_library(librdkafka STATIC ${CMAKE_CURRENT_SOURCE_DIR}/librdkafka/lib/librdkafka.a @@ -247,7 +209,7 @@ import_external_library(librdkafka STATIC -DWITH_SSL=ON # If we want SASL, we need to install it on build machines -DWITH_SASL=OFF) -target_link_libraries(librdkafka INTERFACE ${OPENSSL_LIBRARIES} zlib) +target_link_libraries(librdkafka INTERFACE ${OPENSSL_LIBRARIES} ZLIB::ZLIB) import_library(librdkafka++ STATIC ${CMAKE_CURRENT_SOURCE_DIR}/librdkafka/lib/librdkafka++.a @@ -262,9 +224,6 @@ import_external_library(protobuf STATIC BUILD_IN_SOURCE 1 CONFIGURE_COMMAND true) -set(BOOST_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/boost/lib) -set(BOOST_ROOT ${BOOST_ROOT} PARENT_SCOPE) - import_external_library(pulsar STATIC ${CMAKE_CURRENT_SOURCE_DIR}/pulsar/pulsar-client-cpp/lib/libpulsarwithdeps.a ${CMAKE_CURRENT_SOURCE_DIR}/pulsar/install/include @@ -281,10 +240,8 @@ import_external_library(pulsar STATIC -DBOOST_ROOT=${BOOST_ROOT} -DCMAKE_PREFIX_PATH=${PROTOBUF_ROOT} -DProtobuf_INCLUDE_DIRS=${PROTOBUF_ROOT}/include - -DZLIB_LIBRARIES=${ZLIB_LIBRARIES} - -DZLIB_INCLUDE_DIRS=${ZLIB_INCLUDE_DIRS} -DBUILD_PYTHON_WRAPPER=OFF -DBUILD_PERF_TOOLS=OFF -DUSE_LOG4CXX=OFF BUILD_COMMAND $(MAKE) pulsarStaticWithDeps) -add_dependencies(pulsar-proj protobuf zlib) +add_dependencies(pulsar-proj protobuf) diff --git a/libs/setup.sh b/libs/setup.sh index 4a75cfe6a..3f9bee615 100755 --- a/libs/setup.sh +++ b/libs/setup.sh @@ -172,10 +172,6 @@ popd cppitertools_ref="cb3635456bdb531121b82b4d2e3afc7ae1f56d47" 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_tag="7bc7d302191a4f3d0bf005692677126136e02f60" # (2020-05-04) 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" 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_tag="8aa32ad94ebe06b76853b0767c910c9fbf7ccef4" # custom version (Dec 16, 2016) 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]}" 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) repo_clone_try_double "${primary_urls[rocksdb]}" "${secondary_urls[rocksdb]}" "rocksdb" "$rocksdb_tag" true pushd rocksdb @@ -240,25 +224,6 @@ repo_clone_try_double "${primary_urls[mgconsole]}" "${secondary_urls[mgconsole]} spdlog_tag="v1.9.2" # (2021-08-12) 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_tag="v1.7.0" # (2021-05-06) 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 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_tag="v2.8.1" repo_clone_try_double "${primary_urls[pulsar]}" "${secondary_urls[pulsar]}" "pulsar" "$pulsar_tag" true diff --git a/src/audit/CMakeLists.txt b/src/audit/CMakeLists.txt index ec1e68269..debfc9132 100644 --- a/src/audit/CMakeLists.txt +++ b/src/audit/CMakeLists.txt @@ -1,5 +1,8 @@ set(audit_src_files log.cpp) +find_package(fmt REQUIRED) +find_package(gflags REQUIRED) + add_library(mg-audit STATIC ${audit_src_files}) target_link_libraries(mg-audit json gflags fmt::fmt) target_link_libraries(mg-audit mg-utils mg-storage-v2) diff --git a/src/auth/CMakeLists.txt b/src/auth/CMakeLists.txt index 65d471f8b..f70d60d36 100644 --- a/src/auth/CMakeLists.txt +++ b/src/auth/CMakeLists.txt @@ -5,6 +5,9 @@ set(auth_src_files module.cpp) find_package(Seccomp REQUIRED) +find_package(fmt REQUIRED) +find_package(gflags REQUIRED) + add_library(mg-auth STATIC ${auth_src_files}) target_link_libraries(mg-auth json libbcrypt gflags fmt::fmt) diff --git a/src/communication/CMakeLists.txt b/src/communication/CMakeLists.txt index 73721cb2d..f782ede1c 100644 --- a/src/communication/CMakeLists.txt +++ b/src/communication/CMakeLists.txt @@ -1,3 +1,6 @@ +find_package(fmt REQUIRED) +find_package(gflags REQUIRED) + set(communication_src_files bolt/v1/value.cpp buffer.cpp diff --git a/src/io/CMakeLists.txt b/src/io/CMakeLists.txt index 46b7adefe..128e87114 100644 --- a/src/io/CMakeLists.txt +++ b/src/io/CMakeLists.txt @@ -4,5 +4,8 @@ set(io_src_files network/socket.cpp network/utils.cpp) +find_package(fmt REQUIRED) +find_package(Threads REQUIRED) + add_library(mg-io STATIC ${io_src_files}) target_link_libraries(mg-io stdc++fs Threads::Threads fmt::fmt mg-utils) diff --git a/src/kvstore/CMakeLists.txt b/src/kvstore/CMakeLists.txt index c46df512e..f67101b9e 100644 --- a/src/kvstore/CMakeLists.txt +++ b/src/kvstore/CMakeLists.txt @@ -1,6 +1,10 @@ +find_package(gflags REQUIRED) +find_package(BZip2 REQUIRED) +find_package(ZLIB REQUIRED) + # STATIC library used to store key-value pairs 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 # add_library(mg-kvstore-dummy STATIC kvstore_dummy.cpp) diff --git a/src/memory/CMakeLists.txt b/src/memory/CMakeLists.txt index 490786494..e9de76efe 100644 --- a/src/memory/CMakeLists.txt +++ b/src/memory/CMakeLists.txt @@ -2,9 +2,11 @@ set(memory_src_files new_delete.cpp memory_control.cpp) +find_package(Jemalloc REQUIRED) + add_library(mg-memory STATIC ${memory_src_files}) target_link_libraries(mg-memory mg-utils fmt) if (ENABLE_JEMALLOC) - target_link_libraries(mg-memory jemalloc) + target_link_libraries(mg-memory Jemalloc::Jemalloc) endif() diff --git a/src/requests/CMakeLists.txt b/src/requests/CMakeLists.txt index c536d973a..5ae3469e4 100644 --- a/src/requests/CMakeLists.txt +++ b/src/requests/CMakeLists.txt @@ -2,6 +2,9 @@ set(requests_src_files requests.cpp) find_package(CURL REQUIRED) +find_package(fmt REQUIRED) +find_package(gflags REQUIRED) + add_library(mg-requests STATIC ${requests_src_files}) target_link_libraries(mg-requests mg-utils spdlog::spdlog fmt::fmt gflags json ${CURL_LIBRARIES}) diff --git a/src/rpc/CMakeLists.txt b/src/rpc/CMakeLists.txt index b1a667b17..cdfa42455 100644 --- a/src/rpc/CMakeLists.txt +++ b/src/rpc/CMakeLists.txt @@ -3,6 +3,9 @@ set(rpc_src_files protocol.cpp server.cpp) +find_package(fmt REQUIRED) +find_package(gflags REQUIRED) + 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 mg-slk) diff --git a/src/slk/CMakeLists.txt b/src/slk/CMakeLists.txt index ff6a66e4f..81570e1d9 100644 --- a/src/slk/CMakeLists.txt +++ b/src/slk/CMakeLists.txt @@ -1,6 +1,8 @@ set(slk_src_files streams.cpp) +find_package(gflags REQUIRED) + add_library(mg-slk STATIC ${slk_src_files}) target_link_libraries(mg-slk gflags) target_link_libraries(mg-slk mg-utils) diff --git a/src/storage/v2/CMakeLists.txt b/src/storage/v2/CMakeLists.txt index 5de28e244..f33a8553d 100644 --- a/src/storage/v2/CMakeLists.txt +++ b/src/storage/v2/CMakeLists.txt @@ -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}) target_link_libraries(mg-storage-v2 Threads::Threads mg-utils gflags) diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index 12312269b..caf59c597 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -16,6 +16,9 @@ set(utils_src_files uuid.cpp) find_package(Boost REQUIRED) +find_package(fmt REQUIRED) +find_package(gflags REQUIRED) +find_package(Threads REQUIRED) add_library(mg-utils STATIC ${utils_src_files}) target_link_libraries(mg-utils PUBLIC Boost::headers fmt::fmt spdlog::spdlog) diff --git a/tests/benchmark/CMakeLists.txt b/tests/benchmark/CMakeLists.txt index 55178b7ae..4bf8374b0 100644 --- a/tests/benchmark/CMakeLists.txt +++ b/tests/benchmark/CMakeLists.txt @@ -1,5 +1,7 @@ set(test_prefix memgraph__benchmark__) +find_package(gflags REQUIRED) + add_custom_target(memgraph__benchmark) function(add_benchmark test_cpp) diff --git a/tests/concurrent/CMakeLists.txt b/tests/concurrent/CMakeLists.txt index eaf9b73ac..7db54ac5c 100644 --- a/tests/concurrent/CMakeLists.txt +++ b/tests/concurrent/CMakeLists.txt @@ -1,5 +1,7 @@ set(test_prefix memgraph__concurrent__) +find_package(gflags) + add_custom_target(memgraph__concurrent) function(add_concurrent_test test_cpp) diff --git a/tests/e2e/isolation_levels/CMakeLists.txt b/tests/e2e/isolation_levels/CMakeLists.txt index d2441aced..a5f31a79d 100644 --- a/tests/e2e/isolation_levels/CMakeLists.txt +++ b/tests/e2e/isolation_levels/CMakeLists.txt @@ -1,2 +1,4 @@ +find_package(gflags REQUIRED) + add_executable(memgraph__e2e__isolation_levels isolation_levels.cpp) target_link_libraries(memgraph__e2e__isolation_levels gflags mgclient mg-utils mg-io Threads::Threads) diff --git a/tests/e2e/memory/CMakeLists.txt b/tests/e2e/memory/CMakeLists.txt index 95f3a145c..700e8d882 100644 --- a/tests/e2e/memory/CMakeLists.txt +++ b/tests/e2e/memory/CMakeLists.txt @@ -1,5 +1,7 @@ add_subdirectory(procedures) +find_package(gflags REQUIRED) + add_executable(memgraph__e2e__memory__control memory_control.cpp) target_link_libraries(memgraph__e2e__memory__control gflags mgclient mg-utils mg-io Threads::Threads) diff --git a/tests/e2e/replication/CMakeLists.txt b/tests/e2e/replication/CMakeLists.txt index d18f0605b..37ab02725 100644 --- a/tests/e2e/replication/CMakeLists.txt +++ b/tests/e2e/replication/CMakeLists.txt @@ -1,3 +1,5 @@ +find_package(gflags REQUIRED) + add_executable(memgraph__e2e__replication__constraints constraints.cpp) target_link_libraries(memgraph__e2e__replication__constraints gflags mgclient mg-utils mg-io Threads::Threads) diff --git a/tests/e2e/temporal_types/CMakeLists.txt b/tests/e2e/temporal_types/CMakeLists.txt index ba64bd403..aad9561fe 100644 --- a/tests/e2e/temporal_types/CMakeLists.txt +++ b/tests/e2e/temporal_types/CMakeLists.txt @@ -1,3 +1,6 @@ + +find_package(gflags REQUIRED) + add_executable(memgraph__e2e__temporal_roundtrip roundtrip.cpp) target_link_libraries(memgraph__e2e__temporal_roundtrip PUBLIC mgclient mg-utils gflags) diff --git a/tests/e2e/triggers/CMakeLists.txt b/tests/e2e/triggers/CMakeLists.txt index f3dd39922..625d0d574 100644 --- a/tests/e2e/triggers/CMakeLists.txt +++ b/tests/e2e/triggers/CMakeLists.txt @@ -1,3 +1,5 @@ +find_package(gflags REQUIRED) + add_library(memgraph__e2e__triggers_common STATIC common.hpp common.cpp) target_link_libraries(memgraph__e2e__triggers_common PUBLIC gflags mgclient mg-utils) diff --git a/tests/manual/CMakeLists.txt b/tests/manual/CMakeLists.txt index 37540a5da..0a46b8e60 100644 --- a/tests/manual/CMakeLists.txt +++ b/tests/manual/CMakeLists.txt @@ -1,5 +1,7 @@ set(test_prefix memgraph__manual__) +find_package(gflags REQUIRED) + add_custom_target(memgraph__manual) function(add_manual_test test_cpp) diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index 1094fea1d..4994d4711 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -1,5 +1,9 @@ set(test_prefix memgraph__unit__) +find_package(fmt REQUIRED) +find_package(gflags REQUIRED) +find_package(Threads REQUIRED) + add_custom_target(memgraph__unit) set(memgraph_unit_main main.cpp) diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt index 82b89c1c9..fcb407333 100644 --- a/tools/src/CMakeLists.txt +++ b/tools/src/CMakeLists.txt @@ -3,10 +3,14 @@ set(VERSION_STRING ${MEMGRAPH_VERSION}) configure_file(../../src/version.hpp.in version.hpp @ONLY) include_directories(${CMAKE_CURRENT_BINARY_DIR}) +find_package(gflags REQUIRED) +find_package(fmt REQUIRED) +find_package(Threads REQUIRED) + # Memgraph Dump Target add_executable(mg_dump mg_dump/main.cpp) 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) # Target for building all the tool executables.