-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
67 lines (53 loc) · 2.01 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
cmake_minimum_required(VERSION 2.8.3)
cmake_policy(VERSION 2.8.3)
project(nnti)
include(CheckLibraryExists)
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cross-compiling/${CERCS_SYSTEM_PROCESSOR}.cmake")
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/cross-compiling/${CERCS_SYSTEM_PROCESSOR}.cmake)
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
INCLUDE(TribitsSubPackageMacros)
INCLUDE(TribitsLibraryMacros)
INCLUDE(TribitsAddExecutable)
INCLUDE(TribitsAddTest)
INCLUDE(TribitsAddOptionAndDefine)
include(TriosProbeTimers)
include(TriosProbeGettid)
include(TriosProbeNetwork)
include(TriosProbeSemaphores)
include(TriosProbeThreads)
include(TriosProbeXDR)
SET(PACKAGE_NAME nnti)
SET(PARENT_PACKAGE_NAME CMAKE)
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
CHECK_LIBRARY_EXISTS (ibverbs ibv_create_qp "" HAVE_IBVERBS)
CHECK_LIBRARY_EXISTS (ugni gni_err_str "" HAVE_GNI)
SET (DEPLIBS "")
SET(TRANSPORT_FOUND FALSE)
IF (HAVE_IBVERBS)
SET(HAVE_TRIOS_INFINIBAND 1)
SET(nnti_ENABLE_InfiniBand 1)
SET(TRANSPORT_FOUND TRUE)
INCLUDE_DIRECTORIES(/usr/include/infiniband)
list (APPEND DEPLIBS ibverbs)
ENDIF (HAVE_IBVERBS)
IF (HAVE_GNI)
SET(HAVE_TRIOS_GEMINI 1)
SET(nnti_ENABLE_Gemini 1)
SET(TRANSPORT_FOUND TRUE)
list (APPEND DEPLIBS ugni)
find_library(UGNI_PATH ugni HINTS ENV CRAY_LD_LIBRARY_PATH)
GET_FILENAME_COMPONENT(UGNI_DIR ${UGNI_PATH} PATH)
link_directories(${UGNI_DIR})
ENDIF (HAVE_GNI)
IF (NOT ${TRANSPORT_FOUND})
MESSAGE (FATAL_ERROR "No supported NNTI transport identified. Cmake will exit.")
ENDIF (NOT ${TRANSPORT_FOUND})
ADD_SUBDIRECTORY( support )
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/support/xdr)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/support/logger)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/support/threads)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/support/timer)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/support/signal)
ADD_SUBDIRECTORY( nnti )
CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/Trios_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Trios_config.h )