Unverified Commit 158583d7 authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

cmake: cleanup link libraries and flags

parent 231bd6a0
Loading
Loading
Loading
Loading
+21 −15
Original line number Diff line number Diff line
@@ -139,19 +139,25 @@ target_include_directories(adafs_daemon PUBLIC
    ${ABT_IO_INCLUDE_DIRS}
)


if (${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
    target_link_libraries(adafs_daemon ${ROCKSDB_LIBRARIES}
target_link_libraries(adafs_daemon
    ${ROCKSDB_LIBRARIES}
    # rocksdb libs
            ${snappy_LIBRARIES} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${ZSTD_LIBRARIES} ${LZ4_LIBRARY} ${gflags_LIBRARIES}
    ${snappy_LIBRARIES}
    ${ZLIB_LIBRARIES}
    ${BZIP2_LIBRARIES}
    ${ZSTD_LIBRARIES}
    ${LZ4_LIBRARY}
    ${gflags_LIBRARIES}
    # margo libs
            ${NA_LIB} ${MERCURY_LIBRARIES} ${MERCURY_UTIL_LIBRARIES} ${ABT_LIBRARIES} ${ABT_SNOOZER_LIBRARIES} ${MARGO_LIBRARIES}
            -lpthread -lboost_system -lboost_filesystem -lboost_serialization -lboost_program_options -pg)
else ()
    target_link_libraries(adafs_daemon ${ROCKSDB_LIBRARIES}
            # rocksdb libs
            ${snappy_LIBRARIES} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${ZSTD_LIBRARIES} ${LZ4_LIBRARY} ${gflags_LIBRARIES}
            # margo libs
            ${NA_LIB} ${MERCURY_LIBRARIES} ${MERCURY_UTIL_LIBRARIES} ${ABT_LIBRARIES} ${ABT_SNOOZER_LIBRARIES} ${MARGO_LIBRARIES}
            -lpthread -lboost_system -lboost_filesystem -lboost_serialization -lboost_program_options)
endif ()
    ${NA_LIB}
    ${MERCURY_LIBRARIES}
    ${MERCURY_UTIL_LIBRARIES}
    ${ABT_LIBRARIES}
    ${ABT_SNOOZER_LIBRARIES}
    ${MARGO_LIBRARIES}
)

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

set_target_properties(adafs_daemon PROPERTIES LINK_FLAGS_MAINTAINER "-pg")
+14 −9
Original line number Diff line number Diff line
@@ -13,15 +13,20 @@ set(PRELOAD_SOURCES

add_library(iointer SHARED ${PRELOAD_SOURCES})

if (${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
    target_link_libraries(iointer dl ${NA_LIB} ${MERCURY_LIBRARIES} ${MERCURY_UTIL_LIBRARIES} ${ABT_LIBRARIES}
            ${ABT_SNOOZER_LIBRARIES} ${MARGO_LIBRARIES}
            -lpthread -lboost_system -pg)
else ()
    target_link_libraries(iointer dl ${NA_LIB} ${MERCURY_LIBRARIES} ${MERCURY_UTIL_LIBRARIES} ${ABT_LIBRARIES}
            ${ABT_SNOOZER_LIBRARIES} ${MARGO_LIBRARIES}
            -lpthread -lboost_system)
endif ()
target_link_libraries(iointer
    dl
    ${NA_LIB}
    ${MERCURY_LIBRARIES}
    ${MERCURY_UTIL_LIBRARIES}
    ${ABT_LIBRARIES}
    ${ABT_SNOOZER_LIBRARIES}
    ${MARGO_LIBRARIES}
)

set_target_properties(iointer PROPERTIES LINK_FLAGS "-lpthread -lboost_system")

# generate profile information (gprof) on maintainer build
set_target_properties(iointer PROPERTIES LINK_FLAGS_MAINTAINER "-pg")