summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2016-06-09 20:39:17 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2016-06-09 20:39:17 (GMT)
commit1db1d99883397d92dc6984841fecfc391c52676d (patch)
treec676410f549bf77cb0b79f53765f2bfd2f17c95c /config
parent3b507bb8c494ff4eb5fe84c7097f66022d0f82db (diff)
downloadhdf5-1db1d99883397d92dc6984841fecfc391c52676d.zip
hdf5-1db1d99883397d92dc6984841fecfc391c52676d.tar.gz
hdf5-1db1d99883397d92dc6984841fecfc391c52676d.tar.bz2
[svn-r30064] Changed configure's behavior from a warning to an error
if the available Fortran KINDs, or Fortran decimal precision, can not be determined. (MSB, HDFFV-9922)
Diffstat (limited to 'config')
-rw-r--r--config/cmake/HDF5UseFortran.cmake41
1 files changed, 41 insertions, 0 deletions
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index 75bd17c..66e70b4 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -217,6 +217,17 @@ list(GET PROG_OUTPUT 0 pac_validIntKinds)
list(GET PROG_OUTPUT 1 pac_validRealKinds)
list(GET PROG_OUTPUT 2 H5_PAC_FC_MAX_REAL_PRECISION)
+# If the lists are empty then something went wrong.
+if( NOT pac_validIntKinds)
+ message (FATAL_ERROR "Failed to find available INTEGER KINDs for Fortran")
+endif()
+if( NOT pac_validRealKinds)
+ message (FATAL_ERROR "Failed to find available REAL KINDs for Fortran")
+endif()
+if( NOT H5_PAC_FC_MAX_REAL_PRECISION)
+ message (FATAL_ERROR "No output from Fortran decimal precision program")
+endif()
+
set(PAC_FC_ALL_INTEGER_KINDS "\{${pac_validIntKinds}\}")
set(PAC_FC_ALL_REAL_KINDS "\{${pac_validRealKinds}\}")
@@ -257,6 +268,11 @@ foreach( KIND ${VAR} )
string(REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}")
set(pack_int_sizeof "${pack_int_sizeof} ${PROG_OUTPUT1},")
endforeach(KIND)
+
+if (pack_int_sizeof STREQUAL "")
+ message (FATAL_ERROR "Failed to find available INTEGER KINDs for Fortran")
+endif()
+
string(STRIP ${pack_int_sizeof} pack_int_sizeof)
@@ -297,6 +313,11 @@ foreach( KIND ${VAR} )
string(REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}")
set(pack_real_sizeof "${pack_real_sizeof} ${PROG_OUTPUT1},")
endforeach(KIND)
+
+if (pack_int_sizeof STREQUAL "")
+ message (FATAL_ERROR "Failed to find available REAL KINDs for Fortran")
+endif()
+
string(STRIP ${pack_real_sizeof} pack_real_sizeof)
#Remove trailing comma
@@ -357,6 +378,26 @@ list(GET PROG_OUTPUT 3 PAC_FORTRAN_NATIVE_REAL_KIND)
list(GET PROG_OUTPUT 4 PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF)
list(GET PROG_OUTPUT 5 PAC_FORTRAN_NATIVE_DOUBLE_KIND)
+if (NOT PAC_FORTRAN_NATIVE_INTEGER_SIZEOF)
+ message (FATAL_ERROR "Failed to find SIZEOF NATIVE INTEGER KINDs for Fortran")
+endif()
+if (NOT PAC_FORTRAN_NATIVE_REAL_SIZEOF)
+ message (FATAL_ERROR "Failed to find SIZEOF NATIVE REAL KINDs for Fortran")
+endif()
+if (NOT PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF)
+ message (FATAL_ERROR "Failed to find SIZEOF NATIVE DOUBLE KINDs for Fortran")
+endif()
+if (NOT PAC_FORTRAN_NATIVE_INTEGER_KIND)
+ message (FATAL_ERROR "Failed to find KIND of NATIVE INTEGER for Fortran")
+endif()
+if (NOT PAC_FORTRAN_NATIVE_REAL_KIND)
+ message (FATAL_ERROR "Failed to find KIND of NATIVE REAL for Fortran")
+endif()
+if (NOT PAC_FORTRAN_NATIVE_DOUBLE_KIND)
+ message (FATAL_ERROR "Failed to find KIND of NATIVE DOUBLE for Fortran")
+endif()
+
+
set(FORTRAN_SIZEOF_LONG_DOUBLE ${${HDF_PREFIX}_SIZEOF_LONG_DOUBLE})
#set(H5_SIZEOF_LONG_DOUBLE ${${HDF_PREFIX}_SIZEOF_LONG_DOUBLE})