/[lmdze]/trunk/ConfigureCompilerFlags.cmake
ViewVC logotype

Contents of /trunk/ConfigureCompilerFlags.cmake

Parent Directory Parent Directory | Revision Log Revision Log


Revision 344 - (show annotations)
Tue Nov 12 15:18:14 2019 UTC (4 years, 5 months ago) by guez
File size: 1618 byte(s)
Replace pi / 180 by `deg_to_rad`

In procedure etat0, rename variable tsoil to ftsoil, which is the
corresponding name in the gcm program.

In `laplacien_gam`, replace call to scopy by array assignment.

Replace pi / 180 by `deg_to_rad` in `start_init_phys`.

Encapsulate diagcld1 and orolift in modules.

Avoid duplicated computation in `interfsurf_hq`.

Promote internal function fz of procedure soil to function of module
`soil_m`.  Use `new_unit` in procedure soil.

1 if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
2 # Fortran language options:
3 string(APPEND CMAKE_Fortran_FLAGS " -std=f2003")
4
5 # Error and warning options:
6 string(APPEND CMAKE_Fortran_FLAGS
7 " -fmax-errors=1 -pedantic -Wall -Wcharacter-truncation -Wunused-parameter -Wno-conversion -Wno-integer-division")
8
9 # Debugging options:
10 set(CMAKE_Fortran_FLAGS_DEBUG
11 "-fbacktrace -g -ffpe-trap=invalid,zero,overflow")
12
13 # Code generation options:
14 string(APPEND CMAKE_Fortran_FLAGS_DEBUG
15 " -fcheck=bounds,do,mem,pointer,recursion -finit-real=nan -O0")
16
17 # Optimization options:
18 set(CMAKE_Fortran_FLAGS_RELEASE -O3)
19
20 # Hardware model options:
21 string(APPEND CMAKE_Fortran_FLAGS_RELEASE " -mcmodel=medium")
22 elseif(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
23 # Language:
24 string(APPEND CMAKE_Fortran_FLAGS
25 " -noaltparam -stand f03 -standard-semantics -assume nostd_mod_proc_name")
26 string(APPEND CMAKE_Fortran_FLAGS_DEBUG
27 " -check bounds,format,output_conversion,pointers,stack,uninit")
28
29 # Data:
30 string(APPEND CMAKE_Fortran_FLAGS " -auto -mcmodel=medium")
31 string(APPEND CMAKE_Fortran_FLAGS_DEBUG " -init=arrays,minus_huge,snan")
32
33 # Compiler diagnostics:
34 string(APPEND CMAKE_Fortran_FLAGS
35 " -warn declarations,general,stderrors,truncated_source,uncalled,unused,usage -traceback -diag-error-limit 1")
36
37 # Optimization:
38 string(APPEND CMAKE_Fortran_FLAGS_DEBUG " -O0")
39
40 # Floating point:
41 string(APPEND CMAKE_Fortran_FLAGS_DEBUG " -fp-stack-check -fpe-all=0")
42
43 # Debug:
44 string(APPEND CMAKE_Fortran_FLAGS_DEBUG
45 " -debug full -debug-parameters all -ftrapuv")
46 endif()

  ViewVC Help
Powered by ViewVC 1.1.21