Browse Source

Fortran: Detect pointer size on Intel archs with PGI (#14870)

The PGI compiler does not define __SIZEOF_POINTER__ so use the
__x86_64__ or __i386__ CPU macros to select a pointer size instead.
pull/101/head
Brad King 11 years ago
parent
commit
eb8cb2c6c2
  1. 4
      Modules/CMakeFortranCompilerABI.F

4
Modules/CMakeFortranCompilerABI.F

@ -10,11 +10,15 @@
PRINT *, 'INFO:sizeof_dptr[8]'
#elif defined(_M_AMD64)
PRINT *, 'INFO:sizeof_dptr[8]'
#elif defined(__x86_64__)
PRINT *, 'INFO:sizeof_dptr[8]'
#elif defined(_ILP32)
PRINT *, 'INFO:sizeof_dptr[4]'
#elif defined(_M_IX86)
PRINT *, 'INFO:sizeof_dptr[4]'
#elif defined(__i386__)
PRINT *, 'INFO:sizeof_dptr[4]'
#elif defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ == 8
PRINT *, 'INFO:sizeof_dptr[8]'

Loading…
Cancel
Save