summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeFortranCompilerABI.F
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-11-29 20:13:47 (GMT)
committerBrad King <brad.king@kitware.com>2011-12-05 21:32:29 (GMT)
commitecd8414757368f45152f6e3e4841a5b3715fa2d3 (patch)
treea7a42232a92c873850d89f94a95fb41c5d3b67fe /Modules/CMakeFortranCompilerABI.F
parent89f6fbaae355c4b84a39640752c98a2c6d1b34e6 (diff)
downloadCMake-ecd8414757368f45152f6e3e4841a5b3715fa2d3.zip
CMake-ecd8414757368f45152f6e3e4841a5b3715fa2d3.tar.gz
CMake-ecd8414757368f45152f6e3e4841a5b3715fa2d3.tar.bz2
Fortran: Detect pointer size in gfortran on MinGW
Use __SIZEOF_POINTER__ which the GNU Fortran compiler defines at least on 64-bit MinGW. Assume default size 4 on MinGW if gfortran does not define the size.
Diffstat (limited to 'Modules/CMakeFortranCompilerABI.F')
-rw-r--r--Modules/CMakeFortranCompilerABI.F5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CMakeFortranCompilerABI.F b/Modules/CMakeFortranCompilerABI.F
index b8efb42..7e24553 100644
--- a/Modules/CMakeFortranCompilerABI.F
+++ b/Modules/CMakeFortranCompilerABI.F
@@ -15,6 +15,11 @@
PRINT *, 'INFO:sizeof_dptr[4]'
#elif defined(_M_IX86)
PRINT *, 'INFO:sizeof_dptr[4]'
+
+#elif defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ == 8
+ PRINT *, 'INFO:sizeof_dptr[8]'
+#elif defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__ == 4
+ PRINT *, 'INFO:sizeof_dptr[4]'
#endif
#if 0