-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
75 lines (55 loc) · 2.64 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
cmake_minimum_required (VERSION 3.5)
project(MPI_Ports LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif()
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
message(STATUS "Build configuration: " ${CMAKE_BUILD_TYPE})
add_subdirectory(EventTimings)
include_directories(EventTimings/include/EventTimings)
find_package (Threads REQUIRED)
find_package(MPI REQUIRED)
include_directories(${MPI_INCLUDE_PATH})
set(COMPILE_FLAGS ${COMPILE_FLAGS} ${MPI_COMPILE_FLAGS})
set(LINK_FLAGS ${LINK_FLAGS} ${MPI_LINK_FLAGS})
find_package(Boost 1.60.0
REQUIRED
COMPONENTS log log_setup program_options filesystem system thread unit_test_framework)
add_definitions(-DBOOST_ALL_DYN_LINK)
include_directories(${Boost_INCLUDE_DIRS})
# add_library(EventTimings EventTimings.cpp TableWriter.cpp)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_executable(mpiports mpiports.cpp)
target_link_libraries(mpiports ${MPI_LIBRARIES})
target_link_libraries(mpiports ${Boost_LIBRARIES})
target_link_libraries(mpiports Threads::Threads)
target_link_libraries(mpiports EventTimings)
add_executable(tests tests.cpp)
target_link_libraries(tests ${MPI_LIBRARIES})
target_link_libraries(tests ${Boost_LIBRARIES})
target_link_libraries(tests Threads::Threads)
add_executable(pub_performance publisher_performance_test.cpp)
target_link_libraries(pub_performance ${MPI_LIBRARIES})
target_link_libraries(pub_performance ${Boost_LIBRARIES})
add_executable(send_buffer send_buffer.cpp)
target_link_libraries(send_buffer ${MPI_LIBRARIES})
target_link_libraries(send_buffer ${Boost_LIBRARIES})
target_link_libraries(send_buffer Threads::Threads)
add_executable(ports_send_buffer ports_send_buffer.cpp)
target_link_libraries(ports_send_buffer ${MPI_LIBRARIES})
target_link_libraries(ports_send_buffer ${Boost_LIBRARIES})
target_link_libraries(ports_send_buffer Threads::Threads)
add_executable(ports_send_managed ports_send_managed.cpp)
target_link_libraries(ports_send_managed ${MPI_LIBRARIES})
target_link_libraries(ports_send_managed ${Boost_LIBRARIES})
target_link_libraries(ports_send_managed Threads::Threads)
add_executable(simple_mpi_ports_tester simple_mpi_ports_tester.cpp)
target_link_libraries(simple_mpi_ports_tester ${MPI_LIBRARIES})