diff options
author | Michael Hirsch <scivision@users.noreply.github.com> | 2021-06-20 06:56:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-06-25 15:44:05 (GMT) |
commit | 97e2828d14b7afbf4e22a3ea5b4ecf49f1f7c6f2 (patch) | |
tree | 8946be5518ddf83deee02570f21b1bc270f688bf /Modules/CMakeTestFortranCompiler.cmake | |
parent | a6b075c3f8306a6192e66206252d76e2e5925432 (diff) | |
download | CMake-97e2828d14b7afbf4e22a3ea5b4ecf49f1f7c6f2.zip CMake-97e2828d14b7afbf4e22a3ea5b4ecf49f1f7c6f2.tar.gz CMake-97e2828d14b7afbf4e22a3ea5b4ecf49f1f7c6f2.tar.bz2 |
Fortran: Subsume F90 check into ABI check
Follow the approach from commit 1d21dd0f7c (enable_language: Assume
compiler works if ABI detection compiles, 2020-05-25, v3.18.0-rc1~93^2)
to avoid a redundant check for F90 support. Almost all maintained
Fortran compilers support F90 these days.
Fixes: #22222
Diffstat (limited to 'Modules/CMakeTestFortranCompiler.cmake')
-rw-r--r-- | Modules/CMakeTestFortranCompiler.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake index 10fb0a7..4fdec94 100644 --- a/Modules/CMakeTestFortranCompiler.cmake +++ b/Modules/CMakeTestFortranCompiler.cmake @@ -17,11 +17,18 @@ unset(CMAKE_Fortran_COMPILER_WORKS CACHE) # Try to identify the ABI and configure it into CMakeFortranCompiler.cmake include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake) -CMAKE_DETERMINE_COMPILER_ABI(Fortran ${CMAKE_ROOT}/Modules/CMakeFortranCompilerABI.F) +CMAKE_DETERMINE_COMPILER_ABI(Fortran ${CMAKE_ROOT}/Modules/CMakeFortranCompilerABI.F90) if(CMAKE_Fortran_ABI_COMPILED) # The compiler worked so skip dedicated test below. set(CMAKE_Fortran_COMPILER_WORKS TRUE) + set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1) message(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER} - skipped") +else() + cmake_determine_compiler_abi(Fortran ${CMAKE_ROOT}/Modules/CMakeFortranCompilerABI.F) + if(CMAKE_Fortran_ABI_COMPILED) + set(CMAKE_Fortran_COMPILER_WORKS TRUE) + message(STATUS "Check for working Fortran 77 compiler: ${CMAKE_Fortran_COMPILER} - skipped") + endif() endif() # This file is used by EnableLanguage in cmGlobalGenerator to |