-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathcompiler_flags_NVHPC_Fortran.cmake
More file actions
41 lines (30 loc) · 1.51 KB
/
compiler_flags_NVHPC_Fortran.cmake
File metadata and controls
41 lines (30 loc) · 1.51 KB
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
####################################################################
# FLAGS COMMON TO ALL BUILD TYPES
####################################################################
set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
####################################################################
# RELEASE FLAGS
####################################################################
set( CMAKE_Fortran_FLAGS_RELEASE "-O2 -gopt -mp -Munroll -Minline" )
####################################################################
# DEBUG FLAGS
####################################################################
set( CMAKE_Fortran_FLAGS_DEBUG "-O0 -g -Mbounds -Mchkstk -traceback -mp" )
####################################################################
# BIT REPRODUCIBLE FLAGS
####################################################################
set( CMAKE_Fortran_FLAGS_BIT "-O2 -gopt -Munroll -Minline" )
####################################################################
# LINK FLAGS
####################################################################
set( CMAKE_Fortran_LINK_FLAGS "-mp" )
####################################################################
# Meaning of flags
# ----------------
# -mp : Enable OpenMP parallelization
# -gopt : Generate optimization information
# -Munroll : Unroll loops for better performance
# -Minline : Enable function inlining
# -Mbounds : Array bounds checking
# -Mchkstk : Check for stack overflow
# -traceback : Enable traceback on runtime errors