-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
135 lines (94 loc) · 5.99 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
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
project (LPM)
set ( LPM_VERSION_MAJOR 1)
set ( LPM_VERSION_MINOR 0)
FIND_PACKAGE(MPI REQUIRED)
enable_language(Fortran)
# set default build type to release
if ( NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE RELEASE CACHE STRING "Choose type of build. Options are : NONE, DEBUG, RELEASE." FORCE)
endif ( NOT CMAKE_BUILD_TYPE)
# default installation
get_filename_component (default_prefix "." ABSOLUTE)
set (CMAKE_INSTALL_PREFIX ${default_prefix}/install CACHE STRING
"Choose the installation directory; by default it installs in the install directory."
FORCE)
# FFLAGS depend on the compiler
if ( ${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
# gfortran
set (CMAKE_Fortran_FLAGS_RELEASE "-O2 -fopenmp")
set (CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -fopenmp")
elseif ( ${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
# ifort
set (CMAKE_Fortran_FLAGS_RELEASE "-O2 -openmp")
set (CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -openmp")
else ( ${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
message ("CMAKE_Fortran_COMPILER full path: " ${CMAKE_Fortran_COMPILER})
message ("Fortran compiler: " ${Fortran_COMPILER_NAME})
message ("No optimized Fortran compiler flags are known, we just try -O2...")
set (CMAKE_Fortran_FLAGS_RELEASE "-O2")
set (CMAKE_Fortran_FLAGS_DEBUG "-O0 -g")
endif ( ${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
add_library( base NumberKinds3.f90 OutputWriter2.f90 IntegerList2.f90 Logger2.f90 SphereGeom3.f90 PlaneGeometry.f90)
add_library( mesh Particles.f90 Edges.f90 Panels.f90 SphereMesh2.f90 PlaneMesh.f90)
target_link_libraries( mesh base )
add_library( interp ssrfpack.f stripack.f STRIPACKInterface2.f90 SSRFPACKInterface2.f90 bivar.f90 BIVARInterface.f90)
target_link_libraries( interp base mesh )
add_library( remesh SphereRemesh.f90 PlaneRemesh.f90 PlaneVorticity.f90 PlaneTracer.f90 BVEVorticity.f90 Tracers.f90 )
TARGET_LINK_LIBRARIES( remesh base mesh interp)
add_library( problemSet Tracers.f90 BVEVorticity.f90 SWEVorticityAndDivergence.f90
Advection2.f90 BVEDirectSum.f90 SWEDirectSum.f90
PlaneDirectSum.f90 PlaneVorticity.f90 PlaneTracer.f90 )
TARGET_LINK_LIBRARIES( problemSet base mesh remesh interp )
add_library( output VTKOutput.f90 PlaneOutput.f90 LatLonOutput.f90 )
TARGET_LINK_LIBRARIES( output base mesh interp)
ADD_EXECUTABLE( advectRH4.exe AdvectRH4.f90 )
TARGET_LINK_LIBRARIES(advectRH4.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( sweTestCase1.exe TestCase1.f90 )
TARGET_LINK_LIBRARIES(sweTestCase1.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( advectGaussHills.exe AdvectGaussHills.f90 )
TARGET_LINK_LIBRARIES(advectGaussHills.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( advectGaussHillsDirect.exe AdvectGaussHillsDirect.f90 )
TARGET_LINK_LIBRARIES(advectGaussHillsDirect.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( advectMovingVortices.exe AdvectMovingVortices.f90 )
TARGET_LINK_LIBRARIES(advectMovingVortices.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( advectMovingVorticesWithVorticityRefinement.exe AdvectMovingVortsRefineVorticity.f90 )
TARGET_LINK_LIBRARIES(advectMovingVorticesWithVorticityRefinement.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( advectMovingVorticesDirect.exe advectMovingVortsDirect.f90 )
TARGET_LINK_LIBRARIES(advectMovingVorticesDirect.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( advectSlottedCylinders.exe AdvectSlottedCylinders.f90 )
TARGET_LINK_LIBRARIES(advectSlottedCylinders.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( advectSlottedCylindersDirect.exe AdvectSlottedCylindersDirect.f90 )
TARGET_LINK_LIBRARIES(advectSlottedCylindersDirect.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( advectCorrelatedTracers.exe AdvectCorrelated.f90 )
TARGET_LINK_LIBRARIES(advectCorrelatedTracers.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( advectCorrelatedTracersDirect.exe AdvectCorrelatedDirect.f90 )
TARGET_LINK_LIBRARIES(advectCorrelatedTracersDirect.exe base mesh interp remesh problemSet output )
#ADD_EXECUTABLE( solidBodyRotationBVE.exe BVESolidBodyRotation.f90 )
#TARGET_LINK_LIBRARIES(solidBodyRotationBVE.exe base mesh interp remesh problemSet output )
#ADD_EXECUTABLE( singleGaussianVortexBVE.exe BVESingleGaussianVortex.f90 )
#TARGET_LINK_LIBRARIES(singleGaussianVortexBVE.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( rossbyHaurwitz4Wave.exe BVERH4.f90 )
TARGET_LINK_LIBRARIES(rossbyHaurwitz4Wave.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE(sweTestCase2.exe SWETestCase2.f90 )
TARGET_LINK_LIBRARIES(sweTestCase2.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( lambDipole.exe LambDipole.f90 )
TARGET_LINK_LIBRARIES(lambDipole.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( twoDipoles.exe TwoDipoles.f90 )
TARGET_LINK_LIBRARIES(twoDipoles.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( convertVTK2NCL.exe ConvertVTKtoNativeNCL.f90 )
TARGET_LINK_LIBRARIES(convertVTK2NCL.exe base interp )
ADD_EXECUTABLE( interpVTK2NCL.exe InterpDataFromVTKtoNCL.f90 )
TARGET_LINK_LIBRARIES(interpVTK2NCL.exe base interp )
ADD_EXECUTABLE( nearestNeighborInterpToLL.exe NearestNeighborVTK2NCL.f90)
TARGET_LINK_LIBRARIES(nearestNeighborInterpToLL.exe base interp)
ADD_EXECUTABLE( sweDivergenceTerms.exe SWEDivergenceEqnTerms.f90 )
TARGET_LINK_LIBRARIES(sweDivergenceTerms.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( planeTest.exe planeTester.f90 )
TARGET_LINK_LIBRARIES(planeTest.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( icosTriTest.exe IcosTriTest2.f90 )
TARGET_LINK_LIBRARIES(icosTriTest.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( icosTriAreaTest.exe IcosTriAreaDB.f90 )
TARGET_LINK_LIBRARIES(icosTriAreaTest.exe base mesh interp remesh problemSet output )
ADD_EXECUTABLE( cubedSphereTest.exe CubedSphereTest2.f90 )
TARGET_LINK_LIBRARIES(cubedSphereTest.exe base mesh interp remesh problemSet output )