summaryrefslogtreecommitdiffstats
path: root/config/cmake/HDF5UseFortran.cmake
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-08-24 19:22:55 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-08-24 19:22:55 (GMT)
commit76d7d3cb976feced595c978575f1e46a7b67b223 (patch)
treea579fb7e23ba16d01736223d542397681fbdb840 /config/cmake/HDF5UseFortran.cmake
parent47d97ed2c072926a2039e29f0ddda561fcaf502d (diff)
downloadhdf5-76d7d3cb976feced595c978575f1e46a7b67b223.zip
hdf5-76d7d3cb976feced595c978575f1e46a7b67b223.tar.gz
hdf5-76d7d3cb976feced595c978575f1e46a7b67b223.tar.bz2
[svn-r27570] Fixed issue with REAL max detection.
tested: h5committest
Diffstat (limited to 'config/cmake/HDF5UseFortran.cmake')
-rw-r--r--config/cmake/HDF5UseFortran.cmake24
1 files changed, 13 insertions, 11 deletions
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index f445f54..8ca10a7 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -227,9 +227,9 @@ message ( " ........MAX DECIMAL PRECISION ${H5_PAC_FC_MAX_REAL_PRECISION}")
# **********
# INTEGERS
# **********
-string(REGEX REPLACE "," ";" VAR_KIND "${pac_validIntKinds}")
+string(REGEX REPLACE "," ";" VAR "${pac_validIntKinds}")
-foreach( KIND ${VAR_KIND} )
+foreach( KIND ${VAR} )
set(PROG_SRC
"
PROGRAM main
@@ -262,14 +262,14 @@ message("...FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}")
# **********
# REALS
# **********
-string(REGEX REPLACE "," ";" VAR_KIND "${pac_validRealKinds}")
+string(REGEX REPLACE "," ";" VAR "${pac_validRealKinds}")
#find the maximum kind of the real
-list(LENGTH VAR_KIND LEN_VAR_KIND)
-MATH (EXPR _LEN "${LEN_VAR_KIND} - 1")
-list(GET VAR_KIND ${_LEN} max_real_fortran_kind)
+list(LENGTH VAR LEN_VAR)
+MATH (EXPR _LEN "${LEN_VAR}-1")
+list(GET VAR ${_LEN} max_real_fortran_kind)
-foreach( KIND ${VAR_KIND} )
+foreach( KIND ${VAR} )
set(PROG_SRC
"
PROGRAM main
@@ -299,12 +299,14 @@ set(H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof =
message("...FOUND SIZEOF for REAL KINDs \{${pack_real_sizeof}\}")
+set(PAC_FC_ALL_REAL_KINDS_SIZEOF "\{${pack_real_sizeof}\}")
+
#find the maximum kind of the real
-list(LENGTH VAR_KIND LEN_VAR_KIND)
-MATH (EXPR _LEN "${LEN_VAR_KIND} - 1")
-list(GET VAR_KIND ${_LEN} max_real_fortran_sizeof)
+string(REGEX REPLACE "," ";" VAR "${pack_real_sizeof}")
+list(LENGTH VAR LEN_VAR)
+MATH (EXPR _LEN "${LEN_VAR}-1")
+list(GET VAR ${_LEN} max_real_fortran_sizeof)
-set(PAC_FC_ALL_REAL_KINDS_SIZEOF "\{${pack_real_sizeof}\}")
#-----------------------------------------------------------------------------
# Find sizeof of native kinds
#-----------------------------------------------------------------------------