-
Notifications
You must be signed in to change notification settings - Fork 18
/
CMakeLists.txt
249 lines (225 loc) · 12.4 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
cmake_minimum_required(VERSION 3.2)
message(STATUS "Cmake version ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}")
project(wrench CXX)
add_definitions("-Wall -Wno-unused-variable -Wno-unused-private-field")
if (ENABLE_BATSCHED)
add_definitions(-DENABLE_BATSCHED)
endif()
set(CMAKE_CXX_STANDARD 11)
# build the version number
set(WRENCH_VERSION_MAJOR "1")
set(WRENCH_VERSION_MINOR "0")
set(WRENCH_VERSION_PATCH "0")
set(WRENCH_VERSION_EXTRA "beta")
if (${WRENCH_VERSION_PATCH} EQUAL "0")
set(WRENCH_RELEASE_VERSION "${WRENCH_VERSION_MAJOR}.${WRENCH_VERSION_MINOR}")
else ()
set(WRENCH_RELEASE_VERSION "$(WRENCH_VERSION_MAJOR}.${WRENCH_VERSION_MINOR}.${WRENCH_VERSION_PATCH}")
endif ()
if (NOT ${WRENCH_VERSION_EXTRA} EQUAL "")
set(WRENCH_RELEASE_VERSION "${WRENCH_RELEASE_VERSION}-${WRENCH_VERSION_EXTRA}")
endif ()
include_directories(src/wrench/ include/ /usr/include /usr/local/include /opt/local/include /usr/local/include/nlohmann)
#include_directories(src/wrench/ include/ /usr/include /usr/local/include /Users/casanova/Home/PROJECTS/SIMGRID/SimGrid-3.17 /opt/local/include /usr/local/include/nlohmann)
# library header files
set(HEADER_FILES
include/wrench/exceptions/WorkflowExecutionException.h
include/wrench/simgrid_S4U_util/S4U_Simulation.h
include/wrench/simulation/SimulationMessage.h
include/wrench/simgrid_S4U_util/S4U_Daemon.h
include/wrench/simgrid_S4U_util/S4U_Mailbox.h
include/wrench/simgrid_S4U_util/S4U_PendingCommunication.h
include/wrench/logging/TerminalOutput.h
include/wrench/wms/WMS.h
include/wrench/wms/StaticOptimization.h
include/wrench/wms/DynamicOptimization.h
include/wrench/wms/scheduler/PilotJobScheduler.h
include/wrench/wms/scheduler/Scheduler.h
include/wrench/workflow/Workflow.h
include/wrench/workflow/WorkflowFile.h
include/wrench/workflow/WorkflowTask.h
include/wrench/workflow/job/WorkflowJob.h
include/wrench/workflow/job/StandardJob.h
include/wrench/workflow/job/PilotJob.h
include/wrench/workflow/execution_events/FailureCause.h
include/wrench/workflow/execution_events/WorkflowExecutionEvent.h
include/wrench/managers/JobManager.h
include/wrench/managers/DataMovementManager.h
include/wrench/services/Service.h
include/wrench/services/ServiceMessage.h
include/wrench/services/ServiceProperty.h
include/wrench/services/compute/ComputeService.h
include/wrench/services/compute/ComputeServiceProperty.h
include/wrench/services/compute/ComputeServiceMessage.h
include/wrench/services/compute/standard_job_executor/Workunit.h
include/wrench/services/compute/standard_job_executor/WorkunitMulticoreExecutor.h
include/wrench/services/compute/standard_job_executor/StandardJobExecutor.h
include/wrench/services/compute/standard_job_executor/StandardJobExecutorProperty.h
include/wrench/services/compute/multihost_multicore/MultihostMulticoreComputeService.h
include/wrench/services/compute/multihost_multicore/MultihostMulticoreComputeServiceProperty.h
include/wrench/services/compute/cloud/CloudService.h
include/wrench/services/compute/cloud/CloudServiceProperty.h
include/wrench/services/storage/StorageService.h
include/wrench/services/storage/StorageServiceProperty.h
include/wrench/services/storage/simple/SimpleStorageService.h
include/wrench/services/storage/simple/SimpleStorageServiceProperty.h
include/wrench/services/file_registry/FileRegistryService.h
include/wrench/services/file_registry/FileRegistryServiceProperty.h
include/wrench/services/network_proximity/NetworkProximityService.h
include/wrench/services/network_proximity/NetworkProximityServiceProperty.h
include/wrench/services/network_proximity/NetworkProximityDaemon.h
include/wrench/simulation/Simulation.h
include/wrench/simulation/SimulationTimestampTypes.h
include/wrench/simulation/SimulationOutput.h
include/wrench/simulation/SimulationTimestamp.h
include/wrench/simulation/SimulationTrace.h
include/wrench/simulation/Terminator.h
include/wrench.h
include/wrench-dev.h
include/wrench/services/compute/batch/BatchJob.h
include/wrench/services/compute/batch/BatchServiceMessage.h
include/wrench/services/compute/batch/BatchService.h
include/wrench/services/compute/batch/BatchServiceProperty.h
include/wrench/services/compute/batch/BatchRequestReplyProcess.h
include/wrench/services/compute/batch/BatchNetworkListener.h
include/wrench/services/helpers/Alarm.h
include/wrench/util/PointerUtil.h
include/wrench/util/MessageManager.h
include/wrench/util/TraceFileLoader.h
include/wrench/services/storage/simple/NetworkConnectionManager.h
include/wrench/services/storage/simple/NetworkConnection.h
)
# source files
set(SOURCE_FILES
src/wrench/simulation/SimulationMessage.cpp
src/wrench/workflow/execution_events/WorkflowExecutionEvent.cpp
src/wrench/simgrid_S4U_util/S4U_Daemon.cpp
src/wrench/simgrid_S4U_util/S4U_DaemonActor.cpp
src/wrench/simgrid_S4U_util/S4U_DaemonActor.h
src/wrench/simgrid_S4U_util/S4U_Simulation.cpp
src/wrench/simgrid_S4U_util/S4U_Mailbox.cpp
src/wrench/simgrid_S4U_util/S4U_PendingCommunication.cpp
src/wrench/logging/TerminalOutput.cpp
src/wrench/workflow/Workflow.cpp
src/wrench/workflow/WorkflowTask.cpp
src/wrench/workflow/WorkflowFile.cpp
src/wrench/wms/WMS.cpp
src/wrench/wms/Scheduler.cpp
src/wrench/wms/WMSMessage.h
src/wrench/wms/WMSMessage.cpp
src/wrench/services/compute/ComputeService.cpp
src/wrench/services/compute/multihost_multicore/MultihostMulticoreComputeService.cpp
src/wrench/workflow/job/PilotJob.cpp
src/wrench/managers/JobManager.cpp
src/wrench/managers/DataMovementManager.cpp
src/wrench/simulation/Simulation.cpp
src/wrench/workflow/job/WorkflowJob.cpp
src/wrench/workflow/job/StandardJob.cpp
src/wrench/simulation/SimulationTimestamp.cpp
src/wrench/simulation/SimulationTrace.cpp
src/wrench/simulation/SimulationOutput.cpp
src/wrench/simulation/Terminator.cpp
src/wrench/services/file_registry/FileRegistryService.cpp
src/wrench/services/storage/StorageService.cpp
src/wrench/services/storage/simple/SimpleStorageService.cpp
src/wrench/services/Service.cpp
src/wrench/services/ServiceProperty.cpp
src/wrench/services/compute/ComputeServiceProperty.cpp
src/wrench/services/storage/StorageServiceProperty.cpp
src/wrench/services/file_registry/FileRegistryServiceProperty.cpp
src/wrench/services/compute/multihost_multicore/MultihostMulticoreComputeServiceProperty.cpp
src/wrench/services/storage/simple/SimpleStorageServiceProperty.cpp
src/wrench/workflow/execution_events/FailureCause.cpp
src/wrench/services/ServiceMessage.cpp
src/wrench/services/compute/ComputeServiceMessage.cpp
src/wrench/services/compute/multihost_multicore/MulticoreComputeServiceMessage.cpp
src/wrench/services/compute/multihost_multicore/MulticoreComputeServiceMessage.h
src/wrench/services/storage/StorageServiceMessage.cpp
src/wrench/services/storage/StorageServiceMessage.h
src/wrench/services/file_registry/FileRegistryMessage.cpp
src/wrench/services/file_registry/FileRegistryMessage.h
src/wrench/services/compute/cloud/CloudService.cpp
src/wrench/services/compute/cloud/CloudServiceProperty.cpp
src/wrench/services/compute/cloud/CloudServiceMessage.h
src/wrench/services/compute/cloud/CloudServiceMessage.cpp
src/wrench/services/compute/standard_job_executor/ComputeThread.h
src/wrench/services/compute/standard_job_executor/ComputeThread.cpp
src/wrench/services/compute/standard_job_executor/Workunit.cpp
src/wrench/services/compute/standard_job_executor/WorkunitMulticoreExecutor.cpp
src/wrench/services/compute/standard_job_executor/StandardJobExecutorMessage.h
src/wrench/services/compute/standard_job_executor/StandardJobExecutorMessage.cpp
src/wrench/services/compute/standard_job_executor/StandardJobExecutor.cpp
src/wrench/services/compute/standard_job_executor/StandardJobExecutorProperty.cpp
src/wrench/services/network_proximity/NetworkProximityService.cpp
src/wrench/services/network_proximity/NetworkProximityServiceProperty.cpp
src/wrench/services/network_proximity/NetworkProximityMessage.cpp
src/wrench/services/network_proximity/NetworkProximityMessage.h
src/wrench/services/network_proximity/NetworkProximityDaemon.cpp
src/wrench/services/compute/batch/BatchJob.cpp
src/wrench/services/compute/batch/BatchServiceMessage.cpp
src/wrench/services/compute/batch/BatchService.cpp
src/wrench/services/compute/batch/BatchServiceProperty.cpp
src/wrench/services/compute/batch/BatchRequestReplyProcess.cpp
src/wrench/services/compute/batch/BatchNetworkListener.cpp
src/wrench/services/helpers/Alarm.cpp
src/wrench/util/PointerUtil.cpp
src/wrench/util/MessageManager.cpp
src/wrench/util/TraceFileLoader.cpp
src/wrench/services/storage/simple/NetworkConnectionManager.cpp
src/wrench/services/storage/simple/NetworkConnection.cpp
)
# test files
set(TEST_FILES
test/main.cpp
test/simulation_message_constructors/MessageConstructorTest.cpp
test/workflow/WorkflowTest.cpp
test/workflow/WorkflowFileTest.cpp
test/workflow/WorkflowTaskTest.cpp
test/simulation/OneTaskTest.cpp
test/simulation/SimpleStorageService/InternalNetworkConnectionTest.cpp
test/simulation/SimpleStorageService/SimpleStorageServiceFunctionalTest.cpp
test/simulation/SimpleStorageService/SimpleStorageServicePerformanceTest.cpp
test/simulation/SimpleStorageService/SimpleStorageServiceLimitedConnectionsTest.cpp
test/simulation/MultihostMulticoreComputeService/MultihostMulticoreComputeServiceTestStandardJobs.cpp
test/simulation/MultihostMulticoreComputeService/MultihostMulticoreComputeServiceTestPilotJobs.cpp
test/simulation/MultihostMulticoreComputeService/MultihostMulticoreComputeServiceSchedulingTest.cpp
test/simulation/TestWithFork.h
test/simulation/StandardJobExecutorTest.cpp
test/simulation/NetworkProximityTest.cpp
test/simulation/BatchServiceTest.cpp
test/simulation/CloudServiceTest.cpp
test/simulation/NoopScheduler.cpp
test/simulation/MultihostMulticoreComputeService/MultihostMulticoreComputeServiceResourceInformationTest.cpp
test/simulation/NoopScheduler.h
test/simulation/MultipleWMSTest.cpp
src/wrench/util/UnitParser.cpp
include/wrench/util/UnitParser.h)
# wrench library
find_library(SIMGRID_LIBRARY NAMES simgrid)
find_library(PUGIXML_LIBRARY NAMES pugixml)
find_library(LEMON_LIBRARY NAMES emon)
find_library(GTEST_LIBRARY NAMES gtest)
add_library(wrench STATIC ${SOURCE_FILES} src/wrench/util/UnitParser.cpp include/wrench/util/UnitParser.h)
set_target_properties(wrench PROPERTIES VERSION ${WRENCH_RELEASE_VERSION})
target_link_libraries(wrench ${SIMGRID_LIBRARY} ${PUGIXML_LIBRARY} ${LEMON_LIBRARY})
install(TARGETS wrench DESTINATION lib)
install(DIRECTORY include/ DESTINATION include)
# generate unit tests
add_executable(unit_tests EXCLUDE_FROM_ALL ${SOURCE_FILES} ${HEADER_FILES} ${TEST_FILES})
if (ENABLE_BATSCHED)
target_link_libraries(unit_tests ${GTEST_LIBRARY} wrench -lpthread -lm -lzmq)
else()
target_link_libraries(unit_tests ${GTEST_LIBRARY} wrench -lpthread -lm)
endif()
set_target_properties(unit_tests PROPERTIES COMPILE_FLAGS "-g -O0 --coverage")
set_target_properties(unit_tests PROPERTIES LINK_FLAGS "--coverage")
add_custom_command(TARGET unit_tests COMMAND find . -name *.gcda -delete)
# additional packages
include(${CMAKE_HOME_DIRECTORY}/tools/cmake/DefinePackages.cmake)
# build examples
foreach (cmakefile ${CMAKEFILES_TXT})
string(REPLACE "/CMakeLists.txt" "" repository ${cmakefile})
add_subdirectory("${CMAKE_HOME_DIRECTORY}/${repository}")
endforeach ()
# build documentation
include(${CMAKE_HOME_DIRECTORY}/tools/cmake/Documentation.cmake)