diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2023-08-09 22:05:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-09 22:05:57 (GMT) |
commit | bf68e6eb3a2e9c209024769c1193fe31ffc39e23 (patch) | |
tree | 0f6ba695d4fd5f2a603abb0b0f5b9cd6f843754a /config/cmake/ConfigureChecks.cmake | |
parent | 14eb8f87f4bb4de52a633dec6427a0b75118c33b (diff) | |
download | hdf5-bf68e6eb3a2e9c209024769c1193fe31ffc39e23.zip hdf5-bf68e6eb3a2e9c209024769c1193fe31ffc39e23.tar.gz hdf5-bf68e6eb3a2e9c209024769c1193fe31ffc39e23.tar.bz2 |
set H5_PAC_C_MAX_REAL_PRECISION default to 0 when cross sompiling with (#3364)
CMake to fix Fortran build failures.
Diffstat (limited to 'config/cmake/ConfigureChecks.cmake')
-rw-r--r-- | config/cmake/ConfigureChecks.cmake | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 140c51c..f847457 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -851,21 +851,23 @@ if (HDF5_BUILD_FORTRAN) list (GET PROG_OUTPUT4 0 H5_LDBL_DIG) list (GET PROG_OUTPUT4 1 H5_FLT128_DIG) - endif () - if (${HDF_PREFIX}_SIZEOF___FLOAT128 EQUAL "0" OR FLT128_DIG EQUAL "0") - set (${HDF_PREFIX}_HAVE_FLOAT128 0) - set (${HDF_PREFIX}_SIZEOF___FLOAT128 0) - set (_PAC_C_MAX_REAL_PRECISION ${H5_LDBL_DIG}) + if (${HDF_PREFIX}_SIZEOF___FLOAT128 EQUAL "0" OR FLT128_DIG EQUAL "0") + set (${HDF_PREFIX}_HAVE_FLOAT128 0) + set (${HDF_PREFIX}_SIZEOF___FLOAT128 0) + set (_PAC_C_MAX_REAL_PRECISION ${H5_LDBL_DIG}) + else () + set (_PAC_C_MAX_REAL_PRECISION ${H5_FLT128_DIG}) + endif () + if (NOT ${_PAC_C_MAX_REAL_PRECISION}) + set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION 0) + else () + set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${_PAC_C_MAX_REAL_PRECISION}) + endif () + message (STATUS "maximum decimal precision for C var - ${${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION}") else () - set (_PAC_C_MAX_REAL_PRECISION ${H5_FLT128_DIG}) - endif () - if (NOT ${_PAC_C_MAX_REAL_PRECISION}) set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION 0) - else () - set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${_PAC_C_MAX_REAL_PRECISION}) endif () - message (STATUS "maximum decimal precision for C var - ${${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION}") endif() |