summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rwxr-xr-xconfig/cmake/CTestCustom.cmake38
-rwxr-xr-xconfig/cmake/CTestCustom.ctest19
-rw-r--r--config/cmake/ConfigureChecks.cmake231
-rw-r--r--config/cmake/H5pubconf.h.in4
-rw-r--r--config/cmake/runTest.cmake6
-rw-r--r--config/cmake/vfdTest.cmake41
-rw-r--r--config/cmake/xlatefile.c4
-rw-r--r--config/commence.am20
-rw-r--r--config/examples.am3
-rw-r--r--config/lt_vers.am2
10 files changed, 229 insertions, 139 deletions
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
new file mode 100755
index 0000000..e0a3f3f
--- /dev/null
+++ b/config/cmake/CTestCustom.cmake
@@ -0,0 +1,38 @@
+SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1500)
+
+SET (CTEST_CUSTOM_WARNING_EXCEPTION
+ ${CTEST_CUSTOM_WARNING_EXCEPTION}
+ "H5detect.c.[0-9]+.[ ]*: warning C4090:"
+ "testhdf5.h.[0-9]+.[ ]*: warning C4005:"
+ "POSIX name for this item is deprecated"
+ "disabling jobserver mode"
+)
+
+SET (CTEST_CUSTOM_MEMCHECK_IGNORE
+ ${CTEST_CUSTOM_MEMCHECK_IGNORE}
+ h5test-clear-objects
+ h5perform-clear-objects
+ hl_test-clear-objects
+ hl_fortran_test-clear-objects
+ H5DIFF-clearall-objects
+ H5LS-clearall-objects
+ h5repart_20K-clear-objects
+ h5repart_5K-clear-objects
+ h5repart_sec2-clear-objects
+ H5IMPORT-clear-objects
+ H5REPACK-clearall-objects
+ H5COPY-clearall-objects
+ H5STAT-clearall-objects
+ H5DUMP-clearall-objects
+ H5DUMP-clear-out1
+ H5DUMP-clear-out3
+ H5DUMP-clear-objects
+ H5DUMP_PACKED_BITS-clearall-objects
+ H5DUMP-XML-clearall-objects
+ H5DUMP*
+ H5DIFF*
+ H5REPACK*
+ H5STAT*
+ H5COPY*
+ H5LS*
+)
diff --git a/config/cmake/CTestCustom.ctest b/config/cmake/CTestCustom.ctest
deleted file mode 100755
index acb1918..0000000
--- a/config/cmake/CTestCustom.ctest
+++ /dev/null
@@ -1,19 +0,0 @@
-SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1500)
-
-SET (CTEST_CUSTOM_WARNING_EXCEPTION
- ${CTEST_CUSTOM_WARNING_EXCEPTION}
- "H5detect.c.[0-9]+.[ ]*: warning C4090:"
- "testhdf5.h.[0-9]+.[ ]*: warning C4005:"
- "POSIX name for this item is deprecated"
- "disabling jobserver mode"
-)
-
-SET (CTEST_CUSTOM_MEMCHECK_IGNORE
- ${CTEST_CUSTOM_MEMCHECK_IGNORE}
- H5DUMP
- H5DIFF
- H5REPACK
- H5STAT
- H5COPY
- H5LS
-)
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index b5b1170..cad3870 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -100,21 +100,48 @@ IF (HDF5_ENABLE_CODESTACK)
ENDIF (HDF5_ENABLE_CODESTACK)
MARK_AS_ADVANCED (HDF5_ENABLE_CODESTACK)
-#IF (WIN32)
-# SET (DEFAULT_STREAM_VFD OFF)
-#ELSE (WIN32)
-# SET (DEFAULT_STREAM_VFD ON)
-#ENDIF (WIN32)
-#OPTION (HDF5_STREAM_VFD "Compile Stream Virtual File Driver support" ${DEFAULT_STREAM_VFD})
OPTION (HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON)
+# ----------------------------------------------------------------------
+# Set the flag to indicate that the machine can handle converting
+# floating-point to long long values.
+# (This flag should be _unset_ for all machines)
+#
+# SET (H5_HW_FP_TO_LLONG_NOT_WORKS 0)
+
+# so far we have no check for this
+SET(H5_HAVE_TMPFILE 1)
+
+#-----------------------------------------------------------------------------
+# This MACRO checks IF the symbol exists in the library and IF it
+# does, it appends library to the list.
+#-----------------------------------------------------------------------------
+SET (LINK_LIBS "")
+MACRO (CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
+ CHECK_LIBRARY_EXISTS ("${LIBRARY};${LINK_LIBS}" ${SYMBOL} "" ${VARIABLE})
+ IF (${VARIABLE})
+ SET (LINK_LIBS ${LINK_LIBS} ${LIBRARY})
+ ENDIF (${VARIABLE})
+ENDMACRO (CHECK_LIBRARY_EXISTS_CONCAT)
+
+# ----------------------------------------------------------------------
+# WINDOWS Hard code Values
+# ----------------------------------------------------------------------
+
SET (WINDOWS)
IF (WIN32)
- IF (NOT UNIX)
+ IF (NOT UNIX AND NOT CYGWIN)
SET (WINDOWS 1)
- ENDIF (NOT UNIX)
+ ENDIF (NOT UNIX AND NOT CYGWIN)
ENDIF (WIN32)
+#IF (WIN32)
+# SET (DEFAULT_STREAM_VFD OFF)
+#ELSE (WIN32)
+# SET (DEFAULT_STREAM_VFD ON)
+#ENDIF (WIN32)
+#OPTION (HDF5_STREAM_VFD "Compile Stream Virtual File Driver support" ${DEFAULT_STREAM_VFD})
+
# TODO --------------------------------------------------------------------------
# Should the Default Virtual File Driver be compiled?
# This is hard-coded now but option should added to match configure
@@ -134,36 +161,50 @@ ELSE (WINDOWS)
SET (H5_DEFAULT_VFD H5FD_SEC2)
ENDIF (WINDOWS)
-# ----------------------------------------------------------------------
-# Set the flag to indicate that the machine can handle converting
-# floating-point to long long values.
-# (This flag should be _unset_ for all machines)
-#
-# SET (H5_HW_FP_TO_LLONG_NOT_WORKS 0)
-
-# so far we have no check for this
-SET(H5_HAVE_TMPFILE 1)
+IF (WINDOWS)
+ SET (H5_HAVE_IO_H 1)
+ SET (H5_HAVE_SETJMP_H 1)
+ SET (H5_HAVE_STDDEF_H 1)
+ SET (H5_HAVE_SYS_STAT_H 1)
+ SET (H5_HAVE_SYS_TIMEB_H 1)
+ SET (H5_HAVE_SYS_TYPES_H 1)
+ SET (H5_HAVE_WINSOCK_H 1)
+ SET (H5_HAVE_LIBM 1)
+ SET (H5_HAVE_STRDUP 1)
+ SET (H5_HAVE_SYSTEM 1)
+ SET (H5_HAVE_DIFFTIME 1)
+ SET (H5_HAVE_LONGJMP 1)
+ SET (H5_STDC_HEADERS 1)
+ SET (H5_HAVE_GETHOSTNAME 1)
+ SET (H5_HAVE_TIMEZONE 1)
+ SET (H5_HAVE_FUNCTION 1)
+ SET (H5_LONE_COLON 0)
+ENDIF (WINDOWS)
#-----------------------------------------------------------------------------
-# This MACRO checks IF the symbol exists in the library and IF it
-# does, it appends library to the list.
-#-----------------------------------------------------------------------------
-SET (LINK_LIBS "")
-MACRO (CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
- CHECK_LIBRARY_EXISTS ("${LIBRARY};${LINK_LIBS}" ${SYMBOL} "" ${VARIABLE})
- IF (${VARIABLE})
- SET (LINK_LIBS ${LINK_LIBS} ${LIBRARY})
- ENDIF (${VARIABLE})
-ENDMACRO (CHECK_LIBRARY_EXISTS_CONCAT)
+# These tests need to be manually SET for windows since there is currently
+# something not quite correct with the actual test implementation. This affects
+# the 'dt_arith' test and most likely lots of other code
+# ----------------------------------------------------------------------------
+IF (WINDOWS)
+ SET (H5_FP_TO_ULLONG_RIGHT_MAXIMUM "" CACHE INTERNAL "")
+ENDIF (WINDOWS)
+
+# ----------------------------------------------------------------------
+# END of WINDOWS Hard code Values
+# ----------------------------------------------------------------------
+
+IF (CYGWIN)
+ SET (H5_HAVE_LSEEK64 0)
+ENDIF (CYGWIN)
#-----------------------------------------------------------------------------
# Check for the math library "m"
#-----------------------------------------------------------------------------
-IF (WINDOWS)
- SET (H5_HAVE_LIBM 1)
-ELSE (WINDOWS)
+IF (NOT WINDOWS)
CHECK_LIBRARY_EXISTS_CONCAT ("m" printf H5_HAVE_LIBM)
-ENDIF (WINDOWS)
+ENDIF (NOT WINDOWS)
+
CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" printf H5_HAVE_LIBWS2_32)
CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" printf H5_HAVE_LIBWSOCK32)
#CHECK_LIBRARY_EXISTS_CONCAT ("dl" dlopen H5_HAVE_LIBDL)
@@ -189,19 +230,6 @@ MACRO (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
ENDMACRO (CHECK_INCLUDE_FILE_CONCAT)
#-----------------------------------------------------------------------------
-# If we are on Windows we know some of the answers to these tests already
-#-----------------------------------------------------------------------------
-IF (WINDOWS)
- SET (H5_HAVE_IO_H 1)
- SET (H5_HAVE_SETJMP_H 1)
- SET (H5_HAVE_STDDEF_H 1)
- SET (H5_HAVE_SYS_STAT_H 1)
- SET (H5_HAVE_SYS_TIMEB_H 1)
- SET (H5_HAVE_SYS_TYPES_H 1)
- SET (H5_HAVE_WINSOCK_H 1)
-ENDIF (WINDOWS)
-
-#-----------------------------------------------------------------------------
# Check for the existence of certain header files
#-----------------------------------------------------------------------------
CHECK_INCLUDE_FILE_CONCAT ("globus/common.h" H5_HAVE_GLOBUS_COMMON_H)
@@ -235,9 +263,11 @@ CHECK_INCLUDE_FILE_CONCAT ("memory.h" H5_HAVE_MEMORY_H)
CHECK_INCLUDE_FILE_CONCAT ("dlfcn.h" H5_HAVE_DLFCN_H)
CHECK_INCLUDE_FILE_CONCAT ("features.h" H5_HAVE_FEATURES_H)
CHECK_INCLUDE_FILE_CONCAT ("inttypes.h" H5_HAVE_INTTYPES_H)
-CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" H5_HAVE_WINSOCK_H)
CHECK_INCLUDE_FILE_CONCAT ("netinet/in.h" H5_HAVE_NETINET_IN_H)
+IF (NOT CYGWIN)
+ CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" H5_HAVE_WINSOCK_H)
+ENDIF (NOT CYGWIN)
# IF the c compiler found stdint, check the C++ as well. On some systems this
# file will be found by C but not C++, only do this test IF the C++ compiler
@@ -286,7 +316,6 @@ MACRO (H5_CHECK_TYPE_SIZE type var)
ENDMACRO (H5_CHECK_TYPE_SIZE)
-
H5_CHECK_TYPE_SIZE (char H5_SIZEOF_CHAR)
H5_CHECK_TYPE_SIZE (short H5_SIZEOF_SHORT)
H5_CHECK_TYPE_SIZE (int H5_SIZEOF_INT)
@@ -346,15 +375,7 @@ SET (CMAKE_REQUIRED_LIBRARIES ${LINK_LIBS})
#-----------------------------------------------------------------------------
# Check for some functions that are used
-IF (WINDOWS)
- SET (H5_HAVE_STRDUP 1)
- SET (H5_HAVE_SYSTEM 1)
- SET (H5_HAVE_DIFFTIME 1)
- SET (H5_HAVE_LONGJMP 1)
- SET (H5_STDC_HEADERS 1)
- SET (H5_HAVE_GETHOSTNAME 1)
-ENDIF (WINDOWS)
-
+#
CHECK_FUNCTION_EXISTS (alarm H5_HAVE_ALARM)
CHECK_FUNCTION_EXISTS (fork H5_HAVE_FORK)
CHECK_FUNCTION_EXISTS (frexpf H5_HAVE_FREXPF)
@@ -517,11 +538,7 @@ ENDMACRO (HDF5_FUNCTION_TEST)
#-----------------------------------------------------------------------------
# Check a bunch of other functions
#-----------------------------------------------------------------------------
-IF (WINDOWS)
- SET (H5_HAVE_TIMEZONE 1)
- SET (H5_HAVE_FUNCTION 1)
- SET (H5_LONE_COLON 0)
-ELSE (WINDOWS)
+IF (NOT WINDOWS)
FOREACH (test
TIME_WITH_SYS_TIME
STDC_HEADERS
@@ -530,7 +547,7 @@ ELSE (WINDOWS)
HAVE_ATTRIBUTE
HAVE_FUNCTION
HAVE_TM_GMTOFF
- HAVE_TIMEZONE
+# HAVE_TIMEZONE
HAVE_STRUCT_TIMEZONE
HAVE_STAT_ST_BLOCKS
HAVE_FUNCTION
@@ -546,8 +563,12 @@ ELSE (WINDOWS)
LONE_COLON
)
HDF5_FUNCTION_TEST (${test})
+ IF (NOT CYGWIN)
+ HDF5_FUNCTION_TEST (HAVE_TIMEZONE)
+# HDF5_FUNCTION_TEST (HAVE_STAT_ST_BLOCKS)
+ ENDIF (NOT CYGWIN)
ENDFOREACH (test)
-ENDIF (WINDOWS)
+ENDIF (NOT WINDOWS)
#-----------------------------------------------------------------------------
# Option to see if GPFS is available on this filesystem --enable-gpfs
@@ -594,41 +615,41 @@ ENDIF (INLINE_TEST___inline__)
# Check how to print a Long Long integer
#-----------------------------------------------------------------------------
IF (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
- SET (PRINT_LL_FOUND 0)
- MESSAGE (STATUS "Checking for appropriate format for 64 bit long:")
- FOREACH (HDF5_PRINTF_LL l64 l L q I64 ll)
- SET (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH=${HDF5_PRINTF_LL}")
- IF (H5_SIZEOF_LONG_LONG)
- SET (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
- ENDIF (H5_SIZEOF_LONG_LONG)
- TRY_RUN (HDF5_PRINTF_LL_TEST_RUN HDF5_PRINTF_LL_TEST_COMPILE
- ${HDF5_BINARY_DIR}/CMake
- ${HDF5_RESOURCES_DIR}/HDF5Tests.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CURRENT_TEST_DEFINITIONS}
- OUTPUT_VARIABLE OUTPUT
- )
- IF (HDF5_PRINTF_LL_TEST_COMPILE)
- IF (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- SET (H5_PRINTF_LL_WIDTH "\"${HDF5_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll")
- SET (PRINT_LL_FOUND 1)
- ELSE (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- MESSAGE ("Width with ${HDF5_PRINTF_LL} failed with result: ${HDF5_PRINTF_LL_TEST_RUN}")
- ENDIF (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- ELSE (HDF5_PRINTF_LL_TEST_COMPILE)
- FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Test H5_PRINTF_LL_WIDTH for ${HDF5_PRINTF_LL} failed with the following output:\n ${OUTPUT}\n"
- )
- ENDIF (HDF5_PRINTF_LL_TEST_COMPILE)
- ENDFOREACH (HDF5_PRINTF_LL)
-
- IF (PRINT_LL_FOUND)
- MESSAGE (STATUS "Checking for apropriate format for 64 bit long: found ${H5_PRINTF_LL_WIDTH}")
- ELSE (PRINT_LL_FOUND)
- MESSAGE (STATUS "Checking for apropriate format for 64 bit long: not found")
- SET (H5_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL
- "Width for printf for type `long long' or `__int64', us. `ll"
+ SET (PRINT_LL_FOUND 0)
+ MESSAGE (STATUS "Checking for appropriate format for 64 bit long:")
+ FOREACH (HDF5_PRINTF_LL l64 l L q I64 ll)
+ SET (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH=${HDF5_PRINTF_LL}")
+ IF (H5_SIZEOF_LONG_LONG)
+ SET (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
+ ENDIF (H5_SIZEOF_LONG_LONG)
+ TRY_RUN (HDF5_PRINTF_LL_TEST_RUN HDF5_PRINTF_LL_TEST_COMPILE
+ ${HDF5_BINARY_DIR}/CMake
+ ${HDF5_RESOURCES_DIR}/HDF5Tests.c
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CURRENT_TEST_DEFINITIONS}
+ OUTPUT_VARIABLE OUTPUT
+ )
+ IF (HDF5_PRINTF_LL_TEST_COMPILE)
+ IF (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
+ SET (H5_PRINTF_LL_WIDTH "\"${HDF5_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll")
+ SET (PRINT_LL_FOUND 1)
+ ELSE (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
+ MESSAGE ("Width with ${HDF5_PRINTF_LL} failed with result: ${HDF5_PRINTF_LL_TEST_RUN}")
+ ENDIF (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
+ ELSE (HDF5_PRINTF_LL_TEST_COMPILE)
+ FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ "Test H5_PRINTF_LL_WIDTH for ${HDF5_PRINTF_LL} failed with the following output:\n ${OUTPUT}\n"
)
- ENDIF (PRINT_LL_FOUND)
+ ENDIF (HDF5_PRINTF_LL_TEST_COMPILE)
+ ENDFOREACH (HDF5_PRINTF_LL)
+
+ IF (PRINT_LL_FOUND)
+ MESSAGE (STATUS "Checking for apropriate format for 64 bit long: found ${H5_PRINTF_LL_WIDTH}")
+ ELSE (PRINT_LL_FOUND)
+ MESSAGE (STATUS "Checking for apropriate format for 64 bit long: not found")
+ SET (H5_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL
+ "Width for printf for type `long long' or `__int64', us. `ll"
+ )
+ ENDIF (PRINT_LL_FOUND)
ENDIF (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
# ----------------------------------------------------------------------
@@ -645,9 +666,6 @@ SET (H5_CONVERT_DENORMAL_FLOAT 1)
IF (HDF5_ENABLE_HSIZET)
SET (H5_HAVE_LARGE_HSIZET 1)
ENDIF (HDF5_ENABLE_HSIZET)
-IF (CYGWIN)
- SET (H5_HAVE_LSEEK64 0)
-ENDIF (CYGWIN)
#-----------------------------------------------------------------------------
# Macro to determine the various conversion capabilities
@@ -664,7 +682,7 @@ MACRO (H5ConversionTests TEST msg)
IF (${TEST}_COMPILE)
IF (${TEST}_RUN MATCHES 0)
SET (${TEST} 1 CACHE INTERNAL ${msg})
- MESSAGE(STATUS "${msg}... yes")
+ MESSAGE (STATUS "${msg}... yes")
ELSE (${TEST}_RUN MATCHES 0)
SET (${TEST} "" CACHE INTERNAL ${msg})
MESSAGE (STATUS "${msg}... no")
@@ -821,11 +839,8 @@ H5ConversionTests (H5_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctly convertin
H5ConversionTests (H5_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly converting (unsigned) long long to long double values")
H5ConversionTests (H5_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restrictions are strictly enforced")
-#-----------------------------------------------------------------------------
-# These tests need to be manually SET for windows since there is currently
-# something not quite correct with the actual test implementation. This affects
-# the 'dt_arith' test and most likely lots of other code
-# ----------------------------------------------------------------------------
-IF (WINDOWS)
- SET (H5_FP_TO_ULLONG_RIGHT_MAXIMUM "" CACHE INTERNAL "")
-ENDIF (WINDOWS)
+# Define a macro for Cygwin (on XP only) where the compiler has rounding
+# problem converting from unsigned long long to long double */
+IF (CYGWIN)
+ SET (H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM 1)
+ENDIF (CYGWIN) \ No newline at end of file
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index fdcf6b2..0c2b084 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -39,6 +39,10 @@
/* Define if C++ compiler recognizes offsetof */
#cmakedefine H5_CXX_HAVE_OFFSETOF @H5_CXX_HAVE_OFFSETOF@
+/* Define a macro for Cygwin (on XP only) where the compiler has rounding
+ problem converting from unsigned long long to long double */
+#cmakedefine H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM @H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM@
+
/* Define the default virtual file driver to compile */
#cmakedefine H5_DEFAULT_VFD @H5_DEFAULT_VFD@
diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake
index 227ef9b..de69217 100644
--- a/config/cmake/runTest.cmake
+++ b/config/cmake/runTest.cmake
@@ -50,9 +50,9 @@ IF (TEST_APPEND)
FILE (APPEND ${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n")
ENDIF (TEST_APPEND)
-# if the return value is !=0 bail out
+# if the return value is !=${TEST_EXPECT} bail out
IF (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
- MESSAGE ( FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != 0.\n${TEST_ERROR}")
+ MESSAGE ( FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}")
ENDIF (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
MESSAGE (STATUS "COMMAND Error: ${TEST_ERROR}")
@@ -77,7 +77,7 @@ ENDIF (WIN32 AND NOT MINGW)
# now compare the output with the reference
EXECUTE_PROCESS (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_OUTPUT} ${TEST_REFERENCE}
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
RESULT_VARIABLE TEST_RESULT
)
diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake
new file mode 100644
index 0000000..c0b5fec
--- /dev/null
+++ b/config/cmake/vfdTest.cmake
@@ -0,0 +1,41 @@
+# vfdTest.cmake executes a command and captures the output in a file. Command uses specified VFD.
+# Exit status of command can also be compared.
+
+# arguments checking
+IF (NOT TEST_PROGRAM)
+ MESSAGE (FATAL_ERROR "Require TEST_PROGRAM to be defined")
+ENDIF (NOT TEST_PROGRAM)
+#IF (NOT TEST_ARGS)
+# MESSAGE (STATUS "Require TEST_ARGS to be defined")
+#ENDIF (NOT TEST_ARGS)
+#IF (NOT TEST_EXPECT)
+# MESSAGE (STATUS "Require TEST_EXPECT to be defined")
+#ENDIF (NOT TEST_EXPECT)
+IF (NOT TEST_FOLDER)
+ MESSAGE ( FATAL_ERROR "Require TEST_FOLDER to be defined")
+ENDIF (NOT TEST_FOLDER)
+IF (NOT TEST_VFD)
+ MESSAGE (FATAL_ERROR "Require TEST_VFD to be defined")
+ENDIF (NOT TEST_VFD)
+
+MESSAGE (STATUS "USING ${TEST_VFD} ON COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
+
+SET (ENV{HDF5_DRIVER} "${TEST_VFD}")
+# run the test program, capture the stdout/stderr and the result var
+EXECUTE_PROCESS (
+ COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
+ WORKING_DIRECTORY ${TEST_FOLDER}
+ OUTPUT_VARIABLE TEST_ERROR
+ ERROR_VARIABLE TEST_ERROR
+)
+
+MESSAGE (STATUS "COMMAND Result: ${TEST_RESULT}")
+
+# if the return value is !=${TEST_EXPECT} bail out
+IF (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
+ MESSAGE ( FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}")
+ENDIF (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
+
+# everything went fine...
+MESSAGE ("Passed: The ${TEST_PROGRAM} program used vfd ${TEST_VFD}")
+
diff --git a/config/cmake/xlatefile.c b/config/cmake/xlatefile.c
index c16f573..e220289 100644
--- a/config/cmake/xlatefile.c
+++ b/config/cmake/xlatefile.c
@@ -9,8 +9,8 @@ int main(int argc, char *argv[]) {
FILE *outfile = NULL;
char *buffer = NULL;
char argbuf[8];
- unsigned int bytes = 0;
- unsigned int idx = 0;
+ size_t bytes = 0;
+ size_t idx = 0;
unsigned int lineidx = 0;
unsigned int stripXlines = 3;
diff --git a/config/commence.am b/config/commence.am
index 815b9a2..c5c27d5 100644
--- a/config/commence.am
+++ b/config/commence.am
@@ -45,14 +45,24 @@ LIBH5CPP_HL=$(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
# Install directories that automake doesn't know about
docdir = $(exec_prefix)/doc
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
+
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
# shared libraries instead of static libraries
-H5CC=$(bindir)/h5cc
-H5CC_PP=$(bindir)/h5pcc
-H5FC=$(bindir)/h5fc
-H5FC_PP=$(bindir)/h5pfc
-H5CPP=$(bindir)/h5c++
+H5CC=${DESTDIR}$(bindir)/h5cc
+H5CC_PP=${DESTDIR}$(bindir)/h5pcc
+H5FC=${DESTDIR}$(bindir)/h5fc
+H5FC_PP=${DESTDIR}$(bindir)/h5pfc
+H5CPP=${DESTDIR}$(bindir)/h5c++
# H5_CFLAGS holds flags that should be used when building hdf5,
diff --git a/config/examples.am b/config/examples.am
index 30ea717..244e695 100644
--- a/config/examples.am
+++ b/config/examples.am
@@ -67,7 +67,8 @@ uninstall-local:
install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
@for f in X $(INSTALL_FILES); do \
if test $$f != X; then \
- (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\
+ (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \
+ chmod a-x $(EXAMPLEDIR)/$$f; \
fi; \
done
@for f in X $(INSTALL_SCRIPT_FILES); do \
diff --git a/config/lt_vers.am b/config/lt_vers.am
index 19b3066..0d5db8d 100644
--- a/config/lt_vers.am
+++ b/config/lt_vers.am
@@ -17,7 +17,7 @@
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 65
+LT_VERS_REVISION = 66
LT_VERS_AGE = 0
## If the API changes *at all*, increment LT_VERS_INTERFACE and