summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeFortranCompiler.cmake.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-01-12 14:38:13 (GMT)
committerBrad King <brad.king@kitware.com>2010-01-12 14:38:13 (GMT)
commit6c1e24276f97112c914065dff772246b0d73ec06 (patch)
tree6fdb3d3a6d9cfbcbdae500e91bc7277275f24ea7 /Modules/CMakeFortranCompiler.cmake.in
parentb5100623f32e82014c3994fd7ee19afca9506c19 (diff)
downloadCMake-6c1e24276f97112c914065dff772246b0d73ec06.zip
CMake-6c1e24276f97112c914065dff772246b0d73ec06.tar.gz
CMake-6c1e24276f97112c914065dff772246b0d73ec06.tar.bz2
Detect Fortran ABI Information
Implement Fortran 32/64-bit ABI detection on some platforms. We need to set CMAKE_SIZEOF_VOID_P correctly in Fortran-only projects so that the find_library() command knows whether to look for 64-bit binaries. We also detect ELF binaries to enable RPATH replacement. See issue #10119.
Diffstat (limited to 'Modules/CMakeFortranCompiler.cmake.in')
-rw-r--r--Modules/CMakeFortranCompiler.cmake.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in
index d8a9ed6..ba2b46d 100644
--- a/Modules/CMakeFortranCompiler.cmake.in
+++ b/Modules/CMakeFortranCompiler.cmake.in
@@ -30,5 +30,17 @@ ELSE(UNIX)
SET(CMAKE_Fortran_OUTPUT_EXTENSION .obj)
ENDIF(UNIX)
+# Save compiler ABI information.
+SET(CMAKE_Fortran_SIZEOF_DATA_PTR "@CMAKE_Fortran_SIZEOF_DATA_PTR@")
+SET(CMAKE_Fortran_COMPILER_ABI "@CMAKE_Fortran_COMPILER_ABI@")
+
+IF(CMAKE_Fortran_SIZEOF_DATA_PTR)
+ SET(CMAKE_SIZEOF_VOID_P "${CMAKE_Fortran_SIZEOF_DATA_PTR}")
+ENDIF(CMAKE_Fortran_SIZEOF_DATA_PTR)
+
+IF(CMAKE_Fortran_COMPILER_ABI)
+ SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_Fortran_COMPILER_ABI}")
+ENDIF(CMAKE_Fortran_COMPILER_ABI)
+
SET(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "@CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES@")
SET(CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES "@CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES@")