File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,12 @@ elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "NAG" )
31
31
else ()
32
32
set (FOPT_ILP64 -i8 )
33
33
endif ()
34
+ elseif ( CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC" )
35
+ if ( WIN32 )
36
+ set (FOPT_ILP64 /i8 )
37
+ else ()
38
+ set (FOPT_ILP64 -i8 )
39
+ endif ()
34
40
else ()
35
41
set (CPE_ENV $ENV{PE_ENV} )
36
42
if (CPE_ENV STREQUAL "CRAY" )
@@ -138,6 +144,17 @@ elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "NAG" )
138
144
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -quiet" )
139
145
endif ()
140
146
147
+ # NVIDIA HPC SDK
148
+ elseif ( CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC" )
149
+ if ( ("${CMAKE_Fortran_FLAGS} " MATCHES "-Ktrap=" ) AND
150
+ NOT ("${CMAKE_Fortran_FLAGS} " MATCHES "-Ktrap=none" ) )
151
+ set ( FPE_EXIT TRUE )
152
+ endif ()
153
+
154
+ if ( NOT ("${CMAKE_Fortran_FLAGS} " MATCHES "[-/]Kieee" ) )
155
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Kieee" )
156
+ endif ()
157
+
141
158
else ()
142
159
endif ()
143
160
Original file line number Diff line number Diff line change @@ -141,6 +141,8 @@ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL XL)
141
141
check_fortran_compiler_flag ("-qrecur" _qrecurFlag )
142
142
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL NAG )
143
143
check_fortran_compiler_flag ("-recursive" _recursiveFlag )
144
+ elseif (CMAKE_Fortran_COMPILER_ID STREQUAL NVHPC )
145
+ check_fortran_compiler_flag ("-Mrecursive" _MrecursiveFlag )
144
146
else ()
145
147
message (WARNING "Fortran local arrays should be allocated on the stack."
146
148
" Please use a compiler which guarantees that feature."
You can’t perform that action at this time.
0 commit comments