[Cmake-commits] [cmake-commits] king committed CMakeFortranCompiler.cmake.in 1.14 1.15 CMakeFortranCompilerABI.F 1.1 1.2
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Jan 12 09:38:17 EST 2010
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv5924/Modules
Modified Files:
CMakeFortranCompiler.cmake.in CMakeFortranCompilerABI.F
Log Message:
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.
Index: CMakeFortranCompilerABI.F
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeFortranCompilerABI.F,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** CMakeFortranCompilerABI.F 13 Jul 2009 15:24:01 -0000 1.1
--- CMakeFortranCompilerABI.F 12 Jan 2010 14:38:13 -0000 1.2
***************
*** 1,3 ****
! PROGRAM CMakeFortranCompilerId
! PRINT *, 'ABI Detection Binary'
END
--- 1,33 ----
! PROGRAM CMakeFortranCompilerABI
! #if 0
! ! Address Size
! #endif
! #if defined(_LP64)
! PRINT *, 'INFO:sizeof_dptr[8]'
! #elif defined(_M_IA64)
! PRINT *, 'INFO:sizeof_dptr[8]'
! #elif defined(_M_X64)
! PRINT *, 'INFO:sizeof_dptr[8]'
! #elif defined(_M_AMD64)
! PRINT *, 'INFO:sizeof_dptr[8]'
!
! #elif defined(_ILP32)
! PRINT *, 'INFO:sizeof_dptr[4]'
! #elif defined(_M_IX86)
! PRINT *, 'INFO:sizeof_dptr[4]'
! #endif
!
! #if 0
! ! Application Binary Interface
! #endif
! #if defined(__sgi) && defined(_ABIO32)
! PRINT *, 'INFO:abi[ELF O32]'
! #elif defined(__sgi) && defined(_ABIN32)
! PRINT *, 'INFO:abi[ELF N32]'
! #elif defined(__sgi) && defined(_ABI64)
! PRINT *, 'INFO:abi[ELF 64]'
! #elif defined(__ELF__)
! PRINT *, 'INFO:abi[ELF]'
! #endif
! PRINT *, 'ABI Detection'
END
Index: CMakeFortranCompiler.cmake.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeFortranCompiler.cmake.in,v
retrieving revision 1.14
retrieving revision 1.15
diff -C 2 -d -r1.14 -r1.15
*** CMakeFortranCompiler.cmake.in 30 Jul 2009 17:46:51 -0000 1.14
--- CMakeFortranCompiler.cmake.in 12 Jan 2010 14:38:12 -0000 1.15
***************
*** 31,34 ****
--- 31,46 ----
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@")
More information about the Cmake-commits
mailing list