summaryrefslogtreecommitdiffstats
path: root/config/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake')
-rw-r--r--config/cmake/ConfigureChecks.cmake65
-rw-r--r--config/cmake/HDF5Macros.cmake36
-rw-r--r--config/cmake/HDF5Tests.c11
3 files changed, 95 insertions, 17 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 1318e90..b5b1170 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -35,6 +35,7 @@ OPTION (HDF5_Enable_Clear_File_Buffers "Securely clear file buffers before writi
IF (HDF5_Enable_Clear_File_Buffers)
SET (H5_CLEAR_MEMORY 1)
ENDIF (HDF5_Enable_Clear_File_Buffers)
+MARK_AS_ADVANCED (HDF5_Enable_Clear_File_Buffers)
#-----------------------------------------------------------------------------
# Option for --enable-instrument
@@ -46,6 +47,7 @@ OPTION (HDF5_Enable_Instrument "Instrument The library" HDF5_Enable_Instrument)
IF (HDF5_Enable_Instrument)
SET (H5_HAVE_INSTRUMENTED_LIBRARY 1)
ENDIF (HDF5_Enable_Instrument)
+MARK_AS_ADVANCED (HDF5_Enable_Instrument)
#-----------------------------------------------------------------------------
# Option for --enable-strict-format-checks
@@ -54,6 +56,7 @@ OPTION (HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks"
IF (HDF5_STRICT_FORMAT_CHECKS)
SET (H5_STRICT_FORMAT_CHECKS 1)
ENDIF (HDF5_STRICT_FORMAT_CHECKS)
+MARK_AS_ADVANCED (HDF5_STRICT_FORMAT_CHECKS)
#-----------------------------------------------------------------------------
# Option for --enable-metadata-trace-file
@@ -62,6 +65,7 @@ OPTION (HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" OFF)
IF (HDF5_METADATA_TRACE_FILE)
SET (H5_METADATA_TRACE_FILE 1)
ENDIF (HDF5_METADATA_TRACE_FILE)
+MARK_AS_ADVANCED (HDF5_METADATA_TRACE_FILE)
# ----------------------------------------------------------------------
# Decide whether the data accuracy has higher priority during data
@@ -73,6 +77,7 @@ OPTION (HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conv
IF (HDF5_WANT_DATA_ACCURACY)
SET (H5_WANT_DATA_ACCURACY 1)
ENDIF(HDF5_WANT_DATA_ACCURACY)
+MARK_AS_ADVANCED (HDF5_WANT_DATA_ACCURACY)
# ----------------------------------------------------------------------
# Decide whether the presence of user's exception handling functions is
@@ -84,24 +89,16 @@ OPTION (HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked durin
IF (HDF5_WANT_DCONV_EXCEPTION)
SET (H5_WANT_DCONV_EXCEPTION 1)
ENDIF (HDF5_WANT_DCONV_EXCEPTION)
+MARK_AS_ADVANCED (HDF5_WANT_DCONV_EXCEPTION)
-SET (LINUX_LFS 0)
-SET (HDF5_EXTRA_FLAGS)
-IF (CMAKE_SYSTEM MATCHES "Linux-([3-9]\\.[0-9]|2\\.[4-9])\\.")
- # Linux Specific flags
- ADD_DEFINITIONS (-D_POSIX_SOURCE -D_BSD_SOURCE)
- OPTION (HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON)
- IF (HDF5_ENABLE_LARGE_FILE)
- SET (LARGEFILE 1)
- SET (HDF5_EXTRA_FLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
- SET (CMAKE_REQUIRED_DEFINITIONS ${HDF5_EXTRA_FLAGS})
- ENDIF (HDF5_ENABLE_LARGE_FILE)
-ENDIF (CMAKE_SYSTEM MATCHES "Linux-([3-9]\\.[0-9]|2\\.[4-9])\\.")
-IF (LINUX_LFS)
- SET (HDF5_EXTRA_FLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
- SET (CMAKE_REQUIRED_DEFINITIONS ${HDF5_EXTRA_FLAGS})
-ENDIF (LINUX_LFS)
-ADD_DEFINITIONS (${HDF5_EXTRA_FLAGS})
+# ----------------------------------------------------------------------
+# Check if they would like the function stack support compiled in
+#
+OPTION (HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF)
+IF (HDF5_ENABLE_CODESTACK)
+ SET (H5_HAVE_CODESTACK 1)
+ENDIF (HDF5_ENABLE_CODESTACK)
+MARK_AS_ADVANCED (HDF5_ENABLE_CODESTACK)
#IF (WIN32)
# SET (DEFAULT_STREAM_VFD OFF)
@@ -253,6 +250,28 @@ IF (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
ENDIF (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
#-----------------------------------------------------------------------------
+# Check for large file support
+#-----------------------------------------------------------------------------
+
+SET (LINUX_LFS 0)
+SET (HDF5_EXTRA_FLAGS)
+IF (CMAKE_SYSTEM MATCHES "Linux-([3-9]\\.[0-9]|2\\.[4-9])\\.")
+ # Linux Specific flags
+ ADD_DEFINITIONS (-D_POSIX_SOURCE -D_BSD_SOURCE)
+ OPTION (HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON)
+ IF (HDF5_ENABLE_LARGE_FILE)
+ SET (LARGEFILE 1)
+ SET (HDF5_EXTRA_FLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
+ SET (CMAKE_REQUIRED_DEFINITIONS ${HDF5_EXTRA_FLAGS})
+ ENDIF (HDF5_ENABLE_LARGE_FILE)
+ENDIF (CMAKE_SYSTEM MATCHES "Linux-([3-9]\\.[0-9]|2\\.[4-9])\\.")
+IF (LINUX_LFS)
+ SET (HDF5_EXTRA_FLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
+ SET (CMAKE_REQUIRED_DEFINITIONS ${HDF5_EXTRA_FLAGS})
+ENDIF (LINUX_LFS)
+ADD_DEFINITIONS (${HDF5_EXTRA_FLAGS})
+
+#-----------------------------------------------------------------------------
# Check the size in bytes of all the int and float types
#-----------------------------------------------------------------------------
MACRO (H5_CHECK_TYPE_SIZE type var)
@@ -531,6 +550,18 @@ ELSE (WINDOWS)
ENDIF (WINDOWS)
#-----------------------------------------------------------------------------
+# Option to see if GPFS is available on this filesystem --enable-gpfs
+#-----------------------------------------------------------------------------
+OPTION (HDF5_ENABLE_GPFS "Enable GPFS hints for the MPI/POSIX file driver" OFF)
+IF (HDF5_ENABLE_GPFS)
+ CHECK_INCLUDE_FILE_CONCAT ("gpfs.h" HAVE_GPFS)
+ IF (HAVE_GPFS)
+ HDF5_FUNCTION_TEST (HAVE_GPFS)
+ ENDIF (HAVE_GPFS)
+ENDIF (HDF5_ENABLE_GPFS)
+MARK_AS_ADVANCED (HDF5_ENABLE_GPFS)
+
+#-----------------------------------------------------------------------------
# Look for 64 bit file stream capability
#-----------------------------------------------------------------------------
IF (HAVE_OFF64_T)
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake
index 8b30fbf..99fbea1 100644
--- a/config/cmake/HDF5Macros.cmake
+++ b/config/cmake/HDF5Macros.cmake
@@ -120,3 +120,39 @@ MACRO (H5_SET_LIB_OPTIONS libtarget libname libtype)
ENDMACRO (H5_SET_LIB_OPTIONS)
+#-------------------------------------------------------------------------------
+MACRO (TARGET_WIN_PROPERTIES target)
+ IF (WIN32)
+ IF (MSVC)
+ IF (NOT BUILD_SHARED_LIBS)
+ SET_TARGET_PROPERTIES (${target}
+ PROPERTIES
+ LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
+ )
+ ENDIF (NOT BUILD_SHARED_LIBS)
+ ENDIF (MSVC)
+ ENDIF (WIN32)
+ENDMACRO (TARGET_WIN_PROPERTIES)
+
+#-------------------------------------------------------------------------------
+MACRO (TARGET_FORTRAN_WIN_PROPERTIES target)
+ IF (WIN32)
+ IF (BUILD_SHARED_LIBS)
+ IF (MSVC)
+ SET_TARGET_PROPERTIES (${target}
+ PROPERTIES
+ COMPILE_FLAGS "/dll"
+ LINK_FLAGS "/SUBSYSTEM:CONSOLE"
+ )
+ ENDIF (MSVC)
+ ELSE (BUILD_SHARED_LIBS)
+ IF (MSVC)
+ SET_TARGET_PROPERTIES (${target}
+ PROPERTIES
+ LINK_FLAGS "/NODEFAULTLIB:MSVCRT"
+ )
+ ENDIF (MSVC)
+ ENDIF (BUILD_SHARED_LIBS)
+ ENDIF (WIN32)
+ENDMACRO (TARGET_FORTRAN_WIN_PROPERTIES)
+
diff --git a/config/cmake/HDF5Tests.c b/config/cmake/HDF5Tests.c
index f909ed9..7fb5756 100644
--- a/config/cmake/HDF5Tests.c
+++ b/config/cmake/HDF5Tests.c
@@ -371,4 +371,15 @@ int main(int argc, char * argv)
}
#endif
+#ifdef HAVE_GPFS
+
+#include <gpfs.h>
+int main ()
+{
+ int fd = 0;
+ gpfs_fcntl(fd, (void *)0);
+}
+
+#endif /* HAVE_GPFS */
+