forked from OpenWaterAnalytics/epanet-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
151 lines (144 loc) · 4.02 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
cmake_minimum_required (VERSION 2.8)
SET (EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
SET (LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
project ("EPANET")
set_property( GLOBAL PROPERTY USE_FOLDERS ON)
SET (CMAKE_C_FLAGS "-std=c99")
if(MSVC)
# /Wall generated MANY warnings. Defaulting to level 4, excluding C4100 (unreferenced formal parameter)
# and enabling C4571, C4263, and C4264
SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
SET (CMAKE_CXX_FLAGS "/EHsc /W4 /wd4100 /w44571 /w44263 /w44264")
else()
# -I. is needed so gcc can find the generated export header
SET (CMAKE_CXX_FLAGS "-Wall -std=c++11")
endif(MSVC)
SET (epanet_lib_sources
src/Core/datamanager.cpp
src/Core/diagnostics.cpp
src/Core/epanet3.cpp
src/Core/error.cpp
src/Core/hydbalance.cpp
src/Core/hydengine.cpp
src/Core/network.cpp
src/Core/options.cpp
src/Core/project.cpp
src/Core/qualbalance.cpp
src/Core/qualengine.cpp
src/Core/units.cpp
src/Elements/control.cpp
src/Elements/curve.cpp
src/Elements/demand.cpp
src/Elements/element.cpp
src/Elements/emitter.cpp
src/Elements/junction.cpp
src/Elements/link.cpp
src/Elements/node.cpp
src/Elements/pattern.cpp
src/Elements/pipe.cpp
src/Elements/pump.cpp
src/Elements/pumpcurve.cpp
src/Elements/qualsource.cpp
src/Elements/reservoir.cpp
src/Elements/tank.cpp
src/Elements/valve.cpp
src/Input/controlparser.cpp
src/Input/curveparser.cpp
src/Input/inputparser.cpp
src/Input/inputreader.cpp
src/Input/linkparser.cpp
src/Input/nodeparser.cpp
src/Input/optionparser.cpp
src/Input/patternparser.cpp
src/Models/demandmodel.cpp
src/Models/headlossmodel.cpp
src/Models/leakagemodel.cpp
src/Models/pumpenergy.cpp
src/Models/qualmodel.cpp
src/Models/tankmixmodel.cpp
src/Output/outputfile.cpp
src/Output/projectwriter.cpp
src/Output/reportfields.cpp
src/Output/reportwriter.cpp
src/Solvers/ggasolver.cpp
src/Solvers/hydsolver.cpp
src/Solvers/ltdsolver.cpp
src/Solvers/matrixsolver.cpp
src/Solvers/qualsolver.cpp
src/Solvers/sparspak.cpp
src/Solvers/sparspaksolver.cpp
src/Utilities/graph.cpp
src/Utilities/mempool.cpp
src/Utilities/segpool.cpp
src/Utilities/utilities.cpp
)
SET (epanet_lib_headers
src/Core/constants.h
src/Core/datamanager.h
src/Core/diagnostics.h
src/Core/error.h
src/Core/hydbalance.h
src/Core/hydengine.h
src/Core/network.h
src/Core/options.h
src/Core/project.h
src/Core/qualbalance.h
src/Core/qualengine.h
src/Core/units.h
src/Elements/control.h
src/Elements/curve.h
src/Elements/demand.h
src/Elements/element.h
src/Elements/emitter.h
src/Elements/junction.h
src/Elements/link.h
src/Elements/node.h
src/Elements/pattern.h
src/Elements/pipe.h
src/Elements/pump.h
src/Elements/pumpcurve.h
src/Elements/qualsource.h
src/Elements/reservoir.h
src/Elements/tank.h
src/Elements/valve.h
src/Input/controlparser.h
src/Input/curveparser.h
src/Input/inputparser.h
src/Input/inputreader.h
src/Input/linkparser.h
src/Input/nodeparser.h
src/Input/optionparser.h
src/Input/patternparser.h
src/Models/demandmodel.h
src/Models/headlossmodel.h
src/Models/leakagemodel.h
src/Models/pumpenergy.h
src/Models/qualmodel.h
src/Models/tankmixmodel.h
src/Output/outputfile.h
src/Output/projectwriter.h
src/Output/reportfields.h
src/Output/reportwriter.h
src/Solvers/ggasolver.h
src/Solvers/hydsolver.h
src/Solvers/ltdsolver.h
src/Solvers/matrixsolver.h
src/Solvers/qualsolver.h
src/Solvers/sparspak.h
src/Solvers/sparspaksolver.h
src/Utilities/graph.h
src/Utilities/mempool.h
src/Utilities/segpool.h
src/Utilities/utilities.h
)
source_group("Core" REGULAR_EXPRESSION "src/Core/.*")
source_group("Elements" REGULAR_EXPRESSION "src/Elements/.*")
source_group("Input" REGULAR_EXPRESSION "src/Input/.*")
source_group("Models" REGULAR_EXPRESSION "src/Models/.*")
source_group("Output" REGULAR_EXPRESSION "src/Output/.*")
source_group("Solvers" REGULAR_EXPRESSION "src/Solvers/.*")
source_group("Utilities" REGULAR_EXPRESSION "src/Utilities/.*")
include_directories(src src/Core src/Elements src/Input src/Output src/Utilities src/Solvers)
add_library(epanet3 SHARED ${epanet_lib_sources} ${epanet_lib_headers})
add_executable(run-epanet3 src/CLI/main.cpp)
target_link_libraries(run-epanet3 LINK_PUBLIC epanet3)