summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-07-30 21:31:39 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-07-30 21:31:39 (GMT)
commit323635f2b57e32db00c5ba27ebb8ef40f2dc5894 (patch)
treeefd3c0f1dae0dd415d8902668916709640fbd1b8
parent63fa8acbac3d6696c99aa72981355e383ccef8bd (diff)
downloadhdf5-323635f2b57e32db00c5ba27ebb8ef40f2dc5894.zip
hdf5-323635f2b57e32db00c5ba27ebb8ef40f2dc5894.tar.gz
hdf5-323635f2b57e32db00c5ba27ebb8ef40f2dc5894.tar.bz2
HDFFV-10508 correct sizeof
-rw-r--r--config/cmake/ConfigureChecks.cmake8
-rw-r--r--config/cmake/HDF5UseFortran.cmake8
2 files changed, 9 insertions, 7 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 0d955d0..a5444ef 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -167,14 +167,16 @@ endif ()
# Check if C has __float128 extension
#-----------------------------------------------------------------------------
-CHECK_TYPE_SIZE("__float128" SIZEOF___FLOAT128)
-if (${HAVE_SIZEOF___FLOAT128})
+CHECK_TYPE_SIZE("__float128" ${HDF_PREFIX}_SIZEOF___FLOAT128)
+if (${${HDF_PREFIX}_SIZEOF___FLOAT128})
set (${HDF_PREFIX}_HAVE_FLOAT128 1)
else ()
set (${HDF_PREFIX}_HAVE_FLOAT128 0)
- set (SIZEOF___FLOAT128 0)
+ set (${HDF_PREFIX}_SIZEOF___FLOAT128 0)
endif ()
+CHECK_TYPE_SIZE("_Quad" ${HDF_PREFIX}_SIZEOF__QUAD)
+
#-----------------------------------------------------------------------------
# Macro to determine the various conversion capabilities
#-----------------------------------------------------------------------------
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index 9c585a0..c7f4f8b 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -341,8 +341,8 @@ endif ()
set (${HDF_PREFIX}_FORTRAN_SIZEOF_LONG_DOUBLE ${${HDF_PREFIX}_SIZEOF_LONG_DOUBLE})
# remove the invalid kind from the list
-if (NOT(${SIZEOF___FLOAT128} EQUAL 0))
- if (NOT(${SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof})
+if (NOT(${${HDF_PREFIX}_SIZEOF___FLOAT128} EQUAL 0))
+ if (NOT(${${HDF_PREFIX}_SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof})
AND NOT(${${HDF_PREFIX}_FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof})
# account for the fact that the C compiler can have 16-byte __float128 and the fortran compiler only has 8-byte doubles,
# so we don't want to remove the 8-byte fortran doubles.
@@ -423,7 +423,7 @@ set (PROG_SRC
"
#include <float.h>
#include <stdio.h>
-#define CHECK_FLOAT128 ${SIZEOF___FLOAT128}
+#define CHECK_FLOAT128 ${${HDF_PREFIX}_SIZEOF___FLOAT128}
#if CHECK_FLOAT128!=0
# if ${${HDF_PREFIX}_HAVE_QUADMATH_H}!=0
#include <quadmath.h>
@@ -462,7 +462,7 @@ list (GET PROG_OUTPUT 1 FLT128_DIG)
if (SIZEOF___FLOAT128 EQUAL 0 OR FLT128_DIG EQUAL 0)
set (${HDF_PREFIX}_HAVE_FLOAT128 0)
- set (SIZEOF___FLOAT128 0)
+ set (${HDF_PREFIX}_SIZEOF___FLOAT128 0)
set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${LDBL_DIG})
else ()
set(${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${FLT128_DIG})