2018-02-02 18:11:06 +08:00
|
|
|
# CSV Import Tool Target
|
2017-12-04 20:56:17 +08:00
|
|
|
add_executable(mg_import_csv mg_import_csv/main.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(mg_import_csv mg-single-node kvstore_dummy_lib)
|
2017-09-22 19:46:06 +08:00
|
|
|
|
2018-02-02 18:11:06 +08:00
|
|
|
# StatsD Target
|
|
|
|
add_executable(mg_statsd mg_statsd/main.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(mg_statsd mg-communication mg-io mg-utils mg-stats)
|
2018-02-02 18:11:06 +08:00
|
|
|
|
2018-10-15 21:03:16 +08:00
|
|
|
# Generate a version.hpp file
|
|
|
|
set(VERSION_STRING ${memgraph_VERSION})
|
|
|
|
configure_file(../../src/version.hpp.in version.hpp @ONLY)
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
2018-10-02 18:36:11 +08:00
|
|
|
# Memgraph Client Target
|
|
|
|
add_executable(mg_client mg_client/main.cpp)
|
|
|
|
set(CLIENT_LIBS mg-communication mg-io mg-utils)
|
|
|
|
if (READLINE_FOUND)
|
|
|
|
list(APPEND CLIENT_LIBS readline)
|
|
|
|
endif()
|
|
|
|
target_link_libraries(mg_client ${CLIENT_LIBS})
|
|
|
|
|
2019-05-27 21:33:03 +08:00
|
|
|
# Memgraph Dump Target
|
|
|
|
add_executable(mg_dump mg_dump/main.cpp)
|
2019-06-11 22:19:06 +08:00
|
|
|
target_include_directories(mg_dump PRIVATE ${MGCLIENT_INCLUDE_DIR})
|
|
|
|
target_link_libraries(mg_dump fmt gflags glog mgclient pthread)
|
2018-10-15 21:03:16 +08:00
|
|
|
|
2017-10-06 17:08:36 +08:00
|
|
|
# Strip the executable in release build.
|
|
|
|
string(TOLOWER ${CMAKE_BUILD_TYPE} lower_build_type)
|
|
|
|
if (lower_build_type STREQUAL "release")
|
2017-10-25 21:28:10 +08:00
|
|
|
add_custom_command(TARGET mg_import_csv POST_BUILD
|
|
|
|
COMMAND strip -s mg_import_csv
|
|
|
|
COMMENT Stripping symbols and sections from mg_import_csv)
|
2018-10-02 18:36:11 +08:00
|
|
|
add_custom_command(TARGET mg_client POST_BUILD
|
|
|
|
COMMAND strip -s mg_client
|
|
|
|
COMMENT Stripping symbols and sections from mg_client)
|
2017-10-06 17:08:36 +08:00
|
|
|
endif()
|
|
|
|
|
2019-12-05 20:24:30 +08:00
|
|
|
# TODO (mferencevic): Currently the `mg_import_csv` tool is tailored to the old
|
|
|
|
# storage and doesn't work with storage-v2.
|
|
|
|
# install(TARGETS mg_import_csv RUNTIME DESTINATION bin)
|
2018-10-02 18:36:11 +08:00
|
|
|
install(TARGETS mg_client RUNTIME DESTINATION bin)
|
2017-12-04 20:56:17 +08:00
|
|
|
|
|
|
|
# Target for building all the tool executables.
|
2019-06-11 22:19:06 +08:00
|
|
|
add_custom_target(tools DEPENDS mg_import_csv mg_statsd mg_client mg_dump)
|