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" )
3131 else ()
3232 set (FOPT_ILP64 -i8)
3333 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 ()
3440else ()
3541 set (CPE_ENV $ENV{PE_ENV} )
3642 if (CPE_ENV STREQUAL "CRAY" )
@@ -138,6 +144,17 @@ elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "NAG" )
138144 set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -quiet" )
139145 endif ()
140146
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+
141158else ()
142159endif ()
143160
Original file line number Diff line number Diff line change @@ -141,6 +141,8 @@ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL XL)
141141 check_fortran_compiler_flag("-qrecur" _qrecurFlag)
142142elseif (CMAKE_Fortran_COMPILER_ID STREQUAL NAG)
143143 check_fortran_compiler_flag("-recursive" _recursiveFlag)
144+ elseif (CMAKE_Fortran_COMPILER_ID STREQUAL NVHPC)
145+ check_fortran_compiler_flag("-Mrecursive" _MrecursiveFlag)
144146else ()
145147 message (WARNING "Fortran local arrays should be allocated on the stack."
146148 " Please use a compiler which guarantees that feature."
You can’t perform that action at this time.
0 commit comments