forked from jmakitalo/for90-mom2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
63 lines (55 loc) · 1 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
cmake_minimum_required (VERSION 2.6)
project (for90-mom2)
enable_language (Fortran)
set(EXECUTABLE_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/bin/")
set(BUILD_TYPE "release")
if(BUILD_TYPE MATCHES "release")
message("Building release")
# Support OpenMP.
# May want to add also "-vec-report1" to get vectorization reports.
set(CMAKE_Fortran_FLAGS "-fpp -openmp -parallel -O2")
elseif(BUILD_TYPE MATCHES "debug")
message("Building debug")
set(CMAKE_Fortran_FLAGS "-g")
elseif(BUILD_TYPE MATCHES "profile")
message("Building profile")
set(CMAKE_Fortran_FLAGS "-pg")
else()
message(FATAL_ERROR "Invalid build type!")
endif()
set(CMAKE_EXE_LINKER_FLAGS "-mkl")
add_executable(mom
amos.f
aux.f90
constants.f90
ffields.f90
interface.f90
mesh.f90
nlsurf.f90
solver.f90
strat.f90
vie.f90
bc.f90
cs.f90
int.f90
nfields.f90
pec.f90
solver_vie.f90
symmetry.f90
bessel.f90
diffr.f90
green.f90
linalg.f90
nfpost.f90
quad.f90
source.f90
sysmat.f90
common.f90
dipole.f90
greenprd.f90
main.f90
nlbulk.f90
rwgf.f90
srcint.f90
time.f90
)