CMakeFortranCompilerABI.F 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. PROGRAM CMakeFortranCompilerABI
  2. #if 0
  3. ! Address Size
  4. #endif
  5. #if defined(_LP64)
  6. PRINT *, 'INFO:sizeof_dptr[8]'
  7. #elif defined(_M_IA64)
  8. PRINT *, 'INFO:sizeof_dptr[8]'
  9. #elif defined(_M_X64)
  10. PRINT *, 'INFO:sizeof_dptr[8]'
  11. #elif defined(_M_AMD64)
  12. PRINT *, 'INFO:sizeof_dptr[8]'
  13. #elif defined(__x86_64__)
  14. PRINT *, 'INFO:sizeof_dptr[8]'
  15. #elif defined(_ILP32)
  16. PRINT *, 'INFO:sizeof_dptr[4]'
  17. #elif defined(_M_IX86)
  18. PRINT *, 'INFO:sizeof_dptr[4]'
  19. #elif defined(__i386__)
  20. PRINT *, 'INFO:sizeof_dptr[4]'
  21. #elif defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ == 8
  22. PRINT *, 'INFO:sizeof_dptr[8]'
  23. #elif defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ == 4
  24. PRINT *, 'INFO:sizeof_dptr[4]'
  25. #elif defined(__SIZEOF_SIZE_T__) && __SIZEOF_SIZE_T__ == 8
  26. PRINT *, 'INFO:sizeof_dptr[8]'
  27. #elif defined(__SIZEOF_SIZE_T__) && __SIZEOF_SIZE_T__ == 4
  28. PRINT *, 'INFO:sizeof_dptr[4]'
  29. #endif
  30. #if 0
  31. ! Application Binary Interface
  32. #endif
  33. #if defined(__ELF__)
  34. PRINT *, 'INFO:abi[ELF]'
  35. #endif
  36. PRINT *, 'ABI Detection'
  37. END