diff options
author | Brad King <brad.king@kitware.com> | 2018-02-22 16:37:05 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-02-22 16:37:10 (GMT) |
commit | 020be379f4993cad5f2ca2066286f6f449b21f52 (patch) | |
tree | f6539f083dc857166c4c7eabc228611689c01076 /Modules | |
parent | 5c0223886e68a305d0f8f6d60a010dd8c5ae0290 (diff) | |
parent | 965f977c7c90512f80776781dfeb52bc7e73bcff (diff) | |
download | CMake-020be379f4993cad5f2ca2066286f6f449b21f52.zip CMake-020be379f4993cad5f2ca2066286f6f449b21f52.tar.gz CMake-020be379f4993cad5f2ca2066286f6f449b21f52.tar.bz2 |
Merge topic 'fortran-compiler'
965f977c Fortran: Adjust compiler candidates based on host platform
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1780
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineFortranCompiler.cmake | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake index cf502f6..5ddd64f 100644 --- a/Modules/CMakeDetermineFortranCompiler.cmake +++ b/Modules/CMakeDetermineFortranCompiler.cmake @@ -66,12 +66,20 @@ else() # The order is 95 or newer compilers first, then 90, # then 77 or older compilers, gnu is always last in the group, # so if you paid for a compiler it is picked by default. - set(CMAKE_Fortran_COMPILER_LIST - ftn - ifort ifc af95 af90 efc f95 pathf2003 pathf95 pgf95 pgfortran lf95 xlf95 - fort flang gfortran gfortran-4 g95 f90 pathf90 pgf90 xlf90 epcf90 fort77 - frt pgf77 xlf fl32 af77 g77 f77 nag - ) + if(CMAKE_HOST_WIN32) + set(CMAKE_Fortran_COMPILER_LIST + ifort pgf95 pgfortran lf95 fort + flang gfortran gfortran-4 g95 f90 pgf90 + pgf77 g77 f77 nag + ) + else() + set(CMAKE_Fortran_COMPILER_LIST + ftn + ifort ifc efc pgf95 pgfortran lf95 xlf95 fort + flang gfortran gfortran-4 g95 f90 pgf90 + frt pgf77 xlf g77 f77 nag + ) + endif() # Vendor-specific compiler names. set(_Fortran_COMPILER_NAMES_GNU gfortran gfortran-4 g95 g77) |