Skip to content

Commit

Permalink
Enable build without PDA library.
Browse files Browse the repository at this point in the history
  • Loading branch information
cuveland committed Nov 6, 2016
1 parent 6c07574 commit 0893c92
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ find_package(Boost 1.54.0 REQUIRED COMPONENTS filesystem log program_options ser
find_package(Threads REQUIRED)

find_package(RDMA)
find_package(PDA 11.1.7 EXACT)
find_package(NUMA)
find_package(Doxygen)

Expand All @@ -35,6 +36,11 @@ if(USE_RDMA AND NOT RDMA_FOUND)
message(STATUS "Libraries not found: rdma. Building without RDMA transport.")
endif()

set(USE_PDA TRUE CACHE BOOL "Use libpda and build FLIB interface.")
if(USE_PDA AND NOT PDA_FOUND)
message(STATUS "Library not found: libpda. Building without FLIB interface.")
endif()

set(USE_NUMA TRUE CACHE BOOL "Use libnuma to schedule on specific NUMA nodes.")
if(USE_NUMA AND NOT NUMA_FOUND)
message(STATUS "Library not found: libnuma. Building without.")
Expand All @@ -61,29 +67,28 @@ add_subdirectory(lib/fles_ipc)
add_subdirectory(lib/fles_core)
add_subdirectory(lib/flib_ipc)
add_subdirectory(lib/fles_zeromq)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_subdirectory(app/tsclient)
add_subdirectory(app/mstool)
unset(CMAKE_RUNTIME_OUTPUT_DIRECTORY)

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
find_package(PDA 11.1.7 REQUIRED)

if (USE_RDMA AND RDMA_FOUND)
add_subdirectory(lib/fles_rdma)
endif()
if (USE_PDA AND PDA_FOUND)
add_subdirectory(lib/flib)
add_subdirectory(lib/pda)
endif()

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_subdirectory(app/tsclient)
add_subdirectory(app/mstool)
if (USE_RDMA AND RDMA_FOUND)
add_subdirectory(app/flesnet)
endif()
if (USE_PDA AND PDA_FOUND)
add_subdirectory(app/flib_tools)
add_subdirectory(app/flib_cfg)
add_subdirectory(app/flib_server)
unset(CMAKE_RUNTIME_OUTPUT_DIRECTORY)

add_subdirectory(contrib)
endif()
unset(CMAKE_RUNTIME_OUTPUT_DIRECTORY)

add_subdirectory(contrib)
if (USE_DOXYGEN AND DOXYGEN_FOUND)
add_subdirectory(doc)
endif()
Expand Down

0 comments on commit 0893c92

Please sign in to comment.