summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-01-11 13:03:08 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-01-11 13:03:19 (GMT)
commita3a60620817ae9c1bc4f52e128acee23832b5b03 (patch)
tree04c6cf7269a4233d0fcb12fee9f30bc92f841fdd
parente9684673540660ba63a8ab49a9c68d0f69395bfa (diff)
parentd2be9d0f9327a12a212064275c609f983ae2fecb (diff)
downloadCMake-a3a60620817ae9c1bc4f52e128acee23832b5b03.zip
CMake-a3a60620817ae9c1bc4f52e128acee23832b5b03.tar.gz
CMake-a3a60620817ae9c1bc4f52e128acee23832b5b03.tar.bz2
Merge topic 'add_nvfortran_to_fortran_compiler_names'
d2be9d0f93 Fortran: Support searching for the `nvfortran` executable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6850
-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)