summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2022-01-10 14:48:25 (GMT)
committerRobert Maynard <rmaynard@nvidia.com>2022-01-10 14:48:25 (GMT)
commitd2be9d0f9327a12a212064275c609f983ae2fecb (patch)
tree3b6b4dab750856e00a62584d516cfdb74da525d7 /Modules
parent1e839298b09a9140abcfde9cc0bd29770fecd345 (diff)
downloadCMake-d2be9d0f9327a12a212064275c609f983ae2fecb.zip
CMake-d2be9d0f9327a12a212064275c609f983ae2fecb.tar.gz
CMake-d2be9d0f9327a12a212064275c609f983ae2fecb.tar.bz2
Fortran: Support searching for the `nvfortran` executable
Instead of relying on the PGI symlinks (pgf95/pgf90/...) to always exist.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 33b8bf4..1c4b6ea 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -52,6 +52,7 @@ else()
# frt: Fujitsu F77 compiler
# pathf90/pathf95/pathf2003: PathScale Fortran compiler
# pgf77/pgf90/pgf95/pgfortran: Portland Group F77/F90/F95 compilers
+ # nvfortran: NVHPC Fotran compiler
# flang: Flang Fortran compiler
# xlf/xlf90/xlf95: IBM (AIX) F77/F90/F95 compilers
# lf95: Lahey-Fujitsu F95 compiler
@@ -70,14 +71,14 @@ else()
# so if you paid for a compiler it is picked by default.
if(CMAKE_HOST_WIN32)
set(CMAKE_Fortran_COMPILER_LIST
- ifort ifx pgf95 pgfortran lf95 fort
+ ifort ifx pgf95 pgfortran nvfortran lf95 fort
flang gfortran gfortran-4 g95 f90 pgf90
pgf77 g77 f77 nag
)
else()
set(CMAKE_Fortran_COMPILER_LIST
ftn
- ifort ifc ifx efc pgf95 pgfortran lf95 xlf95 fort
+ ifort ifc ifx efc pgf95 pgfortran nvfortran lf95 xlf95 fort
flang lfortran gfortran gfortran-4 g95 f90 pgf90
frt pgf77 xlf g77 f77 nag
)
@@ -94,6 +95,7 @@ else()
set(_Fortran_COMPILER_NAMES_XL xlf)
set(_Fortran_COMPILER_NAMES_VisualAge xlf95 xlf90 xlf)
set(_Fortran_COMPILER_NAMES_NAG nagfor)
+ set(_Fortran_COMPILER_NAMES_NVHPC nvfortran)
endif()
_cmake_find_compiler(Fortran)