summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeTestFortranCompiler.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-07-13 15:24:01 (GMT)
committerBrad King <brad.king@kitware.com>2009-07-13 15:24:01 (GMT)
commitde6f88d06f907f4cbaab5462cd079fcd77193e41 (patch)
treea38f31920d6fbcbc8c79c2c143625f6b4472ec82 /Modules/CMakeTestFortranCompiler.cmake
parenta03bb5a28f42767d1494cb17971103faae5b409b (diff)
downloadCMake-de6f88d06f907f4cbaab5462cd079fcd77193e41.zip
CMake-de6f88d06f907f4cbaab5462cd079fcd77193e41.tar.gz
CMake-de6f88d06f907f4cbaab5462cd079fcd77193e41.tar.bz2
ENH: Create Fortran ABI detection framework
This invokes CMakeDetermineCompilerABI.cmake for Fortran at the same place it is already done for C and CXX.
Diffstat (limited to 'Modules/CMakeTestFortranCompiler.cmake')
-rw-r--r--Modules/CMakeTestFortranCompiler.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake
index c4e6395..6591c2d 100644
--- a/Modules/CMakeTestFortranCompiler.cmake
+++ b/Modules/CMakeTestFortranCompiler.cmake
@@ -34,6 +34,20 @@ ELSE(NOT CMAKE_Fortran_COMPILER_WORKS)
"the following output:\n${OUTPUT}\n\n")
ENDIF(FORTRAN_TEST_WAS_RUN)
SET(CMAKE_Fortran_COMPILER_WORKS 1 CACHE INTERNAL "")
+
+ IF(CMAKE_Fortran_COMPILER_FORCED)
+ # The compiler configuration was forced by the user.
+ # Assume the user has configured all compiler information.
+ ELSE(CMAKE_Fortran_COMPILER_FORCED)
+ # 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)
+ CONFIGURE_FILE(
+ ${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake
+ @ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
+ )
+ ENDIF(CMAKE_Fortran_COMPILER_FORCED)
ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS)
IF(CMAKE_Fortran_COMPILER_WORKS)