forked from firelab/behave
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
196 lines (172 loc) · 5.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
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
# ****************************************************************************/
# This is set to 2.8.11 to use the target_link_libraries command. In CMake
# 2.8.11 and later versions, this command automatically adds appropriate
# include directories, compile definitions, the position-independent-code flag,
# and links to the qtmain.lib library on Windows.
# *****************************************************************************
CMAKE_MINIMUM_REQUIRED(VERSION 3.2.3)
# Make use of c++14
SET(CMAKE_CXX_STANDARD 14)
PROJECT(behave)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/behave)
# optional test executable
OPTION(TEST_BEHAVE "Enable Testing" ON)
OPTION(TEST_MORTALITY "Enable Mortality Testing" ON)
# optional stand-alone executables
OPTION(EXAMPLE_APP "Example client application" ON)
OPTION(RAWS_BATCH "Enable Behave RAWS Data Batch Reader" OFF)
OPTION(COMPUTE_SPOT_PILE "Build pile spot fire distance calculator" OFF)
OPTION(COMPUTE_SPOT_SURFACE "Build surface spot fire distance calculator" OFF)
OPTION(COMPUTE_SPOT_TORCHING_TREES "Build torching tree spot fire distance calculator" OFF)
IF(TEST_BEHAVE)
ADD_DEFINITIONS(-DTEST_BEHAVE)
ENDIF()
IF(TEST_MORTALITY)
ADD_DEFINITIONS(-DTEST_MORTALITY)
ENDIF()
IF(EXAMPLE_APP)
ADD_DEFINITIONS(-DEXAMPLE_APP)
ENDIF()
IF(RAWS_BATCH)
ADD_DEFINITIONS(-DRAWS_BATCH)
ENDIF()
IF(COMPUTE_SPOT_PILE)
ADD_DEFINITIONS(-DCOMPUTE_SPOT_PILE)
ENDIF()
IF(COMPUTE_SPOT_SURFACE)
ADD_DEFINITIONS(-DCOMPUTE_SPOT_SURFACE)
ENDIF()
IF(COMPUTE_SPOT_TORCHING_TREES)
ADD_DEFINITIONS(-DCOMPUTE_SPOT_TORCHING_TREES)
ENDIF()
SET(SOURCE
src/behave/behaveRun.cpp
src/behave/behaveUnits.cpp
src/behave/canopy_coefficient_table.cpp
src/behave/chaparralFuel.cpp
src/behave/Contain.cpp
src/behave/ContainAdapter.cpp
src/behave/ContainForce.cpp
src/behave/ContainForceAdapter.cpp
src/behave/ContainResource.cpp
src/behave/ContainSim.cpp
src/behave/crown.cpp
src/behave/crownInputs.cpp
src/behave/fineDeadFuelMoistureTool.cpp
src/behave/fireSize.cpp
src/behave/fuelModels.cpp
src/behave/ignite.cpp
src/behave/igniteInputs.cpp
src/behave/moistureScenarios.cpp
src/behave/mortality.cpp
src/behave/mortality_equation_table.cpp
src/behave/mortality_inputs.cpp
src/behave/newext.cpp
src/behave/palmettoGallberry.cpp
src/behave/randfuel.cpp
src/behave/randthread.cpp
src/behave/safety.cpp
src/behave/slopeTool.cpp
src/behave/species_master_table.cpp
src/behave/spot.cpp
src/behave/spotInputs.cpp
src/behave/surface.cpp
src/behave/surfaceFireReactionIntensity.cpp
src/behave/surfaceFuelbedIntermediates.cpp
src/behave/surfaceInputs.cpp
src/behave/surfaceFire.cpp
src/behave/surfaceTwoFuelModels.cpp
src/behave/westernAspen.cpp
src/behave/windAdjustmentFactor.cpp
src/behave/windSpeedUtility.cpp
src/behave/vaporPressureDeficitCalculator.cpp)
SET(HEADERS
src/behave/behaveRun.h
src/behave/behaveUnits.h
src/behave/canopy_coefficient_table.h
src/behave/chaparralFuel.h
src/behave/Contain.h
src/behave/ContainAdapter.h
src/behave/ContainForce.h
src/behave/ContainForceAdapter.h
src/behave/ContainResource.h
src/behave/ContainSim.h
src/behave/crown.h
src/behave/crownInputs.h
src/behave/fireSize.h
src/behave/fuelModels.h
src/behave/ignite.h
src/behave/igniteInputs.h
src/behave/mortality.h
src/behave/mortality_equation_table.h
src/behave/mortality_inputs.h
src/behave/newext.h
src/behave/palmettoGallberry.h
src/behave/randfuel.h
src/behave/randthread.h
src/behave/safety.h
src/behave/slopeTool.h
src/behave/species_master_table.h
src/behave/spot.h
src/behave/spotInputs.h
src/behave/surface.h
src/behave/surfaceFireReactionIntensity.h
src/behave/surfaceFuelbedIntermediates.h
src/behave/surfaceInputEnums.h
src/behave/surfaceInputs.h
src/behave/surfaceFire.h
src/behave/surfaceTwoFuelModels.h
src/behave/westernAspen.h
src/behave/windAdjustmentFactor.h
src/behave/windSpeedUtility.h
src/behave/vaporPressureDeficitCalculator.h)
SOURCE_GROUP("Behave Core Source Files" FILES ${SOURCE})
SOURCE_GROUP("Behave Core Header Files" FILES ${HEADERS})
IF(TEST_BEHAVE)
SET(BOOST_TEST_SOURCE
src/testBehave/testBehave.cpp)
ADD_EXECUTABLE(testBehave
${SOURCE}
${BOOST_TEST_SOURCE}
${HEADERS})
TARGET_LINK_LIBRARIES(testBehave)
ENDIF()
IF(TEST_MORTALITY)
SET(BOOST_TEST_SOURCE
src/testMortality/mortality_client.cpp)
ADD_EXECUTABLE(testMortality
${SOURCE}
${BOOST_TEST_SOURCE}
${HEADERS})
TARGET_LINK_LIBRARIES(testMortality)
ENDIF()
IF(EXAMPLE_APP)
ADD_EXECUTABLE(behave
${SOURCE}
src/behave/client.cpp
${HEADERS})
ENDIF()
IF(RAWS_BATCH)
ADD_EXECUTABLE(behave-raws-batch
${SOURCE}
src/rawsBatch/behaveRawsBatch.cpp
${HEADERS})
ENDIF()
IF(COMPUTE_SPOT_PILE)
ADD_EXECUTABLE(compute_spot_distance_pile
${SOURCE}
src/spotDistancePile/computePileSpottingDistance.cpp
${HEADERS})
ENDIF()
IF(COMPUTE_SPOT_SURFACE)
ADD_EXECUTABLE(compute_spot_distance_surface
${SOURCE}
src/spotDistanceSurface/computeSurfaceSpottingDistance.cpp
${HEADERS})
ENDIF()
IF(COMPUTE_SPOT_TORCHING_TREES)
ADD_EXECUTABLE(compute_spot_distance_trees
${SOURCE}
src/spotDistanceTorchingTrees/computeTorchingTreesSpottingDistance.cpp
${HEADERS})
ENDIF()