2017-08-03 18:08:39 +08:00
|
|
|
project(distributed)
|
|
|
|
|
|
|
|
# set directory variables
|
|
|
|
set(src_dir ${PROJECT_SOURCE_DIR}/src)
|
|
|
|
set(libs_dir ${PROJECT_SOURCE_DIR}/libs)
|
|
|
|
|
|
|
|
# includes
|
2017-10-13 21:30:06 +08:00
|
|
|
include_directories(SYSTEM ${libs_dir}/cereal/include)
|
2017-08-03 18:08:39 +08:00
|
|
|
include_directories(${src_dir})
|
|
|
|
|
|
|
|
# library from distributed sources
|
|
|
|
file(GLOB_RECURSE src_files ${src_dir}/*.cpp)
|
|
|
|
add_library(distributed_lib STATIC ${src_files})
|
|
|
|
|
2017-08-24 22:50:18 +08:00
|
|
|
## distributed Memgraph executable
|
|
|
|
set(executable_name main)
|
|
|
|
add_executable(${executable_name} ${PROJECT_SOURCE_DIR}/main.cpp)
|
2017-10-13 21:30:06 +08:00
|
|
|
target_link_libraries(${executable_name} distributed_lib memgraph_lib)
|
2017-08-24 22:50:18 +08:00
|
|
|
|
|
|
|
## dummy distributed Memgraph client
|
|
|
|
set(executable_name main-client)
|
|
|
|
add_executable(${executable_name} ${PROJECT_SOURCE_DIR}/main-client.cpp)
|
2017-10-13 21:30:06 +08:00
|
|
|
target_link_libraries(${executable_name} distributed_lib memgraph_lib)
|
2017-08-03 18:08:39 +08:00
|
|
|
|
|
|
|
# tests
|
2017-10-13 21:30:06 +08:00
|
|
|
enable_testing()
|
|
|
|
add_subdirectory(tests)
|
2017-08-22 22:29:23 +08:00
|
|
|
|
2017-08-24 22:50:18 +08:00
|
|
|
# copy test scripts into the build/ directory (for distributed tests)
|
2017-11-16 21:29:19 +08:00
|
|
|
configure_file(${PROJECT_SOURCE_DIR}/tests/start_distributed
|
|
|
|
${PROJECT_BINARY_DIR}/tests/start_distributed COPYONLY)
|
2017-08-22 22:29:23 +08:00
|
|
|
|
|
|
|
configure_file(${PROJECT_SOURCE_DIR}/tests/config
|
|
|
|
${PROJECT_BINARY_DIR}/tests/config COPYONLY)
|
|
|
|
|
2017-08-24 22:50:18 +08:00
|
|
|
# copy main scripts into build/ directory (for distributed Memgraph)
|
|
|
|
configure_file(${PROJECT_SOURCE_DIR}/start_main.py
|
|
|
|
${PROJECT_BINARY_DIR}/start_main.py COPYONLY)
|
|
|
|
|
|
|
|
configure_file(${PROJECT_SOURCE_DIR}/config
|
|
|
|
${PROJECT_BINARY_DIR}/config COPYONLY)
|
|
|
|
|