forked from ROSS-org/ROSS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
117 lines (96 loc) · 3.03 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
PROJECT(ROSS_TOP C)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
# ROSS Configuration Options
ENABLE_TESTING()
INCLUDE(CTest)
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/core/cmake/")
# We probably don't want this to run on every build.
option(COVERALLS "Generate coveralls data" OFF)
if (COVERALLS)
include(Coveralls)
coveralls_turn_on_coverage()
endif()
# Data Structure for Unprocessed Event List
#SET(QUEUE calendar) #Calendar Queue
#SET(QUEUE heap) #Push/Down Heap
SET(QUEUE splay) #Splay Tree
#SET(QUEUE kp_splay) #Splay Tree in KPs
# Random Library
SET(RAND clcg4)
# Network option
# tcp option removed
SET(NETWORK mpi)
# GVT algorithm option
#SET(GVT 7oclock)
SET(GVT mpi_allreduce)
# Architecture setting and management
SET(VALID_ARCH NO)
SET(ARCH $ENV{ARCH} CACHE STRING "Target architecture")
MARK_AS_ADVANCED(ARCH)
IF(NOT ARCH)
MESSAGE(FATAL_ERROR "ARCH not defined!\n"
"Please set ARCH to be one of (i386 | bgl | bgp | x86_64 | ppc64)")
ENDIF(NOT ARCH)
IF(ARCH STREQUAL i386)
SET(VALID_ARCH YES)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall")
ADD_DEFINITIONS(-D_GNU_SOURCE)
SET(CLOCK i386)
ENDIF(ARCH STREQUAL i386)
IF(ARCH STREQUAL bgl)
SET(VALID_ARCH YES)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qflag=i:i -qattr=full -O5")
SET(OPTIONS "-qtune=440 -qarch=440d")
SET(CLOCK bgl)
ENDIF(ARCH STREQUAL bgl)
IF(ARCH STREQUAL bgp)
SET(VALID_ARCH YES)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qflag=i:i -qattr=full -O5")
SET(OPTIONS "-qtune=450 -qarch=450d")
SET(CLOCK bgl)
ENDIF(ARCH STREQUAL bgp)
IF(ARCH STREQUAL bgq)
SET(VALID_ARCH YES)
OPTION(USE_BGPM "Blue Gene/Q specific Performance Counters" OFF)
SET(BGPM_INCLUDE /bgsys/drivers/ppcfloor/bgpm/include/)
ADD_LIBRARY(imp_bgpm STATIC IMPORTED)
SET_PROPERTY(TARGET imp_bgpm PROPERTY IMPORTED_LOCATION /bgsys/drivers/ppcfloor/bgpm/lib/libbgpm.a)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${BGPM_INCLUDE} -O5 -qstrict -qprefetch=aggressive -qarch=qp -qtune=qp -qmaxmem=-1 -qsimd=noauto -qreport -qhot")
SET(CLOCK bgq)
ENDIF(ARCH STREQUAL bgq)
IF(ARCH STREQUAL ppc64)
SET(VALID_ARCH YES)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall")
ADD_DEFINITIONS(-D_GNU_SOURCE)
SET(CLOCK ppc)
ENDIF(ARCH STREQUAL ppc64)
IF(ARCH STREQUAL x86_64)
SET(VALID_ARCH YES)
SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
ADD_DEFINITIONS(-D_GNU_SOURCE)
SET(CLOCK amd64)
ENDIF(ARCH STREQUAL x86_64)
IF(NOT VALID_ARCH)
MESSAGE(FATAL_ERROR "ARCH not valid!\n"
"Please set ARCH to be one of (i386 | bgl | bgp | x86_64 | ppc64)")
ENDIF(NOT VALID_ARCH)
# ROSS Core code
ADD_SUBDIRECTORY(core)
# Submodules
OPTION(USE_RIO "Build RIO checkpointing library?" OFF)
IF(USE_RIO)
ADD_SUBDIRECTORY(IO)
ENDIF(USE_RIO)
# ROSS Models directory
OPTION(ROSS_BUILD_MODELS "Build ROSS models?" OFF)
IF(ROSS_BUILD_MODELS)
ADD_SUBDIRECTORY(models)
ENDIF(ROSS_BUILD_MODELS)
# ROSS Documentation
FIND_PACKAGE(Doxygen)
IF(DOXYGEN_FOUND)
OPTION(ROSS_BUILD_DOXYGEN "Build Doxygen documentation?" OFF)
IF(ROSS_BUILD_DOXYGEN)
ADD_SUBDIRECTORY(docs)
ENDIF(ROSS_BUILD_DOXYGEN)
ENDIF(DOXYGEN_FOUND)