-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
67 lines (50 loc) · 1.54 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
cmake_minimum_required (VERSION 2.6)
#cmake_minimum_required (VERSION 2.8.8)
# FOR CMAKE VERSIONS 2.6 TO 2.8.7, MUST USE CRAPPY_OLD_CMAKE
project (SumiAPI)
# The version number.
set (SumiAPI_VERSION_MAJOR 1)
set (SumiAPI_VERSION_MINOR 0)
include_directories( "${CMAKE_SOURCE_DIR}" ${CMAKE_BINARY_DIR} )
ENABLE_TESTING()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
include(TestAgainstReference)
option(SPINLOCK "whether spin locks are supported" Off)
option(SST "whether to compile SST transport" Off)
option(MPI "whether to compile MPI transport" Off)
option(GNI "whether to compile GNI transport" Off)
option(NO_TRANSPORT "whether to skip compiling transport layer" Off)
if (NOT SST AND NOT MPI AND NOT GNI AND NOT NO_TRANSPORT)
message(FATAL_ERROR "You must choose SST, MPI, GNI, or NO_TRANSPORT")
endif()
add_subdirectory(sumi)
if (NOT NO_TRANSPORT)
add_subdirectory(fake)
add_subdirectory(benchmark)
endif()
add_subdirectory(test)
if (SPINLOCK)
set (sumi_use_spinlock 1)
else()
set (sumi_use_spinlock 0)
endif()
if (NO_TRANSPORT)
set (rdma_header_file_include "")
set (default_transport "nothing")
endif()
if (SST)
set (rdma_header_file_include "<sst/rdma.h>")
set (default_transport "sst")
add_subdirectory(sst)
endif()
if (MPI)
add_subdirectory(mpi)
set (rdma_header_file_include "<mpi/rdma.h>")
set (default_transport "mpi")
endif()
if (GNI)
add_subdirectory(gni)
set (rdma_header_file_include "<gni/rdma.h>")
set (default_transport "gni")
endif()
configure_file(${CMAKE_SOURCE_DIR}/config.h.in ${CMAKE_BINARY_DIR}/sumi/config.h)