summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-12-06 14:01:32 (GMT)
committerBrad King <brad.king@kitware.com>2013-12-06 14:02:27 (GMT)
commit5da1580adaa0b7ccf5f3a6afac5e9cae615ca163 (patch)
tree82947154c1eb413e934d2155ab869b37b7f9678f /Modules
parentce598cc838c717132a122a97c5e21b99f11fe23b (diff)
downloadCMake-5da1580adaa0b7ccf5f3a6afac5e9cae615ca163.zip
CMake-5da1580adaa0b7ccf5f3a6afac5e9cae615ca163.tar.gz
CMake-5da1580adaa0b7ccf5f3a6afac5e9cae615ca163.tar.bz2
Fortran: Improve pointer size detection in gfortran on MinGW
In commit ecd84147 (Fortran: Detect pointer size in gfortran on MinGW, 2011-11-29) we started testing for __SIZEOF_POINTER__ but not all GNU Fortran compilers define this. Check also for __SIZEOF_SIZE_T__ which at least one version of gfortran defines without also defining __SIZEOF_POINTER__.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeFortranCompilerABI.F4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/CMakeFortranCompilerABI.F b/Modules/CMakeFortranCompilerABI.F
index 7e24553..21ca7ff 100644
--- a/Modules/CMakeFortranCompilerABI.F
+++ b/Modules/CMakeFortranCompilerABI.F
@@ -20,6 +20,10 @@
PRINT *, 'INFO:sizeof_dptr[8]'
#elif defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ == 4
PRINT *, 'INFO:sizeof_dptr[4]'
+#elif defined(__SIZEOF_SIZE_T__) && __SIZEOF_SIZE_T__ == 8
+ PRINT *, 'INFO:sizeof_dptr[8]'
+#elif defined(__SIZEOF_SIZE_T__) && __SIZEOF_SIZE_T__ == 4
+ PRINT *, 'INFO:sizeof_dptr[4]'
#endif
#if 0