Unverified Commit 922f3398 authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

cmake: find packages (Boost & pthread)

Use cmake in order to properly check and use both the Boost library and
the pthread one.
parent e4163dae
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -55,6 +55,11 @@ find_package(Abt REQUIRED)
find_package(Abt-Snoozer REQUIRED)
find_package(Margo REQUIRED)

# boost dependencies, system is required for filesystem
find_package(Boost 1.53 REQUIRED COMPONENTS system filesystem program_options)

find_package(Threads REQUIRED)

option(USE_OFI_VERBS "Use libfabric plugin with verbs." OFF)
if (USE_OFI_VERBS)
    find_package(LibFabric REQUIRED)
@@ -104,8 +109,6 @@ if (NOT USE_OFI_VERBS AND NOT USE_OFI_PSM2 AND NOT USE_CCI AND NOT USE_BMI)
            )
    add_definitions(-DRPC_PROTOCOL="bmi+tcp")
endif()
# boost dependencies, system is required for filesystem
find_package(Boost 1.53 REQUIRED COMPONENTS system filesystem)

# define include directories that are relevant for all targets
include_directories(
+2 −3
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ target_link_libraries(adafs_daemon
    ${MERCURY_LIBRARIES}
    ${MERCURY_UTIL_LIBRARIES}
    ${MARGO_LIBRARIES}
    ${Boost_LIBRARIES}
    Threads::Threads
)

set_target_properties(adafs_daemon PROPERTIES LINK_FLAGS
    "-lpthread -lboost_system -lboost_filesystem -lboost_program_options")
+2 −2
Original line number Diff line number Diff line
@@ -37,6 +37,6 @@ target_link_libraries(adafs_preload_client
    ${MERCURY_LIBRARIES}
    ${MERCURY_UTIL_LIBRARIES}
    ${MARGO_LIBRARIES}
    ${Boost_LIBRARIES}
    Threads::Threads
)

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