CMake/Modules/CMakeFortranCompilerABI.F
Brad King 6c1e24276f 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.
2010-01-12 09:38:13 -05:00

34 lines
822 B
Fortran

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