diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-08-19 13:40:27 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2015-08-19 13:40:27 (GMT) |
commit | 2b4038e5e75dd488cd920e0b2f8e6382ac254bff (patch) | |
tree | 20ed344f0ce5703ad5c4f07809464e188400a958 /config/cmake/HDF5UseFortran.cmake | |
parent | 6e0edba918dcbdd62414791d0e2b2f57bc97b8b5 (diff) | |
download | hdf5-2b4038e5e75dd488cd920e0b2f8e6382ac254bff.zip hdf5-2b4038e5e75dd488cd920e0b2f8e6382ac254bff.tar.gz hdf5-2b4038e5e75dd488cd920e0b2f8e6382ac254bff.tar.bz2 |
[svn-r27524] Added test to not remove double precision from valid KINDS if it is the largest compatible REAL with C.
Tested: h5committest.
Diffstat (limited to 'config/cmake/HDF5UseFortran.cmake')
-rw-r--r-- | config/cmake/HDF5UseFortran.cmake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index b3dec14..02f97f0 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -351,14 +351,18 @@ set(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}) AND NOT(${FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof})) + if(NOT(${SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof}) + AND NOT(${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. + AND NOT(${PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF} EQUAL ${max_real_fortran_sizeof})) message(WARNING " Fortran REAL(KIND=${max_real_fortran_kind}) is $max_real_fortran_sizeof Bytes, but no corresponding C float type exists of that size !!! Fortran interfaces will not be generated for REAL(KIND=${max_real_fortran_kind}) !!!") string(REGEX REPLACE ",[0-9]+}" "}" PAC_FC_ALL_REAL_KINDS ${PAC_FC_ALL_REAL_KINDS}) string(REGEX REPLACE ",[0-9]+}" "}" PAC_FC_ALL_REAL_KINDS_SIZEOF ${PAC_FC_ALL_REAL_KINDS_SIZEOF}) MATH (EXPR NUM_RKIND "${NUM_RKIND} - 1") - endif(NOT(${SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof}) AND NOT(${FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof})) + endif() endif(NOT(${SIZEOF___FLOAT128} EQUAL 0)) set(H5CONFIG_F_NUM_RKIND "INTEGER, PARAMETER :: num_rkinds = ${NUM_RKIND}") |