summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2014-07-24 17:07:08 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2014-07-24 17:07:08 (GMT)
commit65e3b596e35a9cf4a227e6a3902bb5dd818a31a6 (patch)
treec640ce64311c6fc103995889116602fe7de33889 /CMakeLists.txt
parent161ab14bbdf7e9cdc60a9d0cc64536446b03da2a (diff)
downloadhdf5-65e3b596e35a9cf4a227e6a3902bb5dd818a31a6.zip
hdf5-65e3b596e35a9cf4a227e6a3902bb5dd818a31a6.tar.gz
hdf5-65e3b596e35a9cf4a227e6a3902bb5dd818a31a6.tar.bz2
[svn-r25480] Added error if Fortran's default real is double precision. If it is and HL is being built then configure returns an error. This is due to HDFFV-889.
Tested: jam with intel cmake options: -DCMAKE_Fortran_FLAGS:STRING="-r8" (should fail) and -DHDF5_BUILD_HL_LIB:BOOL=OFF (should pass)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9ee21de..6877b6a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -703,7 +703,6 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
endif (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
endif (HDF5_PACKAGE_EXTLIBS)
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
-
#-----------------------------------------------------------------------------
# Option to use threadsafe
# Note: Currently CMake only allows configuring of threadsafe on
@@ -881,6 +880,16 @@ if (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
endif (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
#-----------------------------------------------------------------------------
+# Check if Fortran's default real is double precision. If it is and HL is
+# being built then configure should fail due to bug HDFFV-889.
+#-----------------------------------------------------------------------------
+ if (HDF5_BUILD_FORTRAN AND HDF5_BUILD_HL_LIB )
+ if (NOT FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
+ message (FATAL_ERROR " **** Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use HDF5_BUILD_HL_LIB:BOOL=OFF **** ")
+ endif (NOT FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
+ endif (HDF5_BUILD_FORTRAN AND HDF5_BUILD_HL_LIB )
+
+#-----------------------------------------------------------------------------
# Generate the H5pubconf.h file containing user settings needed by compilation
#-----------------------------------------------------------------------------
configure_file (${HDF_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_BINARY_DIR}/H5pubconf.h @ONLY)