Unverified Commit 14a4f0b4 authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

cmake: make daemon having its own cmake file

daemon related cmake directives have been pushed into a standalon cmake
file into the src/daemon folder.
parent 8adc4d68
Loading
Loading
Loading
Loading
+4 −58
Original line number Diff line number Diff line
@@ -116,63 +116,9 @@ include_directories(
    ${MERCURY_INCLUDE_DIRS}
    ${MARGO_INCLUDE_DIRS}
)
# Add client library
add_subdirectory(src/preload)

set(DAEMON_SRC
    src/global/rpc/rpc_utils.cpp
    src/daemon/adafs_daemon.cpp
    src/daemon/adafs_ops/data.cpp
    src/daemon/adafs_ops/metadentry.cpp
    src/daemon/classes/fs_data.cpp
    src/daemon/classes/rpc_data.cpp
    src/daemon/classes/metadata.cpp
    src/daemon/db/db_util.cpp
    src/daemon/db/db_ops.cpp
    src/daemon/handler/h_metadentry.cpp
    src/daemon/handler/h_data.cpp
    src/daemon/handler/h_preload.cpp
    )
set(DAEMON_HEADERS
    configure_public.hpp
    include/global/configure.hpp
    include/global/global_defs.hpp
    include/global/rpc/ipc_types.hpp
    include/global/rpc/rpc_types.hpp
    include/global/rpc/rpc_utils.hpp
    include/daemon/adafs_daemon.hpp
    include/daemon/adafs_ops/data.hpp
    include/daemon/adafs_ops/metadentry.hpp
    include/daemon/classes/fs_data.hpp
    include/daemon/classes/metadata.hpp
    include/daemon/classes/rpc_data.hpp
    include/daemon/db/db_ops.hpp
    include/daemon/db/db_util.hpp
    include/daemon/handler/rpc_defs.hpp
    )
add_executable(adafs_daemon ${DAEMON_SRC} ${DAEMON_HEADERS})
# define target specific directory includes
target_include_directories(adafs_daemon PUBLIC
    ${ABT_IO_INCLUDE_DIRS}
    ${ROCKSDB_INCLUDE_DIRS}
)
target_link_libraries(adafs_daemon
    ${ROCKSDB_LIBRARIES}
    # rocksdb libs
    ${snappy_LIBRARIES}
    ${ZLIB_LIBRARIES}
    ${BZIP2_LIBRARIES}
    ${ZSTD_LIBRARIES}
    ${LZ4_LIBRARY}
    ${gflags_LIBRARIES}
    # margo libs
    ${ABT_LIBRARIES}
    ${ABT_SNOOZER_LIBRARIES}
    ${NA_LIB}
    ${MERCURY_LIBRARIES}
    ${MERCURY_UTIL_LIBRARIES}
    ${MARGO_LIBRARIES}
)
# Daemon
add_subdirectory(src/daemon)

set_target_properties(adafs_daemon PROPERTIES LINK_FLAGS
    "-lpthread -lboost_system -lboost_filesystem -lboost_program_options")
# Client library
add_subdirectory(src/preload)
+57 −0
Original line number Diff line number Diff line
set(DAEMON_SRC
    ../global/rpc/rpc_utils.cpp
    adafs_daemon.cpp
    adafs_ops/data.cpp
    adafs_ops/metadentry.cpp
    classes/fs_data.cpp
    classes/rpc_data.cpp
    classes/metadata.cpp
    db/db_util.cpp
    db/db_ops.cpp
    handler/h_metadentry.cpp
    handler/h_data.cpp
    handler/h_preload.cpp
    )
set(DAEMON_HEADERS
    ../../configure_public.hpp
    ../../include/global/configure.hpp
    ../../include/global/global_defs.hpp
    ../../include/global/rpc/ipc_types.hpp
    ../../include/global/rpc/rpc_types.hpp
    ../../include/global/rpc/rpc_utils.hpp
    ../../include/daemon/adafs_daemon.hpp
    ../../include/daemon/adafs_ops/data.hpp
    ../../include/daemon/adafs_ops/metadentry.hpp
    ../../include/daemon/classes/fs_data.hpp
    ../../include/daemon/classes/metadata.hpp
    ../../include/daemon/classes/rpc_data.hpp
    ../../include/daemon/db/db_ops.hpp
    ../../include/daemon/db/db_util.hpp
    ../../include/daemon/handler/rpc_defs.hpp
    )
add_executable(adafs_daemon ${DAEMON_SRC} ${DAEMON_HEADERS})
# define target specific directory includes
target_include_directories(adafs_daemon PUBLIC
    ${ABT_IO_INCLUDE_DIRS}
    ${ROCKSDB_INCLUDE_DIRS}
)
target_link_libraries(adafs_daemon
    ${ROCKSDB_LIBRARIES}
    # rocksdb libs
    ${snappy_LIBRARIES}
    ${ZLIB_LIBRARIES}
    ${BZIP2_LIBRARIES}
    ${ZSTD_LIBRARIES}
    ${LZ4_LIBRARY}
    ${gflags_LIBRARIES}
    # margo libs
    ${ABT_LIBRARIES}
    ${ABT_SNOOZER_LIBRARIES}
    ${NA_LIB}
    ${MERCURY_LIBRARIES}
    ${MERCURY_UTIL_LIBRARIES}
    ${MARGO_LIBRARIES}
)

set_target_properties(adafs_daemon PROPERTIES LINK_FLAGS
    "-lpthread -lboost_system -lboost_filesystem -lboost_program_options")