diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-07-20 16:51:49 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-07-20 16:51:49 (GMT) |
commit | de3a870bcd4953a3654b3e9dc92edab86fe858cd (patch) | |
tree | 8bf2fc6e0814f67b1388c23136aaff9e4a7cba96 /config | |
parent | 98754fa9d12090f5e048fdb05cc5e9ce9111676f (diff) | |
download | hdf5-de3a870bcd4953a3654b3e9dc92edab86fe858cd.zip hdf5-de3a870bcd4953a3654b3e9dc92edab86fe858cd.tar.gz hdf5-de3a870bcd4953a3654b3e9dc92edab86fe858cd.tar.bz2 |
[svn-r19110] Description:
Bring r19049:19109 from trunk to revise_chunks branch
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Mac OS X/32 10.6.4 (amazon) in debug mode
Mac OS X/32 10.6.4 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Mac OS X/32 10.6.4 (amazon) w/parallel, in debug mode
Diffstat (limited to 'config')
-rw-r--r-- | config/apple | 30 | ||||
-rwxr-xr-x | config/cmake/CTestCustom.ctest | 2 | ||||
-rw-r--r-- | config/cmake/CheckTypeSize.cmake | 48 | ||||
-rw-r--r-- | config/cmake/ConfigureChecks.cmake | 790 | ||||
-rw-r--r-- | config/cmake/ConversionTests.c | 422 | ||||
-rw-r--r-- | config/cmake/FindHDF5.cmake | 56 | ||||
-rw-r--r-- | config/cmake/FindSZIP.cmake | 179 | ||||
-rw-r--r-- | config/cmake/GetTimeOfDayTest.cpp | 15 | ||||
-rw-r--r-- | config/cmake/H5cxx_config.h.in | 5 | ||||
-rw-r--r-- | config/cmake/H5pubconf.h.in | 745 | ||||
-rw-r--r-- | config/cmake/HDF5-config.cmake.build.in | 42 | ||||
-rw-r--r-- | config/cmake/HDF5-config.cmake.install.in | 43 | ||||
-rw-r--r-- | config/cmake/HDF5Macros.cmake | 122 | ||||
-rw-r--r-- | config/cmake/HDF5Tests.c | 366 | ||||
-rwxr-xr-x | config/cmake/cacheinit.cmake | 35 | ||||
-rw-r--r-- | config/cmake/hdf5_zlib.h.in | 1 | ||||
-rw-r--r-- | config/cmake/libhdf5.settings.cmake.in | 68 | ||||
-rw-r--r-- | config/cmake/runTest.cmake | 82 | ||||
-rw-r--r-- | config/cmake/xlatefile.c | 56 | ||||
-rw-r--r-- | config/examples.am | 24 | ||||
-rw-r--r-- | config/linux-gnulibc1 | 90 | ||||
-rw-r--r-- | config/lt_vers.am | 2 | ||||
-rw-r--r-- | config/solaris2.x | 40 |
23 files changed, 3259 insertions, 4 deletions
diff --git a/config/apple b/config/apple index 8c4cc8e..10674fb 100644 --- a/config/apple +++ b/config/apple @@ -55,3 +55,33 @@ if test "X-" != "X-$enable_fortran"; then enable_shared="no" fi +# compiler version strings +case $CC in + *gcc*) + cc_version_info=`$CC $CFLAGS $H5_CFLAGS --version 2>&1 | grep -v 'PathScale' |\ + grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'` + ;; + + *) + echo "No match to get cc_version_info for $CC" + ;; +esac + +case $FC in + *gfortran*) + fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS --version 2>&1 |\ + grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'` + ;; +esac + +# get c++ version info +case $CXX in + *g++*) + cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\ + grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'` + ;; + *) + echo "No match to get cxx_version_info for $CXX" + ;; +esac + diff --git a/config/cmake/CTestCustom.ctest b/config/cmake/CTestCustom.ctest new file mode 100755 index 0000000..23b4163 --- /dev/null +++ b/config/cmake/CTestCustom.ctest @@ -0,0 +1,2 @@ +SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1500) + diff --git a/config/cmake/CheckTypeSize.cmake b/config/cmake/CheckTypeSize.cmake new file mode 100644 index 0000000..eca6e76 --- /dev/null +++ b/config/cmake/CheckTypeSize.cmake @@ -0,0 +1,48 @@ +# +# Check if the type exists and determine size of type. if the type +# exists, the size will be stored to the variable. +# +# CHECK_TYPE_SIZE - macro which checks the size of type +# VARIABLE - variable to store size if the type exists. +# HAVE_${VARIABLE} - does the variable exists or not +# + +MACRO (HDF_CHECK_TYPE_SIZE TYPE VARIABLE) + SET (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1) + IF ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$") + SET (MACRO_CHECK_TYPE_SIZE_FLAGS + "-DCHECK_TYPE_SIZE_TYPE=\"${TYPE}\" ${CMAKE_REQUIRED_FLAGS}" + ) + FOREACH (def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H HAVE_INTTYPES_H) + IF ("${def}") + SET (MACRO_CHECK_TYPE_SIZE_FLAGS "${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}") + ENDIF("${def}") + ENDFOREACH (def) + + MESSAGE (STATUS "Check size of ${TYPE}") + IF (CMAKE_REQUIRED_LIBRARIES) + SET (CHECK_TYPE_SIZE_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}" + ) + ENDIF (CMAKE_REQUIRED_LIBRARIES) + TRY_RUN (${VARIABLE} HAVE_${VARIABLE} + ${CMAKE_BINARY_DIR} + ${HDF5_RESOURCES_DIR}/CheckTypeSize.c + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS} + "${CHECK_TYPE_SIZE_ADD_LIBRARIES}" + OUTPUT_VARIABLE OUTPUT + ) + IF (HAVE_${VARIABLE}) + MESSAGE (STATUS "Check size of ${TYPE} - done") + FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log + "Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n" + ) + ELSE (HAVE_${VARIABLE}) + MESSAGE (STATUS "Check size of ${TYPE} - failed") + FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\n\n" + ) + ENDIF (HAVE_${VARIABLE}) + ENDIF ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$") + SET (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS) +ENDMACRO (HDF_CHECK_TYPE_SIZE) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake new file mode 100644 index 0000000..47e6521 --- /dev/null +++ b/config/cmake/ConfigureChecks.cmake @@ -0,0 +1,790 @@ +#----------------------------------------------------------------------------- +# Include all the necessary files for macros +#----------------------------------------------------------------------------- +INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) +INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) +INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake) +INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake) +INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) +INCLUDE (${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake) +INCLUDE (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake) +INCLUDE (${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake) + +MESSAGE (STATUS "Configure Checks that still need to be implemented") +MESSAGE (STATUS " GetConsoleScreenBufferInfo function for Windows") + +#----------------------------------------------------------------------------- +# Always SET this for now IF we are on an OS X box +#----------------------------------------------------------------------------- +IF (APPLE) + SET (H5_AC_APPLE_UNIVERSAL_BUILD 1) +ENDIF (APPLE) + +#----------------------------------------------------------------------------- +# Option to Clear File Buffers before write --enable-clear-file-buffers +#----------------------------------------------------------------------------- +OPTION (HDF5_Enable_Clear_File_Buffers "Securely clear file buffers before writing to file" ON) +IF (HDF5_Enable_Clear_File_Buffers) + SET (H5_CLEAR_MEMORY 1) +ENDIF (HDF5_Enable_Clear_File_Buffers) + +#----------------------------------------------------------------------------- +# Option for --enable-instrument +#----------------------------------------------------------------------------- +IF (CMAKE_BUILD_TYPE MATCHES Debug) + SET (HDF5_Enable_Instrument ON) +ENDIF (CMAKE_BUILD_TYPE MATCHES Debug) +OPTION (HDF5_Enable_Instrument "Instrument The library" HDF5_Enable_Instrument) +IF (HDF5_Enable_Instrument) + SET (H5_HAVE_INSTRUMENTED_LIBRARY 1) +ENDIF (HDF5_Enable_Instrument) + +#----------------------------------------------------------------------------- +# Option for --enable-strict-format-checks +#----------------------------------------------------------------------------- +OPTION (HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF) +IF (HDF5_STRICT_FORMAT_CHECKS) + SET (H5_STRICT_FORMAT_CHECKS 1) +ENDIF (HDF5_STRICT_FORMAT_CHECKS) + +#----------------------------------------------------------------------------- +# Option for --enable-metadata-trace-file +#----------------------------------------------------------------------------- +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) + +# ---------------------------------------------------------------------- +# Decide whether the data accuracy has higher priority during data +# conversions. If not, some hard conversions will still be prefered even +# though the data may be wrong (for example, some compilers don't +# support denormalized floating values) to maximize speed. +# +OPTION (HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON) +IF (HDF5_WANT_DATA_ACCURACY) + SET (H5_WANT_DATA_ACCURACY 1) +ENDIF(HDF5_WANT_DATA_ACCURACY) + +# ---------------------------------------------------------------------- +# Decide whether the presence of user's exception handling functions is +# checked and data conversion exceptions are returned. This is mainly +# for the speed optimization of hard conversions. Soft conversions can +# actually benefit little. +# +OPTION (HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON) +IF (HDF5_WANT_DCONV_EXCEPTION) + SET (H5_WANT_DCONV_EXCEPTION 1) +ENDIF (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}) + +#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 (WINDOWS) +IF (WIN32) + IF (NOT UNIX) + SET (WINDOWS 1) + ENDIF (NOT UNIX) +ENDIF (WIN32) + +# TODO -------------------------------------------------------------------------- +# Should the Default Virtual File Driver be compiled? +# This is hard-coded now but option should added to match configure +# +IF (WINDOWS) + SET (H5_HAVE_WINDOWS 1) +# SET (H5_WINDOWS_USE_STDIO 0) + # ---------------------------------------------------------------------- + # Set the flag to indicate that the machine has window style pathname, + # that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/"). + # (This flag should be _unset_ for all machines, except for Windows) + # + SET (H5_HAVE_WINDOW_PATH 1) + SET (WINDOWS_MAX_BUF (1024 * 1024 * 1024)) + SET (H5_DEFAULT_VFD H5FD_WINDOWS) +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) + +#----------------------------------------------------------------------------- +# 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) + +#----------------------------------------------------------------------------- +# Check for the math library "m" +#----------------------------------------------------------------------------- +IF (WINDOWS) + SET (H5_HAVE_LIBM 1) +ELSE (WINDOWS) + CHECK_LIBRARY_EXISTS_CONCAT ("m" printf H5_HAVE_LIBM) +ENDIF (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) +CHECK_LIBRARY_EXISTS_CONCAT ("ucb" gethostname H5_HAVE_LIBUCB) +CHECK_LIBRARY_EXISTS_CONCAT ("socket" connect H5_HAVE_LIBSOCKET) +CHECK_LIBRARY_EXISTS ("c" gethostbyname "" NOT_NEED_LIBNSL) + + +IF (NOT NOT_NEED_LIBNSL) + CHECK_LIBRARY_EXISTS_CONCAT ("nsl" gethostbyname H5_HAVE_LIBNSL) +ENDIF (NOT NOT_NEED_LIBNSL) + + +SET (USE_INCLUDES "") +#----------------------------------------------------------------------------- +# Check IF header file exists and add it to the list. +#----------------------------------------------------------------------------- +MACRO (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE) + CHECK_INCLUDE_FILES ("${USE_INCLUDES};${FILE}" ${VARIABLE}) + IF (${VARIABLE}) + SET (USE_INCLUDES ${USE_INCLUDES} ${FILE}) + ENDIF (${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) +CHECK_INCLUDE_FILE_CONCAT ("io.h" H5_HAVE_IO_H) +CHECK_INCLUDE_FILE_CONCAT ("mfhdf.h" H5_HAVE_MFHDF_H) +CHECK_INCLUDE_FILE_CONCAT ("pdb.h" H5_HAVE_PDB_H) +CHECK_INCLUDE_FILE_CONCAT ("pthread.h" H5_HAVE_PTHREAD_H) +CHECK_INCLUDE_FILE_CONCAT ("setjmp.h" H5_HAVE_SETJMP_H) +CHECK_INCLUDE_FILE_CONCAT ("srbclient.h" H5_HAVE_SRBCLIENT_H) +CHECK_INCLUDE_FILE_CONCAT ("stddef.h" H5_HAVE_STDDEF_H) +CHECK_INCLUDE_FILE_CONCAT ("stdint.h" H5_HAVE_STDINT_H) +CHECK_INCLUDE_FILE_CONCAT ("string.h" H5_HAVE_STRING_H) +CHECK_INCLUDE_FILE_CONCAT ("strings.h" H5_HAVE_STRINGS_H) +CHECK_INCLUDE_FILE_CONCAT ("sys/ioctl.h" H5_HAVE_SYS_IOCTL_H) +CHECK_INCLUDE_FILE_CONCAT ("sys/proc.h" H5_HAVE_SYS_PROC_H) +CHECK_INCLUDE_FILE_CONCAT ("sys/resource.h" H5_HAVE_SYS_RESOURCE_H) +CHECK_INCLUDE_FILE_CONCAT ("sys/socket.h" H5_HAVE_SYS_SOCKET_H) +CHECK_INCLUDE_FILE_CONCAT ("sys/stat.h" H5_HAVE_SYS_STAT_H) +IF (CMAKE_SYSTEM_NAME MATCHES "OSF") + CHECK_INCLUDE_FILE_CONCAT ("sys/sysinfo.h" H5_HAVE_SYS_SYSINFO_H) +ELSE (CMAKE_SYSTEM_NAME MATCHES "OSF") + SET (H5_HAVE_SYS_SYSINFO_H "" CACHE INTERNAL "" FORCE) +ENDIF (CMAKE_SYSTEM_NAME MATCHES "OSF") +CHECK_INCLUDE_FILE_CONCAT ("sys/time.h" H5_HAVE_SYS_TIME_H) +CHECK_INCLUDE_FILE_CONCAT ("time.h" H5_HAVE_TIME_H) +CHECK_INCLUDE_FILE_CONCAT ("sys/timeb.h" H5_HAVE_SYS_TIMEB_H) +CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" H5_HAVE_SYS_TYPES_H) +CHECK_INCLUDE_FILE_CONCAT ("unistd.h" H5_HAVE_UNISTD_H) +CHECK_INCLUDE_FILE_CONCAT ("stdlib.h" H5_HAVE_STDLIB_H) +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 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 +# has been initialized (e.g. the project also includes some c++) +IF (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED) + CHECK_INCLUDE_FILE_CXX ("stdint.h" H5_HAVE_STDINT_H_CXX) + IF (NOT H5_HAVE_STDINT_H_CXX) + SET (H5_HAVE_STDINT_H "" CACHE INTERNAL "Have includes HAVE_STDINT_H") + ENDIF (NOT H5_HAVE_STDINT_H_CXX) +ENDIF (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED) + +#----------------------------------------------------------------------------- +# Check the size in bytes of all the int and float types +#----------------------------------------------------------------------------- +MACRO (H5_CHECK_TYPE_SIZE type var) + SET (aType ${type}) + SET (aVar ${var}) +# MESSAGE (STATUS "Checking size of ${aType} and storing into ${aVar}") + CHECK_TYPE_SIZE (${aType} ${aVar}) + IF (NOT ${aVar}) + SET (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}") +# MESSAGE (STATUS "Size of ${aType} was NOT Found") + ENDIF (NOT ${aVar}) +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) +H5_CHECK_TYPE_SIZE (unsigned H5_SIZEOF_UNSIGNED) +IF (NOT APPLE) + H5_CHECK_TYPE_SIZE (long H5_SIZEOF_LONG) +ENDIF (NOT APPLE) +H5_CHECK_TYPE_SIZE ("long long" H5_SIZEOF_LONG_LONG) +H5_CHECK_TYPE_SIZE (__int64 H5_SIZEOF___INT64) +IF (NOT H5_SIZEOF___INT64) + SET (H5_SIZEOF___INT64 0) +ENDIF (NOT H5_SIZEOF___INT64) + +H5_CHECK_TYPE_SIZE (float H5_SIZEOF_FLOAT) +H5_CHECK_TYPE_SIZE (double H5_SIZEOF_DOUBLE) +H5_CHECK_TYPE_SIZE ("long double" H5_SIZEOF_LONG_DOUBLE) +H5_CHECK_TYPE_SIZE (int8_t H5_SIZEOF_INT8_T) +H5_CHECK_TYPE_SIZE (uint8_t H5_SIZEOF_UINT8_T) +H5_CHECK_TYPE_SIZE (int_least8_t H5_SIZEOF_INT_LEAST8_T) +H5_CHECK_TYPE_SIZE (uint_least8_t H5_SIZEOF_UINT_LEAST8_T) +H5_CHECK_TYPE_SIZE (int_fast8_t H5_SIZEOF_INT_FAST8_T) +H5_CHECK_TYPE_SIZE (uint_fast8_t H5_SIZEOF_UINT_FAST8_T) +H5_CHECK_TYPE_SIZE (int16_t H5_SIZEOF_INT16_T) +H5_CHECK_TYPE_SIZE (uint16_t H5_SIZEOF_UINT16_T) +H5_CHECK_TYPE_SIZE (int_least16_t H5_SIZEOF_INT_LEAST16_T) +H5_CHECK_TYPE_SIZE (uint_least16_t H5_SIZEOF_UINT_LEAST16_T) +H5_CHECK_TYPE_SIZE (int_fast16_t H5_SIZEOF_INT_FAST16_T) +H5_CHECK_TYPE_SIZE (uint_fast16_t H5_SIZEOF_UINT_FAST16_T) +H5_CHECK_TYPE_SIZE (int32_t H5_SIZEOF_INT32_T) +H5_CHECK_TYPE_SIZE (uint32_t H5_SIZEOF_UINT32_T) +H5_CHECK_TYPE_SIZE (int_least32_t H5_SIZEOF_INT_LEAST32_T) +H5_CHECK_TYPE_SIZE (uint_least32_t H5_SIZEOF_UINT_LEAST32_T) +H5_CHECK_TYPE_SIZE (int_fast32_t H5_SIZEOF_INT_FAST32_T) +H5_CHECK_TYPE_SIZE (uint_fast32_t H5_SIZEOF_UINT_FAST32_T) +H5_CHECK_TYPE_SIZE (int64_t H5_SIZEOF_INT64_T) +H5_CHECK_TYPE_SIZE (uint64_t H5_SIZEOF_UINT64_T) +H5_CHECK_TYPE_SIZE (int_least64_t H5_SIZEOF_INT_LEAST64_T) +H5_CHECK_TYPE_SIZE (uint_least64_t H5_SIZEOF_UINT_LEAST64_T) +H5_CHECK_TYPE_SIZE (int_fast64_t H5_SIZEOF_INT_FAST64_T) +H5_CHECK_TYPE_SIZE (uint_fast64_t H5_SIZEOF_UINT_FAST64_T) +IF (NOT APPLE) + H5_CHECK_TYPE_SIZE (size_t H5_SIZEOF_SIZE_T) + H5_CHECK_TYPE_SIZE (ssize_t H5_SIZEOF_SSIZE_T) + IF (NOT H5_SIZEOF_SSIZE_T) + SET (H5_SIZEOF_SSIZE_T 0) + ENDIF (NOT H5_SIZEOF_SSIZE_T) +ENDIF (NOT APPLE) +H5_CHECK_TYPE_SIZE (off_t H5_SIZEOF_OFF_T) +H5_CHECK_TYPE_SIZE (off64_t H5_SIZEOF_OFF64_T) +IF (NOT H5_SIZEOF_OFF64_T) + SET (H5_SIZEOF_OFF64_T 0) +ENDIF (NOT H5_SIZEOF_OFF64_T) + + +# For other tests to use the same libraries +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) +CHECK_FUNCTION_EXISTS (frexpl H5_HAVE_FREXPL) + +CHECK_FUNCTION_EXISTS (gethostname H5_HAVE_GETHOSTNAME) +CHECK_FUNCTION_EXISTS (getpwuid H5_HAVE_GETPWUID) +CHECK_FUNCTION_EXISTS (getrusage H5_HAVE_GETRUSAGE) +CHECK_FUNCTION_EXISTS (lstat H5_HAVE_LSTAT) + +CHECK_FUNCTION_EXISTS (rand_r H5_HAVE_RAND_R) +CHECK_FUNCTION_EXISTS (random H5_HAVE_RANDOM) +CHECK_FUNCTION_EXISTS (setsysinfo H5_HAVE_SETSYSINFO) + +CHECK_FUNCTION_EXISTS (signal H5_HAVE_SIGNAL) +CHECK_FUNCTION_EXISTS (longjmp H5_HAVE_LONGJMP) +CHECK_FUNCTION_EXISTS (setjmp H5_HAVE_SETJMP) +CHECK_FUNCTION_EXISTS (siglongjmp H5_HAVE_SIGLONGJMP) +CHECK_FUNCTION_EXISTS (sigsetjmp H5_HAVE_SIGSETJMP) +CHECK_FUNCTION_EXISTS (sigaction H5_HAVE_SIGACTION) +CHECK_FUNCTION_EXISTS (sigprocmask H5_HAVE_SIGPROCMASK) + +CHECK_FUNCTION_EXISTS (snprintf H5_HAVE_SNPRINTF) +CHECK_FUNCTION_EXISTS (srandom H5_HAVE_SRANDOM) +CHECK_FUNCTION_EXISTS (strdup H5_HAVE_STRDUP) +CHECK_FUNCTION_EXISTS (symlink H5_HAVE_SYMLINK) +CHECK_FUNCTION_EXISTS (system H5_HAVE_SYSTEM) + +CHECK_FUNCTION_EXISTS (tmpfile H5_HAVE_TMPFILE) +CHECK_FUNCTION_EXISTS (vasprintf H5_HAVE_VASPRINTF) +CHECK_FUNCTION_EXISTS (waitpid H5_HAVE_WAITPID) + +CHECK_FUNCTION_EXISTS (vsnprintf H5_HAVE_VSNPRINTF) +CHECK_FUNCTION_EXISTS (ioctl H5_HAVE_IOCTL) +#CHECK_FUNCTION_EXISTS (gettimeofday H5_HAVE_GETTIMEOFDAY) +CHECK_FUNCTION_EXISTS (difftime H5_HAVE_DIFFTIME) +CHECK_FUNCTION_EXISTS (fseeko H5_HAVE_FSEEKO) +CHECK_FUNCTION_EXISTS (ftello H5_HAVE_FTELLO) +CHECK_FUNCTION_EXISTS (fstat64 H5_HAVE_FSTAT64) +CHECK_FUNCTION_EXISTS (stat64 H5_HAVE_STAT64) + +#----------------------------------------------------------------------------- + +#----------------------------------------------------------------------------- +# Since gettimeofday is not defined any where standard, lets look in all the +# usual places. On MSVC we are just going to use ::clock() +#----------------------------------------------------------------------------- +IF (NOT MSVC) + IF ("H5_HAVE_TIME_GETTIMEOFDAY" MATCHES "^H5_HAVE_TIME_GETTIMEOFDAY$") + TRY_COMPILE (HAVE_TIME_GETTIMEOFDAY + ${CMAKE_BINARY_DIR} + ${HDF5_RESOURCES_DIR}/GetTimeOfDayTest.cpp + COMPILE_DEFINITIONS -DTRY_TIME_H + OUTPUT_VARIABLE OUTPUT + ) + IF (HAVE_TIME_GETTIMEOFDAY STREQUAL "TRUE") + SET (H5_HAVE_TIME_GETTIMEOFDAY "1" CACHE INTERNAL "H5_HAVE_TIME_GETTIMEOFDAY") + ENDIF (HAVE_TIME_GETTIMEOFDAY STREQUAL "TRUE") + ENDIF ("H5_HAVE_TIME_GETTIMEOFDAY" MATCHES "^H5_HAVE_TIME_GETTIMEOFDAY$") + + IF ("H5_HAVE_SYS_TIME_GETTIMEOFDAY" MATCHES "^H5_HAVE_SYS_TIME_GETTIMEOFDAY$") + TRY_COMPILE (HAVE_SYS_TIME_GETTIMEOFDAY + ${CMAKE_BINARY_DIR} + ${HDF5_RESOURCES_DIR}/GetTimeOfDayTest.cpp + COMPILE_DEFINITIONS -DTRY_SYS_TIME_H + OUTPUT_VARIABLE OUTPUT + ) + IF (HAVE_SYS_TIME_GETTIMEOFDAY STREQUAL "TRUE") + SET (H5_HAVE_SYS_TIME_GETTIMEOFDAY "1" CACHE INTERNAL "H5_HAVE_SYS_TIME_GETTIMEOFDAY") + ENDIF (HAVE_SYS_TIME_GETTIMEOFDAY STREQUAL "TRUE") + ENDIF ("H5_HAVE_SYS_TIME_GETTIMEOFDAY" MATCHES "^H5_HAVE_SYS_TIME_GETTIMEOFDAY$") +ENDIF (NOT MSVC) + +IF (NOT HAVE_SYS_TIME_GETTIMEOFDAY AND NOT H5_HAVE_GETTIMEOFDAY AND NOT MSVC) + MESSAGE (STATUS "---------------------------------------------------------------") + MESSAGE (STATUS "Function 'gettimeofday()' was not found. HDF5 will use its") + MESSAGE (STATUS " own implementation.. This can happen on older versions of") + MESSAGE (STATUS " MinGW on Windows. Consider upgrading your MinGW installation") + MESSAGE (STATUS " to a newer version such as MinGW 3.12") + MESSAGE (STATUS "---------------------------------------------------------------") +ENDIF (NOT HAVE_SYS_TIME_GETTIMEOFDAY AND NOT H5_HAVE_GETTIMEOFDAY AND NOT MSVC) + + +# Check for Symbols +CHECK_SYMBOL_EXISTS (tzname "time.h" H5_HAVE_DECL_TZNAME) + +#----------------------------------------------------------------------------- +# +#----------------------------------------------------------------------------- +IF (NOT WINDOWS) + CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" H5_HAVE_TIOCGWINSZ) + CHECK_SYMBOL_EXISTS (TIOCGETD "sys/ioctl.h" H5_HAVE_TIOCGETD) +ENDIF (NOT WINDOWS) + +#----------------------------------------------------------------------------- +# Check for the Stream VFD driver +#----------------------------------------------------------------------------- +IF (HDF5_STREAM_VFD) + CHECK_INCLUDE_FILE_CONCAT ("netdb.h" H5_HAVE_NETDB_H) + CHECK_INCLUDE_FILE_CONCAT ("netinet/tcp.h" H5_HAVE_NETINET_TCP_H) + CHECK_INCLUDE_FILE_CONCAT ("sys/filio.h" H5_HAVE_SYS_FILIO_H) + SET (H5_HAVE_STREAM 1) +ENDIF (HDF5_STREAM_VFD) + + +# For other other specific tests, use this MACRO. +MACRO (HDF5_FUNCTION_TEST OTHER_TEST) + IF ("H5_${OTHER_TEST}" MATCHES "^H5_${OTHER_TEST}$") + SET (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}") + SET (OTHER_TEST_ADD_LIBRARIES) + IF (CMAKE_REQUIRED_LIBRARIES) + SET (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + ENDIF (CMAKE_REQUIRED_LIBRARIES) + + FOREACH (def ${HDF5_EXTRA_TEST_DEFINITIONS}) + SET (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}=${${def}}") + ENDFOREACH (def) + + FOREACH (def + H5_HAVE_SYS_TIME_H + H5_HAVE_UNISTD_H + H5_HAVE_SYS_TYPES_H + H5_HAVE_SYS_SOCKET_H + ) + IF ("${def}") + SET (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}") + ENDIF ("${def}") + ENDFOREACH (def) + + IF (LINUX_LFS) + SET (MACRO_CHECK_FUNCTION_DEFINITIONS + "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE" + ) + ENDIF (LINUX_LFS) + + # (STATUS "Performing ${OTHER_TEST}") + TRY_COMPILE (${OTHER_TEST} + ${CMAKE_BINARY_DIR} + ${HDF5_RESOURCES_DIR}//HDF5Tests.c + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + "${OTHER_TEST_ADD_LIBRARIES}" + OUTPUT_VARIABLE OUTPUT + ) + IF (${OTHER_TEST}) + SET (H5_${OTHER_TEST} 1 CACHE INTERNAL "Other test ${FUNCTION}") + MESSAGE (STATUS "Performing Other Test ${OTHER_TEST} - Success") + ELSE (${OTHER_TEST}) + MESSAGE (STATUS "Performing Other Test ${OTHER_TEST} - Failed") + SET (H5_${OTHER_TEST} "" CACHE INTERNAL "Other test ${FUNCTION}") + FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + "Performing Other Test ${OTHER_TEST} failed with the following output:\n" + "${OUTPUT}\n" + ) + ENDIF (${OTHER_TEST}) + ENDIF ("H5_${OTHER_TEST}" MATCHES "^H5_${OTHER_TEST}$") +ENDMACRO (HDF5_FUNCTION_TEST) + +#----------------------------------------------------------------------------- +# Check a bunch of other functions +#----------------------------------------------------------------------------- +IF (WINDOWS) + SET (H5_HAVE_TIMEZONE 1) + SET (H5_HAVE_FUNCTION 1) +ELSE (WINDOWS) + FOREACH (test + TIME_WITH_SYS_TIME + STDC_HEADERS + HAVE_TM_ZONE + HAVE_STRUCT_TM_TM_ZONE + HAVE_ATTRIBUTE + HAVE_FUNCTION + HAVE_TM_GMTOFF + HAVE_TIMEZONE + HAVE_STRUCT_TIMEZONE + HAVE_STAT_ST_BLOCKS + HAVE_FUNCTION + SYSTEM_SCOPE_THREADS + HAVE_SOCKLEN_T + DEV_T_IS_SCALAR + HAVE_OFF64_T + GETTIMEOFDAY_GIVES_TZ + VSNPRINTF_WORKS + HAVE_C99_FUNC + HAVE_C99_DESIGNATED_INITIALIZER + CXX_HAVE_OFFSETOF + ) + HDF5_FUNCTION_TEST (${test}) + ENDFOREACH (test) +ENDIF (WINDOWS) + +#----------------------------------------------------------------------------- +# Look for 64 bit file stream capability +#----------------------------------------------------------------------------- +IF (HAVE_OFF64_T) + CHECK_FUNCTION_EXISTS (lseek64 H5_HAVE_LSEEK64) + CHECK_FUNCTION_EXISTS (fseek64 H5_HAVE_FSEEK64) +ENDIF (HAVE_OFF64_T) + +#----------------------------------------------------------------------------- +# Determine how 'inline' is used +#----------------------------------------------------------------------------- +SET (HDF5_EXTRA_TEST_DEFINITIONS INLINE_TEST_INLINE) +FOREACH (inline_test inline __inline__ __inline) + SET (INLINE_TEST_INLINE ${inline_test}) + HDF5_FUNCTION_TEST (INLINE_TEST_${inline_test}) +ENDFOREACH (inline_test) + +SET (HDF5_EXTRA_TEST_DEFINITIONS) +IF (INLINE_TEST___inline__) + SET (H5_inline __inline__) +ELSE (INLINE_TEST___inline__) + IF (INLINE_TEST___inline) + SET (H5_inline __inline) + ELSE (INLINE_TEST___inline) + IF (INLINE_TEST_inline) + SET (H5_inline inline) + ENDIF (INLINE_TEST_inline) + ENDIF (INLINE_TEST___inline) +ENDIF (INLINE_TEST___inline__) + +#----------------------------------------------------------------------------- +# Check how to print a Long Long integer +#----------------------------------------------------------------------------- +SET (H5_PRINTF_LL_WIDTH "H5_PRINTF_LL_WIDTH") +IF (H5_PRINTF_LL_WIDTH MATCHES "^H5_PRINTF_LL_WIDTH$") + 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" + ) + ENDIF (PRINT_LL_FOUND) +ENDIF (H5_PRINTF_LL_WIDTH MATCHES "^H5_PRINTF_LL_WIDTH$") + +# ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can handle converting +# denormalized floating-point values. +# (This flag should be set for all machines, except for the Crays, where +# the cache value is set in it's config file) +# +SET (H5_CONVERT_DENORMAL_FLOAT 1) + +#----------------------------------------------------------------------------- +# Are we going to use HSIZE_T +#----------------------------------------------------------------------------- +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 +#----------------------------------------------------------------------------- +MACRO (H5ConversionTests TEST msg) + IF ("${TEST}" MATCHES "^${TEST}$") + # MESSAGE (STATUS "===> ${TEST}") + TRY_RUN (${TEST}_RUN ${TEST}_COMPILE + ${HDF5_BINARY_DIR}/CMake + ${HDF5_RESOURCES_DIR}/ConversionTests.c + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-D${TEST}_TEST + OUTPUT_VARIABLE OUTPUT + ) + IF (${TEST}_COMPILE) + IF (${TEST}_RUN MATCHES 0) + SET (${TEST} 1 CACHE INTERNAL ${msg}) + MESSAGE(STATUS "${msg}... yes") + ELSE (${TEST}_RUN MATCHES 0) + SET (${TEST} "" CACHE INTERNAL ${msg}) + MESSAGE (STATUS "${msg}... no") + FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + "Test ${TEST} Run failed with the following output and exit code:\n ${OUTPUT}\n" + ) + ENDIF (${TEST}_RUN MATCHES 0) + ELSE (${TEST}_COMPILE ) + SET (${TEST} "" CACHE INTERNAL ${msg}) + MESSAGE (STATUS "${msg}... no") + FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + "Test ${TEST} Compile failed with the following output:\n ${OUTPUT}\n" + ) + ENDIF (${TEST}_COMPILE) + + ENDIF("${TEST}" MATCHES "^${TEST}$") +ENDMACRO (H5ConversionTests) + +#----------------------------------------------------------------------------- +# Macro to make some of the conversion tests easier to write/read +#----------------------------------------------------------------------------- +MACRO (H5MiscConversionTest VAR TEST msg) + IF ("${TEST}" MATCHES "^${TEST}$") + IF (${VAR}) + SET (${TEST} 1 CACHE INTERNAL ${msg}) + MESSAGE (STATUS "${msg}... yes") + ELSE (${VAR}) + SET (${TEST} "" CACHE INTERNAL ${msg}) + MESSAGE (STATUS "${msg}... no") + ENDIF (${VAR}) + ENDIF ("${TEST}" MATCHES "^${TEST}$") +ENDMACRO (H5MiscConversionTest) + +#----------------------------------------------------------------------------- +# Check various conversion capabilities +#----------------------------------------------------------------------------- + +# ----------------------------------------------------------------------- +# Set flag to indicate that the machine can handle conversion from +# long double to integers accurately. This flag should be set "yes" for +# all machines except all SGIs. For SGIs, some conversions are +# incorrect and its cache value is set "no" in its config/irix6.x and +# irix5.x. +# +H5MiscConversionTest (H5_SIZEOF_LONG_DOUBLE H5_LDOUBLE_TO_INTEGER_ACCURATE "checking IF converting from long double to integers is accurate") +# ----------------------------------------------------------------------- +# Set flag to indicate that the machine can do conversion from +# long double to integers regardless of accuracy. This flag should be +# set "yes" for all machines except HP-UX 11.00. For HP-UX 11.00, the +# compiler has 'floating exception' when converting 'long double' to all +# integers except 'unsigned long long'. Other HP-UX systems are unknown +# yet. (1/8/05 - SLU) +# +H5ConversionTests (H5_LDOUBLE_TO_INTEGER_WORKS "Checking IF converting from long double to integers works") +# ----------------------------------------------------------------------- +# Set flag to indicate that the machine can handle conversion from +# integers to long double. (This flag should be set "yes" for all +# machines except all SGIs, where some conversions are +# incorrect and its cache value is set "no" in its config/irix6.x and +# irix5.x) +# +H5MiscConversionTest (H5_SIZEOF_LONG_DOUBLE H5_INTEGER_TO_LDOUBLE_ACCURATE "checking IF accurately converting from integers to long double") +# ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can accurately convert +# 'unsigned long' to 'float' values. +# (This flag should be set for all machines, except for Pathscale compiler +# on Sandia's Linux machine where the compiler interprets 'unsigned long' +# values as negative when the first bit of 'unsigned long' is on during +# the conversion to float.) +# +H5ConversionTests (H5_ULONG_TO_FLOAT_ACCURATE "Checking IF accurately converting unsigned long to float values") +# ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can accurately convert +# 'unsigned (long) long' values to 'float' and 'double' values. +# (This flag should be set for all machines, except for the SGIs, where +# the cache value is set in the config/irix6.x config file) and Solaris +# 64-bit machines, where the short program below tests if round-up is +# correctly handled. +# +H5ConversionTests (H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE "Checking IF accurately converting unsigned long long to floating-point values") +# ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can accurately convert +# 'float' or 'double' to 'unsigned long long' values. +# (This flag should be set for all machines, except for PGI compiler +# where round-up happens when the fraction of float-point value is greater +# than 0.5. +# +H5ConversionTests (H5_FP_TO_ULLONG_ACCURATE "Checking IF accurately roundup converting floating-point to unsigned long long values" ) +# ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can accurately convert +# 'float', 'double' or 'long double' to 'unsigned long long' values. +# (This flag should be set for all machines, except for HP-UX machines +# where the maximal number for unsigned long long is 0x7fffffffffffffff +# during conversion. +# +H5ConversionTests (H5_FP_TO_ULLONG_RIGHT_MAXIMUM "Checking IF right maximum converting floating-point to unsigned long long values" ) +# ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can accurately convert +# 'long double' to 'unsigned int' values. (This flag should be set for +# all machines, except for some Intel compilers on some Linux.) +# +H5ConversionTests (H5_LDOUBLE_TO_UINT_ACCURATE "Checking IF correctly converting long double to unsigned int values") +# ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can _compile_ +# 'unsigned long long' to 'float' and 'double' typecasts. +# (This flag should be set for all machines.) +# +IF (H5_ULLONG_TO_FP_CAST_WORKS MATCHES ^H5_ULLONG_TO_FP_CAST_WORKS$) + SET (H5_ULLONG_TO_FP_CAST_WORKS 1 CACHE INTERNAL "Checking IF compiling unsigned long long to floating-point typecasts work") + MESSAGE (STATUS "Checking IF compiling unsigned long long to floating-point typecasts work... yes") +ENDIF (H5_ULLONG_TO_FP_CAST_WORKS MATCHES ^H5_ULLONG_TO_FP_CAST_WORKS$) +# ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can _compile_ +# 'long long' to 'float' and 'double' typecasts. +# (This flag should be set for all machines.) +# +IF (H5_LLONG_TO_FP_CAST_WORKS MATCHES ^H5_LLONG_TO_FP_CAST_WORKS$) + SET (H5_LLONG_TO_FP_CAST_WORKS 1 CACHE INTERNAL "Checking IF compiling long long to floating-point typecasts work") + MESSAGE (STATUS "Checking IF compiling long long to floating-point typecasts work... yes") +ENDIF (H5_LLONG_TO_FP_CAST_WORKS MATCHES ^H5_LLONG_TO_FP_CAST_WORKS$) +# ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can convert from +# 'unsigned long long' to 'long double' without precision loss. +# (This flag should be set for all machines, except for FreeBSD(sleipnir) +# where the last 2 bytes of mantissa are lost when compiler tries to do +# the conversion, and Cygwin where compiler doesn't do rounding correctly.) +# +H5ConversionTests (H5_ULLONG_TO_LDOUBLE_PRECISION "Checking IF converting unsigned long long to long double with precision") +# ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can handle overflow converting +# all floating-point to all integer types. +# (This flag should be set for all machines, except for Cray X1 where +# floating exception is generated when the floating-point value is greater +# than the maximal integer value). +# +H5ConversionTests (H5_FP_TO_INTEGER_OVERFLOW_WORKS "Checking IF overflows normally converting floating-point to integer values") +# ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can accurately convert +# 'long double' to '(unsigned) long long' values. (This flag should be set for +# all machines, except for Mac OS 10.4 and SGI IRIX64 6.5. When the bit sequence +# of long double is 0x4351ccf385ebc8a0bfcc2a3c..., the values of (unsigned)long long +# start to go wrong on these two machines. Adjusting it higher to +# 0x4351ccf385ebc8a0dfcc... or 0x4351ccf385ebc8a0ffcc... will make the converted +# values wildly wrong. This test detects this wrong behavior and disable the test. +# +H5ConversionTests (H5_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctly converting long double to (unsigned) long long values") +# ---------------------------------------------------------------------- +# Set the flag to indicate that the machine can accurately convert +# '(unsigned) long long' to 'long double' values. (This flag should be set for +# all machines, except for Mac OS 10.4, when the bit sequences are 003fff..., +# 007fff..., 00ffff..., 01ffff..., ..., 7fffff..., the converted values are twice +# as big as they should be. +# +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) diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c new file mode 100644 index 0000000..0e24954 --- /dev/null +++ b/config/cmake/ConversionTests.c @@ -0,0 +1,422 @@ +#ifdef H5_FP_TO_INTEGER_OVERFLOW_WORKS_TEST + +int main(void) +{ + float f = 2147483648.0f; + int i; + + i = (int)f; + + done: + exit(0); +} + +#endif + +#ifdef H5_FP_TO_ULLONG_ACCURATE_TEST + +int main(void) +{ + float f = 111.60f; + double d = 222.55L; + unsigned long long l1 = (unsigned long long)f; + unsigned long long l2 = (unsigned long long)d; + int ret = 0; + + if(l1 == 112) + ret = 1; + if(l2 == 223) + ret = 1; + + done: + exit(ret); +} + +#endif + +#ifdef H5_FP_TO_ULLONG_RIGHT_MAXIMUM_TEST +int main(void) +{ + float f = 9701917572145405952.00f; + double d1 = 9701917572145405952.00L; + long double d2 = 9701917572145405952.00L; + double d3 = 2e40L; + unsigned long long l1 = (unsigned long long)f; + unsigned long long l2 = (unsigned long long)d1; + unsigned long long l3 = (unsigned long long)d2; + unsigned long long l4; + unsigned long long l5 = 0x7fffffffffffffffULL; + int ret = 0; + + if(l1 <= l5 || l2 <= l5 || l3 <= l5) + ret = 1; + + l4 = (unsigned long long)d3; + if(l4 <= l5) + ret = 1; + + done: + exit(ret); +} + +#endif + +#ifdef H5_LDOUBLE_TO_INTEGER_WORKS_TEST +int main(void) +{ + void *align; + long double ld = 9701917572145405952.00L; + unsigned char v1; + short v2; + unsigned int v3; + int ret = 0; + + align = (void*) malloc(sizeof(long double)); + memcpy(align, &ld, sizeof(long double)); + + /*For HU-UX11.00, there's floating exception(core dump) when doing some of casting + *from 'long double' to integers*/ + v1 = (unsigned char) (*((long double*) align)); + v2 = (short) (*((long double*) align)); + v3 = (unsigned int) (*((long double*) align)); + + done: exit(ret); +} + +#endif + +#ifdef H5_LDOUBLE_TO_LLONG_ACCURATE_TEST +int main(void) +{ + long double ld = 20041683600089727.779961L; + long long ll; + unsigned long long ull; + unsigned char s[16]; + int ret = 0; + + if(sizeof(long double) == 16) + { + /*make sure the long double type is the same as the failing type + *which has 16 bytes in size and 11 bits of exponent. If it is, + *the bit sequence should be like below. It's not + *a decent way to check but this info isn't available. */ + memcpy(s, &ld, 16); + if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 && + s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 && + s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) + { + + /*slightly adjust the bit sequence (s[8]=0xdf). The converted + *values will go wild on Mac OS 10.4 and IRIX64 6.5.*/ + s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3; + s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0; + s[8]=0xdf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c; + s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20; + + memcpy(&ld, s, 16); + ll = (long long)ld; + ull = (unsigned long long)ld; + + if(ll != 20041683600089728 || ull != 20041683600089728) + ret = 1; + } + } + done: + exit(ret); +} +#endif + +#ifdef H5_LDOUBLE_TO_UINT_ACCURATE_TEST +int main(void) +{ + long double ld = 2733248032.9183987530L; + unsigned int i; + int ret = 0; + + i = (unsigned int)ld; + if(i!=2733248032 && i!=2733248031 && i!=2733248033) + ret = 1; + + done: + exit(ret); +} +#endif + +#ifdef H5_LLONG_TO_LDOUBLE_CORRECT_TEST +int main(void) +{ + long double ld; + long long ll; + unsigned long long ull; + unsigned char s[16]; + int flag=0, ret=0; + + /*Determine if long double has 16 byte in size, 11 bit exponent, and + *the bias is 0x3ff */ + if(sizeof(long double) == 16) + { + ld = 1.0L; + memcpy(s, &ld, 16); + if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 && + s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00) + flag = 1; + } + + if(flag==1 && sizeof(long long)==8) + { + ll = 0x01ffffffffffffffLL; + ld = (long double)ll; + memcpy(s, &ld, 16); + /*Check if the bit sequence is as supposed to be*/ + if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || + s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || + s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) + ret = 1; + } + if(flag==1 && sizeof(unsigned long long)==8) + { + ull = 0x01ffffffffffffffULL; + ld = (long double)ull; + memcpy(s, &ld, 16); + if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff || + s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff || + s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00) + ret = 1; + } + done: + exit(ret); +} +#endif + +#ifdef H5_NO_ALIGNMENT_RESTRICTIONS_TEST + +#include <stdlib.h> +#include <string.h> + +typedef struct +{ + size_t len; + void *p; +}hvl_t; + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus +extern "C" +# endif +int FC_DUMMY_MAIN() +{ return 1;} +#endif +#endif +int +main () +{ + + char *chp = "beefs"; + char **chpp = malloc (2 * sizeof (char *)); + char **chpp2; + hvl_t vl = + { 12345, (void *) chp}; + hvl_t *vlp; + hvl_t *vlp2; + + memcpy ((void *) ((char *) chpp + 1), &chp, sizeof (char *)); + chpp2 = (char **) ((char *) chpp + 1); + if (strcmp (*chpp2, chp)) + { + free (chpp); + return 1; + } + free (chpp); + + vlp = malloc (2 * sizeof (hvl_t)); + memcpy ((void *) ((char *) vlp + 1), &vl, sizeof (hvl_t)); + vlp2 = (hvl_t *) ((char *) vlp + 1); + if (vlp2->len != vl.len || vlp2->p != vl.p) + { + free (vlp); + return 1; + } + free (vlp); + + ; + return 0; +} + +#endif + +#ifdef H5_ULLONG_TO_LDOUBLE_PRECISION_TEST + +#include <stddef.h> + + +int main(void) +{ + /* General variables */ + int endian; + int tst_value = 1; + int ret = 0; + + /* For FreeBSD */ + unsigned long long l = 0xa601e80bda85fcefULL; + long double ld; + unsigned char *c1, *c2; + size_t size; + + /* For Cygwin */ + unsigned long long l_cyg = 0xfffffffffffffff0ULL; + long double ld_cyg; + unsigned char *c2_cyg; + size_t size_cyg; + + /* Determine this system's endianess */ + c1 = (unsigned char*)calloc(1, sizeof(int)); + memcpy((void*)c1, &tst_value, sizeof(int)); + if(c1[0]==1) + endian = 0; /* little endian */ + else + endian = 1; /* big endian */ + + /* For FreeBSD */ + size = sizeof(long double); + memset(&ld, 0, size); + ld = (long double)l; + + c2 = (unsigned char*)calloc(1, size); + memcpy((void*)c2, &ld, size); + + /* Test if the last 2 bytes of mantissa are lost. Mainly for FreeBSD on Intel + * architecture(sleipnir) where it happens. */ + /*if(endian==0 && c2[0]==0 && c2[1]==0)*//*little endian*/ + if(endian==0 && c2[0]==0) + { /*little endian*/ + ret = 1; + goto done; + } + + /* For Cygwin */ + size_cyg = sizeof(long double); + memset(&ld_cyg, 0, size); + ld_cyg = (long double)l_cyg; + + c2_cyg = (unsigned char*)calloc(1, size_cyg); + memcpy((void*)c2_cyg, &ld_cyg, size_cyg); + + /* Test if the last 4 bytes(roughly) of mantissa are rounded up. Mainly for Cygwin + * where the values like 0xffffffffffffffff, 0xfffffffffffffffe, ..., + * 0xfffffffffffff000 ... are rounded up as 0x0000403f8000000000000000 + * instead of 0x0000403effffffffffffffff, 0x0000403efffffffffffffffe, ..., + * 0x0000403efffffffffffff000 ... + */ + if(endian==0 && c2_cyg[0]==0 && c2_cyg[1]==0 && c2_cyg[2]==0 && c2_cyg[3]==0) + ret = 1; + + done: + if(c1) + free(c1); + if(c2) + free(c2); + if(c2_cyg) + free(c2_cyg); + exit(ret); +} + +#endif + + +#ifdef H5_ULONG_TO_FLOAT_ACCURATE_TEST + +int main(void) +{ + int ret = 0; + unsigned long l1; + unsigned long l2; + unsigned long l3; + float f1; + float f2; + float f3; + + + if(sizeof(unsigned long)==8) { + l1 = 0xffffffffffffffffUL; + l2 = 0xffffffffffff0000UL; + l3 = 0xf000000000000000UL; + + f1 = (float)l1; + f2 = (float)l2; + f3 = (float)l3; + + if((f1 < 0) || (f2 < 0) || (f3 < 0)) + ret = 1; + } + +done: + exit(ret); +} + +#endif + +#ifdef H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE_TEST + +#include <string.h> + + +int main(void) +{ + unsigned long l1; + unsigned long l2; + unsigned long l3; + unsigned long l4; + unsigned long long ld1; + unsigned long long ld2; + unsigned long long ld3; + unsigned long long ld4; + double d1, d2, d3, d4; + unsigned char s[8]; + int ret = 0; + + if(sizeof(unsigned long)==8) { + l1 = 0xf000000000000b00UL; /*Round-down case*/ + l2 = 0xf000000000000401UL; /*Round-up case*/ + l3 = 0xf000000000000400UL; /*Round-down case*/ + l4 = 0xf000000000000c00UL; /*Round-up case*/ + + d1 = (double)l1; + d2 = (double)l2; + d3 = (double)l3; + d4 = (double)l4; + } else if(sizeof(unsigned long long)==8) { + ld1 = 0xf000000000000b00ULL; /*Round-down case*/ + ld2 = 0xf000000000000401ULL; /*Round-up case*/ + ld3 = 0xf000000000000400ULL; /*Round-down case*/ + ld4 = 0xf000000000000c00ULL; /*Round-up case*/ + + d1 = (double)ld1; + d2 = (double)ld2; + d3 = (double)ld3; + d4 = (double)ld4; + } else { + ret = 1; + goto done; + } + + memcpy(s, &d1, 8); + if(s[7]!=1) + ret = 1; + + memcpy(s, &d2, 8); + if(s[7]!=1) + ret = 1; + + memcpy(s, &d3, 8); + if(s[7]!=0) + ret = 1; + + memcpy(s, &d4, 8); + if(s[7]!=2) + ret = 1; + +done: + exit(ret); +} +#endif diff --git a/config/cmake/FindHDF5.cmake b/config/cmake/FindHDF5.cmake new file mode 100644 index 0000000..4e448ca --- /dev/null +++ b/config/cmake/FindHDF5.cmake @@ -0,0 +1,56 @@ +#
+# To be used by projects that make use of Cmakeified hdf5-1.8
+#
+
+#
+# Find the HDF5 includes and get all installed hdf5 library settings from
+# HDF5-config.cmake file : Requires a CMake compatible hdf5-1.8.5 or later
+# for this feature to work. The following vars are set if hdf5 is found.
+#
+# HDF5_FOUND - True if found, otherwise all other vars are undefined
+# HDF5_INCLUDE_DIR - The include dir for main *.h files
+# HDF5_FORTRAN_INCLUDE_DIR - The include dir for fortran modules and headers
+# HDF5_VERSION_STRING - full version (e.g. 1.8.5)
+# HDF5_VERSION_MAJOR - major part of version (e.g. 1.8)
+# HDF5_VERSION_MINOR - minor part (e.g. 5)
+#
+# The following boolean vars will be defined
+# HDF5_ENABLE_PARALLEL - 1 if HDF5 parallel supported
+# HDF5_BUILD_FORTRAN - 1 if HDF5 was compiled with fortran on
+# HDF5_BUILD_CPP_LIB - 1 if HDF5 was compiled with cpp on
+# HDF5_BUILD_TOOLS - 1 if HDF5 was compiled with tools on
+# HDF5_BUILD_HL_LIB - 1 if HDF5 was compiled with parallel on
+#
+# Target names that are valid (depending on enabled options)
+# will be the following
+#
+# hdf5 : HDF5 C library
+# hdf5_tools : the tools library
+# hdf5_f90cstub : used by Fortran to C interface
+# hdf5_fortran : Fortran HDF5 library
+# hdf5_cpp : HDF5 cpp interface library
+# hdf5_hl : High Level library
+# hdf5_hl_f90cstub : used by Fortran to C interface to High Level library
+# hdf5_hl_fortran : Fortran High Level library
+# hdf5_hl_cpp : High Level cpp interface library
+#
+# To aid in finding HDF5 as part of a subproject set
+# HDF5_ROOT_DIR_HINT to the location where HDF5-config.cmake lies
+
+FIND_PATH (HDF5_ROOT_DIR "HDF5-config.cmake"
+ ${HDF5_ROOT_DIR_HINT}
+ /usr/local/lib
+ /usr/local/lib64
+ /usr/lib
+ /usr/lib64
+ "C:/Program Files/HDF5/lib"
+)
+
+FIND_PATH (HDF5_INCLUDE_DIR "H5public.h"
+ ${HDF5_ROOT_DIR}/../include
+)
+
+IF (HDF5_INCLUDE_DIR)
+ SET (HDF5_FOUND "YES")
+ INCLUDE (${HDF5_ROOT_DIR}/HDF5-config.cmake)
+ENDIF (HDF5_INCLUDE_DIR)
diff --git a/config/cmake/FindSZIP.cmake b/config/cmake/FindSZIP.cmake new file mode 100644 index 0000000..190b0b5 --- /dev/null +++ b/config/cmake/FindSZIP.cmake @@ -0,0 +1,179 @@ + +# - Find SZIP library +# - Derived from the FindTiff.cmake that is included with cmake +# Find the native SZIP includes and library +# This module defines +# SZIP_INCLUDE_DIRS, where to find tiff.h, etc. +# SZIP_LIBRARIES, libraries to link against to use SZIP. +# SZIP_FOUND, If false, do not try to use SZIP. +# also defined, but not for general use are +# SZIP_LIBRARY, where to find the SZIP library. +# SZIP_LIBRARY_DEBUG - Debug version of tiff library +# SZIP_LIBRARY_RELEASE - Release Version of tiff library + +# MESSAGE (STATUS "Finding Szip library and headers..." ) + +############################################ +# +# Check the existence of the libraries. +# +############################################ +# This macro was taken directly from the FindQt4.cmake file that is included +# with the CMake distribution. This is NOT my work. All work was done by the +# original authors of the FindQt4.cmake file. Only minor modifications were +# made to remove references to Qt and make this file more generally applicable +######################################################################### + +MACRO (SZIP_ADJUST_LIB_VARS basename) + IF (${basename}_INCLUDE_DIR) + + # if only the release version was found, set the debug variable also to the release version + IF (${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG) + SET (${basename}_LIBRARY_DEBUG ${${basename}_LIBRARY_RELEASE}) + SET (${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE}) + SET (${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE}) + ENDIF (${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG) + + # if only the debug version was found, set the release variable also to the debug version + IF (${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE) + SET (${basename}_LIBRARY_RELEASE ${${basename}_LIBRARY_DEBUG}) + SET (${basename}_LIBRARY ${${basename}_LIBRARY_DEBUG}) + SET (${basename}_LIBRARIES ${${basename}_LIBRARY_DEBUG}) + ENDIF (${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE) + IF (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE) + # if the generator supports configuration types then set + # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value + IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET (${basename}_LIBRARY optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG}) + ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + # if there are no configuration types and CMAKE_BUILD_TYPE has no value + # then just use the release libraries + SET (${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} ) + ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET (${basename}_LIBRARIES optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG}) + ENDIF (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE) + + SET (${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH "The ${basename} library") + + IF (${basename}_LIBRARY) + SET (${basename}_FOUND 1) + ENDIF (${basename}_LIBRARY) + + ENDIF (${basename}_INCLUDE_DIR ) + + # Make variables changeble to the advanced user + MARK_AS_ADVANCED (${basename}_LIBRARY ${basename}_LIBRARY_RELEASE ${basename}_LIBRARY_DEBUG ${basename}_INCLUDE_DIR ) +ENDMACRO (SZIP_ADJUST_LIB_VARS) + + +# Look for the header file. +SET (SZIP_INCLUDE_SEARCH_DIRS + $ENV{SZIP_INSTALL}/include + $ENV{SZIP_INSTALL}/include/szip + /usr/include + /usr/include/szip +) + +SET (SZIP_LIB_SEARCH_DIRS + $ENV{SZIP_INSTALL}/lib + /usr/lib +) + +SET (SZIP_BIN_SEARCH_DIRS + $ENV{SZIP_INSTALL}/bin + /usr/bin +) + +FIND_PATH (SZIP_INCLUDE_DIR + NAMES szlib.h + PATHS ${SZIP_INCLUDE_SEARCH_DIRS} + NO_DEFAULT_PATH +) + +IF (WIN32 AND NOT MINGW) + SET (SZIP_SEARCH_DEBUG_NAMES "sz_d;libsz_d") + SET (SZIP_SEARCH_RELEASE_NAMES "sz;libsz") +ELSE (WIN32 AND NOT MINGW) + SET (SZIP_SEARCH_DEBUG_NAMES "sz_d") + SET (SZIP_SEARCH_RELEASE_NAMES "sz") +ENDIF (WIN32 AND NOT MINGW) + +# Look for the library. +FIND_LIBRARY (SZIP_LIBRARY_DEBUG + NAMES ${SZIP_SEARCH_DEBUG_NAMES} + PATHS ${SZIP_LIB_SEARCH_DIRS} + NO_DEFAULT_PATH +) + +FIND_LIBRARY (SZIP_LIBRARY_RELEASE + NAMES ${SZIP_SEARCH_RELEASE_NAMES} + PATHS ${SZIP_LIB_SEARCH_DIRS} + NO_DEFAULT_PATH +) + +SZIP_ADJUST_LIB_VARS (SZIP) + +IF (SZIP_INCLUDE_DIR AND SZIP_LIBRARY) + SET (SZIP_FOUND 1) + SET (SZIP_LIBRARIES ${SZIP_LIBRARY}) + SET (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR}) + IF (SZIP_LIBRARY_DEBUG) + GET_FILENAME_COMPONENT (SZIP_LIBRARY_PATH ${SZIP_LIBRARY_DEBUG} PATH) + SET (SZIP_LIB_DIR ${SZIP_LIBRARY_PATH}) + ELSEIF (SZIP_LIBRARY_RELEASE) + GET_FILENAME_COMPONENT (SZIP_LIBRARY_PATH ${SZIP_LIBRARY_RELEASE} PATH) + SET (SZIP_LIB_DIR ${SZIP_LIBRARY_PATH}) + ENDIF (SZIP_LIBRARY_DEBUG) + +ELSE (SZIP_INCLUDE_DIR AND SZIP_LIBRARY) + SET (SZIP_FOUND 0) + SET (SZIP_LIBRARIES) + SET (SZIP_INCLUDE_DIRS) +ENDIF (SZIP_INCLUDE_DIR AND SZIP_LIBRARY) + +# Report the results. +IF (NOT SZIP_FOUND) + SET (SZIP_DIR_MESSAGE + "SZip was not found. Make sure SZIP_LIBRARY and SZIP_INCLUDE_DIR are set or set the SZIP_INSTALL environment variable." + ) + IF (NOT SZIP_FIND_QUIETLY) + MESSAGE (STATUS "${SZIP_DIR_MESSAGE}") + ELSE (NOT SZIP_FIND_QUIETLY) + IF (SZIP_FIND_REQUIRED) + MESSAGE (FATAL_ERROR "SZip was NOT found and is Required by this project") + ENDIF (SZIP_FIND_REQUIRED) + ENDIF (NOT SZIP_FIND_QUIETLY) +ENDIF (NOT SZIP_FOUND) + +IF (SZIP_FOUND) + INCLUDE (CheckSymbolExists) + ############################################# + # Find out if SZIP was build using dll's + ############################################# + # Save required variable + SET (CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES}) + SET (CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS}) + # Add SZIP_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES + SET (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${SZIP_INCLUDE_DIRS}") + + CHECK_SYMBOL_EXISTS (SZIP_BUILT_AS_DYNAMIC_LIB "SZconfig.h" HAVE_SZIP_DLL) + + IF (HAVE_SZIP_DLL STREQUAL "TRUE") + SET (HAVE_SZIP_DLL "1") + ENDIF (HAVE_SZIP_DLL STREQUAL "TRUE") + + # Restore CMAKE_REQUIRED_INCLUDES and CMAKE_REQUIRED_FLAGS variables + SET (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE}) + SET (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE}) + # + ############################################# +ENDIF (SZIP_FOUND) + +IF (FIND_SZIP_DEBUG) + MESSAGE (STATUS "SZIP_INCLUDE_DIR: ${SZIP_INCLUDE_DIR}") + MESSAGE (STATUS "SZIP_INCLUDE_DIRS: ${SZIP_INCLUDE_DIRS}") + MESSAGE (STATUS "SZIP_LIBRARY_DEBUG: ${SZIP_LIBRARY_DEBUG}") + MESSAGE (STATUS "SZIP_LIBRARY_RELEASE: ${SZIP_LIBRARY_RELEASE}") + MESSAGE (STATUS "HAVE_SZIP_DLL: ${HAVE_SZIP_DLL}") + MESSAGE (STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") +ENDIF (FIND_SZIP_DEBUG) diff --git a/config/cmake/GetTimeOfDayTest.cpp b/config/cmake/GetTimeOfDayTest.cpp new file mode 100644 index 0000000..3b5bf60 --- /dev/null +++ b/config/cmake/GetTimeOfDayTest.cpp @@ -0,0 +1,15 @@ +#if defined (TRY_SYS_TIME_H) +#include <sys/time.h> +/* #include <time.h> */ +#endif + + +#if defined (TRY_TIME_H) +#include <time.h> +#endif + +int main(int argc, char **argv) { + struct timeval t1; + gettimeofday(&t1, 0x00); + return 0; +} diff --git a/config/cmake/H5cxx_config.h.in b/config/cmake/H5cxx_config.h.in new file mode 100644 index 0000000..c4e1c03 --- /dev/null +++ b/config/cmake/H5cxx_config.h.in @@ -0,0 +1,5 @@ +/* src/H5cxx_config.h.in Created manually. */ + +/* Define if offsetof extension is present */ +#cmakedefine HAVE_OFFSETOF ${HAVE_OFFSETOF} + diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in new file mode 100644 index 0000000..3f4bdc5 --- /dev/null +++ b/config/cmake/H5pubconf.h.in @@ -0,0 +1,745 @@ +/* H5pubconf.h Generated By CMake during the configuration */ + +#ifndef H5_CONFIG_H_ +#define H5_CONFIG_H_ + +/* Define if the Windows virtual file driver should be compiled */ +#cmakedefine H5_HAVE_WINDOWS @H5_HAVE_WINDOWS@ + +/* Define if the Windows virtual file driver should use buffered IO functions */ +/* #undef WINDOWS_USE_STDIO */ + +/* Define the maximum write size for the Windows file driver. Larger writes + will be split into many writes. Safe values are 1 <= WINDOWS_MAX_BUF <= 2GB-1. */ +#cmakedefine WINDOWS_MAX_BUF (1024 * 1024 * 1024) + +/* Defined if HDF5 was built with CMake AND build as a shared library */ +#cmakedefine H5_BUILT_AS_DYNAMIC_LIB @H5_BUILT_AS_DYNAMIC_LIB@ + +/* Defined if HDF5 CPP was built with CMake AND build as a shared library */ +#cmakedefine H5_CPP_BUILT_AS_DYNAMIC_LIB @H5_CPP_BUILT_AS_DYNAMIC_LIB@ + +/* Defined if HDF5 HL was built with CMake AND build as a shared library */ +#cmakedefine H5_HL_BUILT_AS_DYNAMIC_LIB @H5_HL_BUILT_AS_DYNAMIC_LIB@ + +/* Define if building universal (internal helper macro) */ +#cmakedefine H5_AC_APPLE_UNIVERSAL_BUILD @H5_AC_APPLE_UNIVERSAL_BUILD@ + +/* Define if your system generates wrong code for log2 routine. */ +#cmakedefine H5_BAD_LOG2_CODE_GENERATED @H5_BAD_LOG2_CODE_GENERATED@ + +/* Define if the memory buffers being written to disk should be cleared before + writing. */ +#cmakedefine H5_CLEAR_MEMORY @H5_CLEAR_MEMORY@ + +/* Define if your system can handle converting denormalized floating-point + values. */ +#cmakedefine H5_CONVERT_DENORMAL_FLOAT @H5_CONVERT_DENORMAL_FLOAT@ + +/* Define if C++ compiler recognizes offsetof */ +#cmakedefine H5_CXX_HAVE_OFFSETOF @H5_CXX_HAVE_OFFSETOF@ + +/* Define the default virtual file driver to compile */ +#cmakedefine H5_DEFAULT_VFD @H5_DEFAULT_VFD@ + +/* Define if `dev_t' is a scalar */ +#cmakedefine H5_DEV_T_IS_SCALAR @H5_DEV_T_IS_SCALAR@ + +/* Define to dummy `main' function (if any) required to link to the Fortran + libraries. */ +#cmakedefine H5_FC_DUMMY_MAIN @H5_FC_DUMMY_MAIN@ + +/* Define if F77 and FC dummy `main' functions are identical. */ +#cmakedefine H5_FC_DUMMY_MAIN_EQ_F77 @H5_FC_DUMMY_MAIN_EQ_F77@ + +/* Define to a macro mangling the given C identifier (in lower and upper + case), which must not contain underscores, for linking with Fortran. */ +#define @H5_FC_FUNC@ + +/* As FC_FUNC, but for C identifiers containing underscores. */ +#define @H5_FC_FUNC_@ + +/* Define if your system can handle overflow converting floating-point to + integer values. */ +#cmakedefine H5_FP_TO_INTEGER_OVERFLOW_WORKS @H5_FP_TO_INTEGER_OVERFLOW_WORKS@ + +/* Define if your system roundup accurately converting floating-point to + unsigned long long values. */ +#cmakedefine H5_FP_TO_ULLONG_ACCURATE @H5_FP_TO_ULLONG_ACCURATE@ + +/* Define if your system has right maximum convert floating-point to unsigned + long long values. */ +#cmakedefine H5_FP_TO_ULLONG_RIGHT_MAXIMUM @H5_FP_TO_ULLONG_RIGHT_MAXIMUM@ + +/* Define if gettimeofday() populates the tz pointer passed in */ +#cmakedefine H5_GETTIMEOFDAY_GIVES_TZ @H5_GETTIMEOFDAY_GIVES_TZ@ + +/* Define to 1 if you have the `alarm' function. */ +#cmakedefine H5_HAVE_ALARM @H5_HAVE_ALARM@ + +/* Define if the __attribute__(()) extension is present */ +#cmakedefine H5_HAVE_ATTRIBUTE @H5_HAVE_ATTRIBUTE@ + +/* Define to 1 if you have the `BSDgettimeofday' function. */ +#cmakedefine H5_HAVE_BSDGETTIMEOFDAY @H5_HAVE_BSDGETTIMEOFDAY@ + +/* Define if the compiler understands C99 designated initialization of structs + and unions */ +#cmakedefine H5_HAVE_C99_DESIGNATED_INITIALIZER @H5_HAVE_C99_DESIGNATED_INITIALIZER@ + +/* Define if the compiler understands the __func__ keyword */ +#cmakedefine H5_HAVE_C99_FUNC @H5_HAVE_C99_FUNC@ + +/* Define if the function stack tracing code is to be compiled in */ +#cmakedefine H5_HAVE_CODESTACK @H5_HAVE_CODESTACK@ + +/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. + */ +#cmakedefine H5_HAVE_DECL_TZNAME @H5_HAVE_DECL_TZNAME@ + +/* Define to 1 if you have the `difftime' function. */ +#cmakedefine H5_HAVE_DIFFTIME @H5_HAVE_DIFFTIME@ + +/* Define if the direct I/O virtual file driver should be compiled */ +#cmakedefine H5_HAVE_DIRECT @H5_HAVE_DIRECT@ + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#cmakedefine H5_HAVE_DLFCN_H @H5_HAVE_DLFCN_H@ + +/* Define to 1 if you have the <dmalloc.h> header file. */ +#cmakedefine H5_HAVE_DMALLOC_H @H5_HAVE_DMALLOC_H@ + +/* Define if library information should be embedded in the executables */ +#cmakedefine H5_HAVE_EMBEDDED_LIBINFO @H5_HAVE_EMBEDDED_LIBINFO@ + +/* Define to 1 if you have the <features.h> header file. */ +#cmakedefine H5_HAVE_FEATURES_H @H5_HAVE_FEATURES_H@ + +/* Define if support for deflate (zlib) filter is enabled */ +#cmakedefine H5_HAVE_FILTER_DEFLATE @H5_HAVE_FILTER_DEFLATE@ + +/* Define if support for Fletcher32 checksum is enabled */ +#cmakedefine H5_HAVE_FILTER_FLETCHER32 @H5_HAVE_FILTER_FLETCHER32@ + +/* Define if support for nbit filter is enabled */ +#cmakedefine H5_HAVE_FILTER_NBIT @H5_HAVE_FILTER_NBIT@ + +/* Define if support for scaleoffset filter is enabled */ +#cmakedefine H5_HAVE_FILTER_SCALEOFFSET @H5_HAVE_FILTER_SCALEOFFSET@ + +/* Define if support for shuffle filter is enabled */ +#cmakedefine H5_HAVE_FILTER_SHUFFLE @H5_HAVE_FILTER_SHUFFLE@ + +/* Define if support for szip filter is enabled */ +#cmakedefine H5_HAVE_FILTER_SZIP @H5_HAVE_FILTER_SZIP@ + +/* Define to 1 if you have the `fork' function. */ +#cmakedefine H5_HAVE_FORK @H5_HAVE_FORK@ + +/* Define to 1 if you have the `frexpf' function. */ +#cmakedefine H5_HAVE_FREXPF @H5_HAVE_FREXPF@ + +/* Define to 1 if you have the `frexpl' function. */ +#cmakedefine H5_HAVE_FREXPL @H5_HAVE_FREXPL@ + +/* Define to 1 if you have the `fseek64' function. */ +#cmakedefine H5_HAVE_FSEEK64 @H5_HAVE_FSEEK64@ + +/* Define to 1 if you have the `fseeko' function. */ +#cmakedefine H5_HAVE_FSEEKO @H5_HAVE_FSEEKO@ + +/* Define to 1 if you have the `fstat64' function. */ +#cmakedefine H5_HAVE_FSTAT64 @H5_HAVE_FSTAT64@ + +/* Define to 1 if you have the `ftello' function. */ +#cmakedefine H5_HAVE_FTELLO @H5_HAVE_FTELLO@ + +/* Define to 1 if you have the `ftruncate64' function. */ +#cmakedefine H5_HAVE_FTRUNCATE64 @H5_HAVE_FTRUNCATE64@ + +/* Define if the compiler understands the __FUNCTION__ keyword */ +#cmakedefine H5_HAVE_FUNCTION @H5_HAVE_FUNCTION@ + +/* Define to 1 if you have the `GetConsoleScreenBufferInfo' function. */ +#cmakedefine H5_HAVE_GETCONSOLESCREENBUFFERINFO @H5_HAVE_GETCONSOLESCREENBUFFERINFO@ + +/* Define to 1 if you have the `gethostname' function. */ +#cmakedefine H5_HAVE_GETHOSTNAME @H5_HAVE_GETHOSTNAME@ + +/* Define to 1 if you have the `getpwuid' function. */ +#cmakedefine H5_HAVE_GETPWUID @H5_HAVE_GETPWUID@ + +/* Define to 1 if you have the `getrusage' function. */ +#cmakedefine H5_HAVE_GETRUSAGE @H5_HAVE_GETRUSAGE@ + +/* Define to 1 if you have the `gettextinfo' function. */ +#cmakedefine H5_HAVE_GETTEXTINFO @H5_HAVE_GETTEXTINFO@ + +/* Define to 1 if you have the `gettimeofday' function. */ +#cmakedefine H5_HAVE_GETTIMEOFDAY @H5_HAVE_GETTIMEOFDAY@ + +/* Define to 1 if you have the `gettimeofday' function declared in time.h . */ +#cmakedefine H5_HAVE_TIME_GETTIMEOFDAY @H5_HAVE_TIME_GETTIMEOFDAY@ + +/* Define to 1 if you have the `gettimeofday' function declared in time.h . */ +#cmakedefine H5_HAVE_SYS_TIME_GETTIMEOFDAY @H5_HAVE_SYS_TIME_GETTIMEOFDAY@ + +/* Define to 1 if you have the `get_fpc_csr' function. */ +#cmakedefine H5_HAVE_GET_FPC_CSR @H5_HAVE_GET_FPC_CSR@ + +/* Define if we have GPFS support */ +#cmakedefine H5_HAVE_GPFS @H5_HAVE_GPFS@ + +/* Define to 1 if you have the <gpfs.h> header file. */ +#cmakedefine H5_HAVE_GPFS_H @H5_HAVE_GPFS_H@ + +/* Define if h5dump packed bits feature is enabled */ +#cmakedefine H5_HAVE_H5DUMP_PACKED_BITS @H5_HAVE_H5DUMP_PACKED_BITS@ + +/* Define if library will contain instrumentation to detect correct + optimization operation */ +#cmakedefine H5_HAVE_INSTRUMENTED_LIBRARY @H5_HAVE_INSTRUMENTED_LIBRARY@ + +/* Define to 1 if you have the <inttypes.h> header file. */ +#cmakedefine H5_HAVE_INTTYPES_H @H5_HAVE_INTTYPES_H@ + +/* Define to 1 if you have the `ioctl' function. */ +#cmakedefine H5_HAVE_IOCTL @H5_HAVE_IOCTL@ + +/* Define to 1 if you have the <io.h> header file. */ +#cmakedefine H5_HAVE_IO_H @H5_HAVE_IO_H@ + +/* Define to 1 if you have the `dmalloc' library (-ldmalloc). */ +#cmakedefine H5_HAVE_LIBDMALLOC @H5_HAVE_LIBDMALLOC@ + +/* Define to 1 if you have the `lmpe' library (-llmpe). */ +#cmakedefine H5_HAVE_LIBLMPE @H5_HAVE_LIBLMPE@ + +/* Define to 1 if you have the `m' library (-lm). */ +#cmakedefine H5_HAVE_LIBM @H5_HAVE_LIBM@ + +/* Define to 1 if you have the `mpe' library (-lmpe). */ +#cmakedefine H5_HAVE_LIBMPE @H5_HAVE_LIBMPE@ + +/* Define to 1 if you have the `mpi' library (-lmpi). */ +#cmakedefine H5_HAVE_LIBMPI @H5_HAVE_LIBMPI@ + +/* Define to 1 if you have the `mpich' library (-lmpich). */ +#cmakedefine H5_HAVE_LIBMPICH @H5_HAVE_LIBMPICH@ + +/* Define to 1 if you have the `mpio' library (-lmpio). */ +#cmakedefine H5_HAVE_LIBMPIO @H5_HAVE_LIBMPIO@ + +/* Define to 1 if you have the `nsl' library (-lnsl). */ +#cmakedefine H5_HAVE_LIBNSL @H5_HAVE_LIBNSL@ + +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#cmakedefine H5_HAVE_LIBPTHREAD @H5_HAVE_LIBPTHREAD@ + +/* Define to 1 if you have the `socket' library (-lsocket). */ +#cmakedefine H5_HAVE_LIBSOCKET @H5_HAVE_LIBSOCKET@ + +/* Define to 1 if you have the `sz' library (-lsz). */ +#cmakedefine H5_HAVE_LIBSZ @H5_HAVE_LIBSZ@ + +/* Define to 1 if you have the `z' library (-lz). */ +#cmakedefine H5_HAVE_LIBZ @H5_HAVE_LIBZ@ + +/* Define to 1 if you have the `longjmp' function. */ +#cmakedefine H5_HAVE_LONGJMP @H5_HAVE_LONGJMP@ + +/* Define to 1 if you have the `lseek64' function. */ +#cmakedefine H5_HAVE_LSEEK64 @H5_HAVE_LSEEK64@ + +/* Define to 1 if you have the `lstat' function. */ +#cmakedefine H5_HAVE_LSTAT @H5_HAVE_LSTAT@ + +/* Define to 1 if you have the <memory.h> header file. */ +#cmakedefine H5_HAVE_MEMORY_H @H5_HAVE_MEMORY_H@ + +/* Define if we have MPE support */ +#cmakedefine H5_HAVE_MPE @H5_HAVE_MPE@ + +/* Define to 1 if you have the <mpe.h> header file. */ +#cmakedefine H5_HAVE_MPE_H @H5_HAVE_MPE_H@ + +/* Define if MPI_File_get_size works correctly */ +#cmakedefine H5_HAVE_MPI_GET_SIZE @H5_HAVE_MPI_GET_SIZE@ + +/* Define if `MPI_Comm_c2f' and `MPI_Comm_f2c' exists */ +#cmakedefine H5_HAVE_MPI_MULTI_LANG_Comm @H5_HAVE_MPI_MULTI_LANG_Comm@ + +/* Define if `MPI_Info_c2f' and `MPI_Info_f2c' exists */ +#cmakedefine H5_HAVE_MPI_MULTI_LANG_Info @H5_HAVE_MPI_MULTI_LANG_Info@ + +/* Define if we have parallel support */ +#cmakedefine H5_HAVE_PARALLEL @H5_HAVE_PARALLEL@ + +/* Define to 1 if you have the <pthread.h> header file. */ +#cmakedefine H5_HAVE_PTHREAD_H @H5_HAVE_PTHREAD_H@ + +/* Define to 1 if you have the `random' function. */ +#cmakedefine H5_HAVE_RANDOM @H5_HAVE_RANDOM@ + +/* Define to 1 if you have the `rand_r' function. */ +#cmakedefine H5_HAVE_RAND_R @H5_HAVE_RAND_R@ + +/* Define to 1 if you have the <setjmp.h> header file. */ +#cmakedefine H5_HAVE_SETJMP_H @H5_HAVE_SETJMP_H@ + +/* Define to 1 if you have the `setsysinfo' function. */ +#cmakedefine H5_HAVE_SETSYSINFO @H5_HAVE_SETSYSINFO@ + +/* Define to 1 if you have the `sigaction' function. */ +#cmakedefine H5_HAVE_SIGACTION @H5_HAVE_SIGACTION@ + +/* Define to 1 if you have the `siglongjmp' function. */ +#cmakedefine H5_HAVE_SIGLONGJMP @H5_HAVE_SIGLONGJMP@ + +/* Define to 1 if you have the `signal' function. */ +#cmakedefine H5_HAVE_SIGNAL @H5_HAVE_SIGNAL@ + +/* Define to 1 if you have the `snprintf' function. */ +#cmakedefine H5_HAVE_SNPRINTF @H5_HAVE_SNPRINTF@ + +/* Define to 1 if you have the `srandom' function. */ +#cmakedefine H5_HAVE_SRANDOM @H5_HAVE_SRANDOM@ + +/* Define to 1 if you have the `stat64' function. */ +#cmakedefine H5_HAVE_STAT64 @H5_HAVE_STAT64@ + +/* Define if `struct stat' has the `st_blocks' field */ +#cmakedefine H5_HAVE_STAT_ST_BLOCKS @H5_HAVE_STAT_ST_BLOCKS@ + +/* Define to 1 if you have the <stddef.h> header file. */ +#cmakedefine H5_HAVE_STDDEF_H @H5_HAVE_STDDEF_H@ + +/* Define to 1 if you have the <stdint.h> header file. */ +#cmakedefine H5_HAVE_STDINT_H @H5_HAVE_STDINT_H@ + +/* Define to 1 if you have the <stdlib.h> header file. */ +#cmakedefine H5_HAVE_STDLIB_H @H5_HAVE_STDLIB_H@ + +/* Define to 1 if you have the `strdup' function. */ +#cmakedefine H5_HAVE_STRDUP @H5_HAVE_STRDUP@ + +/* Define to 1 if you have the <strings.h> header file. */ +#cmakedefine H5_HAVE_STRINGS_H @H5_HAVE_STRINGS_H@ + +/* Define to 1 if you have the <string.h> header file. */ +#cmakedefine H5_HAVE_STRING_H @H5_HAVE_STRING_H@ + +/* Define if `struct text_info' is defined */ +#cmakedefine H5_HAVE_STRUCT_TEXT_INFO @H5_HAVE_STRUCT_TEXT_INFO@ + +/* Define if `struct timezone' is defined */ +#cmakedefine H5_HAVE_STRUCT_TIMEZONE @H5_HAVE_STRUCT_TIMEZONE@ + +/* Define to 1 if `struct tm' is a member of `tm_zone'. */ +#cmakedefine H5_HAVE_STRUCT_TM_TM_ZONE @H5_HAVE_STRUCT_TM_TM_ZONE@ + +/* Define if `struct videoconfig' is defined */ +#cmakedefine H5_HAVE_STRUCT_VIDEOCONFIG @H5_HAVE_STRUCT_VIDEOCONFIG@ + +/* Define to 1 if you have the `symlink' function. */ +#cmakedefine H5_HAVE_SYMLINK @H5_HAVE_SYMLINK@ + +/* Define to 1 if you have the `system' function. */ +#cmakedefine H5_HAVE_SYSTEM @H5_HAVE_SYSTEM@ + +/* Define to 1 if you have the <sys/fpu.h> header file. */ +#cmakedefine H5_HAVE_SYS_FPU_H @H5_HAVE_SYS_FPU_H@ + +/* Define to 1 if you have the <sys/ioctl.h> header file. */ +#cmakedefine H5_HAVE_SYS_IOCTL_H @H5_HAVE_SYS_IOCTL_H@ + +/* Define to 1 if you have the <sys/proc.h> header file. */ +#cmakedefine H5_HAVE_SYS_PROC_H @H5_HAVE_SYS_PROC_H@ + +/* Define to 1 if you have the <sys/resource.h> header file. */ +#cmakedefine H5_HAVE_SYS_RESOURCE_H @H5_HAVE_SYS_RESOURCE_H@ + +/* Define to 1 if you have the <sys/socket.h> header file. */ +#cmakedefine H5_HAVE_SYS_SOCKET_H @H5_HAVE_SYS_SOCKET_H@ + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#cmakedefine H5_HAVE_SYS_STAT_H @H5_HAVE_SYS_STAT_H@ + +/* Define to 1 if you have the <sys/sysinfo.h> header file. */ +#cmakedefine H5_HAVE_SYS_SYSINFO_H @H5_HAVE_SYS_SYSINFO_H@ + +/* Define to 1 if you have the <sys/timeb.h> header file. */ +#cmakedefine H5_HAVE_SYS_TIMEB_H @H5_HAVE_SYS_TIMEB_H@ + +/* Define to 1 if you have the <time.h> header file. */ +#cmakedefine H5_HAVE_TIME_H @H5_HAVE_TIME_H@ + +/* Define to 1 if you have the <sys/time.h> header file. */ +#cmakedefine H5_HAVE_SYS_TIME_H @H5_HAVE_SYS_TIME_H@ + +/* Define to 1 if you have the <sys/types.h> header file. */ +#cmakedefine H5_HAVE_SYS_TYPES_H @H5_HAVE_SYS_TYPES_H@ + +/* Define to 1 if you have the <szlib.h> header file. */ +#cmakedefine H5_HAVE_SZLIB_H @H5_HAVE_SZLIB_H@ + +/* Define if we have thread safe support */ +#cmakedefine H5_HAVE_THREADSAFE @H5_HAVE_THREADSAFE@ + +/* Define if `timezone' is a global variable */ +#cmakedefine H5_HAVE_TIMEZONE @H5_HAVE_TIMEZONE@ + +/* Define if the ioctl TIOCGETD is defined */ +#cmakedefine H5_HAVE_TIOCGETD @H5_HAVE_TIOCGETD@ + +/* Define if the ioctl TIOGWINSZ is defined */ +#cmakedefine H5_HAVE_TIOCGWINSZ @H5_HAVE_TIOCGWINSZ@ + +/* Define to 1 if you have the `tmpfile' function. */ +#cmakedefine H5_HAVE_TMPFILE @H5_HAVE_TMPFILE@ + +/* Define if `tm_gmtoff' is a member of `struct tm' */ +#cmakedefine H5_HAVE_TM_GMTOFF @H5_HAVE_TM_GMTOFF@ + +/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use + `HAVE_STRUCT_TM_TM_ZONE' instead. */ +#cmakedefine H5_HAVE_TM_ZONE @H5_HAVE_TM_ZONE@ + +/* Define to 1 if you don't have `tm_zone' but do have the external array + `tzname'. */ +#cmakedefine H5_HAVE_TZNAME @H5_HAVE_TZNAME@ + +/* Define to 1 if you have the <unistd.h> header file. */ +#cmakedefine H5_HAVE_UNISTD_H @H5_HAVE_UNISTD_H@ + +/* Define to 1 if you have the `vasprintf' function. */ +#cmakedefine H5_HAVE_VASPRINTF @H5_HAVE_VASPRINTF@ + +/* Define to 1 if you have the `vsnprintf' function. */ +#cmakedefine H5_HAVE_VSNPRINTF @H5_HAVE_VSNPRINTF@ + +/* Define to 1 if you have the `waitpid' function. */ +#cmakedefine H5_HAVE_WAITPID @H5_HAVE_WAITPID@ + +/* Define if your system has window style path name. */ +#cmakedefine H5_HAVE_WINDOW_PATH @H5_HAVE_WINDOW_PATH@ + +/* Define to 1 if you have the <winsock.h> header file. */ +#cmakedefine H5_HAVE_WINSOCK_H @H5_HAVE_WINSOCK_H@ + +/* Define to 1 if you have the <zlib.h> header file. */ +#cmakedefine H5_HAVE_ZLIB_H @H5_HAVE_ZLIB_H@ + +/* Define to 1 if you have the `_getvideoconfig' function. */ +#cmakedefine H5_HAVE__GETVIDEOCONFIG @H5_HAVE__GETVIDEOCONFIG@ + +/* Define to 1 if you have the `_scrsize' function. */ +#cmakedefine H5_HAVE__SCRSIZE @H5_HAVE__SCRSIZE@ + +/* Define if `__tm_gmtoff' is a member of `struct tm' */ +#cmakedefine H5_HAVE___TM_GMTOFF @H5_HAVE___TM_GMTOFF@ + +/* Define if your system can't handle converting floating-point values to long + long. */ +#cmakedefine H5_HW_FP_TO_LLONG_NOT_WORKS @H5_HW_FP_TO_LLONG_NOT_WORKS@ + +/* Define if HDF5's high-level library headers should be included in hdf5.h */ +#cmakedefine H5_INCLUDE_HL @H5_INCLUDE_HL@ + +/* Define if your system can accurately convert from integers to long double + values. */ +#cmakedefine H5_INTEGER_TO_LDOUBLE_ACCURATE @H5_INTEGER_TO_LDOUBLE_ACCURATE@ + +/* Define if your system can convert long double to integers accurately. */ +#cmakedefine H5_LDOUBLE_TO_INTEGER_ACCURATE @H5_LDOUBLE_TO_INTEGER_ACCURATE@ + +/* Define if your system can convert from long double to integer values. */ +#cmakedefine H5_LDOUBLE_TO_INTEGER_WORKS @H5_LDOUBLE_TO_INTEGER_WORKS@ + +/* Define if your system can convert long double to (unsigned) long long + values correctly. */ +#cmakedefine H5_LDOUBLE_TO_LLONG_ACCURATE @H5_LDOUBLE_TO_LLONG_ACCURATE@ + +/* Define if your system can convert long double to unsigned int values + correctly. */ +#cmakedefine H5_LDOUBLE_TO_UINT_ACCURATE @H5_LDOUBLE_TO_UINT_ACCURATE@ + +/* Define if your system can compile long long to floating-point casts. */ +#cmakedefine H5_LLONG_TO_FP_CAST_WORKS @H5_LLONG_TO_FP_CAST_WORKS@ + +/* Define if your system can convert (unsigned) long long to long double + values correctly. */ +#cmakedefine H5_LLONG_TO_LDOUBLE_CORRECT @H5_LLONG_TO_LDOUBLE_CORRECT@ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#cmakedefine H5_LT_OBJDIR @H5_LT_OBJDIR@ + +/* Define if the metadata trace file code is to be compiled in */ +#cmakedefine H5_METADATA_TRACE_FILE @H5_METADATA_TRACE_FILE@ + +/* Define if your system can handle complicated MPI derived datatype + correctly. */ +#cmakedefine H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS @H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS@ + +/* Define if your system's `MPI_File_set_size' function works for files over + 2GB. */ +#cmakedefine H5_MPI_FILE_SET_SIZE_BIG @H5_MPI_FILE_SET_SIZE_BIG@ + +/* Define if your system can handle special collective IO properly. */ +#cmakedefine H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS @H5_MPI_SPECIAL_COLLECTIVE_IO_WORKS@ + +/* Define if we can violate pointer alignment restrictions */ +#cmakedefine H5_NO_ALIGNMENT_RESTRICTIONS @H5_NO_ALIGNMENT_RESTRICTIONS@ + +/* Define if deprecated public API symbols are disabled */ +#cmakedefine H5_NO_DEPRECATED_SYMBOLS @H5_NO_DEPRECATED_SYMBOLS@ + +/* Define if shared writing must be disabled (CodeWarrior only) */ +#cmakedefine H5_NO_SHARED_WRITING @H5_NO_SHARED_WRITING@ + +/* Name of package */ +#define H5_PACKAGE "@HDF5_PACKAGE@" + +/* Define to the address where bug reports for this package should be sent. */ +#define H5_PACKAGE_BUGREPORT "@HDF5_PACKAGE_BUGREPORT@" + +/* Define to the full name of this package. */ +#define H5_PACKAGE_NAME "@HDF5_PACKAGE_NAME@" + +/* Define to the full name and version of this package. */ +#define H5_PACKAGE_STRING "@HDF5_PACKAGE_STRING@" + +/* Define to the one symbol short name of this package. */ +#define H5_PACKAGE_TARNAME "@HDF5_PACKAGE_TARNAME@" + +/* Define to the home page for this package. */ +#define H5_PACKAGE_URL "@HDF5_PACKAGE_URL@" + +/* Define to the version of this package. */ +#define H5_PACKAGE_VERSION "@HDF5_PACKAGE_VERSION@" + +/* Width for printf() for type `long long' or `__int64', use `ll' */ +#cmakedefine H5_PRINTF_LL_WIDTH @H5_PRINTF_LL_WIDTH@ + +/* The size of `char', as computed by sizeof. */ +#define H5_SIZEOF_CHAR @H5_SIZEOF_CHAR@ + +/* The size of `double', as computed by sizeof. */ +#define H5_SIZEOF_DOUBLE @H5_SIZEOF_DOUBLE@ + +/* The size of `float', as computed by sizeof. */ +#define H5_SIZEOF_FLOAT @H5_SIZEOF_FLOAT@ + +/* The size of `int', as computed by sizeof. */ +#define H5_SIZEOF_INT @H5_SIZEOF_INT@ + +/* The size of `int16_t', as computed by sizeof. */ +#define H5_SIZEOF_INT16_T @H5_SIZEOF_INT16_T@ + +/* The size of `int32_t', as computed by sizeof. */ +#define H5_SIZEOF_INT32_T @H5_SIZEOF_INT32_T@ + +/* The size of `int64_t', as computed by sizeof. */ +#define H5_SIZEOF_INT64_T @H5_SIZEOF_INT64_T@ + +/* The size of `int8_t', as computed by sizeof. */ +#define H5_SIZEOF_INT8_T @H5_SIZEOF_INT8_T@ + +/* The size of `int_fast16_t', as computed by sizeof. */ +#define H5_SIZEOF_INT_FAST16_T @H5_SIZEOF_INT_FAST16_T@ + +/* The size of `int_fast32_t', as computed by sizeof. */ +#define H5_SIZEOF_INT_FAST32_T @H5_SIZEOF_INT_FAST32_T@ + +/* The size of `int_fast64_t', as computed by sizeof. */ +#define H5_SIZEOF_INT_FAST64_T @H5_SIZEOF_INT_FAST64_T@ + +/* The size of `int_fast8_t', as computed by sizeof. */ +#define H5_SIZEOF_INT_FAST8_T @H5_SIZEOF_INT_FAST8_T@ + +/* The size of `int_least16_t', as computed by sizeof. */ +#define H5_SIZEOF_INT_LEAST16_T @H5_SIZEOF_INT_LEAST16_T@ + +/* The size of `int_least32_t', as computed by sizeof. */ +#define H5_SIZEOF_INT_LEAST32_T @H5_SIZEOF_INT_LEAST32_T@ + +/* The size of `int_least64_t', as computed by sizeof. */ +#define H5_SIZEOF_INT_LEAST64_T @H5_SIZEOF_INT_LEAST64_T@ + +/* The size of `int_least8_t', as computed by sizeof. */ +#define H5_SIZEOF_INT_LEAST8_T @H5_SIZEOF_INT_LEAST8_T@ + +#if !defined(__APPLE__) +/* The size of `size_t', as computed by sizeof. */ +#define H5_SIZEOF_SIZE_T @H5_SIZEOF_SIZE_T@ + +/* The size of `ssize_t', as computed by sizeof. */ +#define H5_SIZEOF_SSIZE_T @H5_SIZEOF_SSIZE_T@ + +/* The size of `long', as computed by sizeof. */ +#define H5_SIZEOF_LONG @H5_SIZEOF_LONG@ + +#else + # if defined(__LP64__) && __LP64__ + #define H5_SIZEOF_LONG 8 + #define H5_SIZEOF_SIZE_T 8 + #define H5_SIZEOF_SSIZE_T 8 + # else + #define H5_SIZEOF_LONG 4 + #define H5_SIZEOF_SIZE_T 4 + #define H5_SIZEOF_SSIZE_T 4 + # endif + +#endif + +/* The size of `long double', as computed by sizeof. */ +#define H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ + +/* Define size of long long and/or __int64 bit integer type only if the type + exists. */ +#if !defined(__APPLE__) + #define H5_SIZEOF_LONG_LONG @H5_SIZEOF_LONG_LONG@ +#else + #define H5_SIZEOF_LONG_LONG 8 +#endif + +/* The size of `off64_t', as computed by sizeof. */ +#define H5_SIZEOF_OFF64_T @H5_SIZEOF_OFF64_T@ + +/* The size of `off_t', as computed by sizeof. */ +#define H5_SIZEOF_OFF_T @H5_SIZEOF_OFF_T@ + +/* The size of `short', as computed by sizeof. */ +#define H5_SIZEOF_SHORT @H5_SIZEOF_SHORT@ + +/* The size of `uint16_t', as computed by sizeof. */ +#define H5_SIZEOF_UINT16_T @H5_SIZEOF_UINT16_T@ + +/* The size of `uint32_t', as computed by sizeof. */ +#define H5_SIZEOF_UINT32_T @H5_SIZEOF_UINT32_T@ + +/* The size of `uint64_t', as computed by sizeof. */ +#define H5_SIZEOF_UINT64_T @H5_SIZEOF_UINT64_T@ + +/* The size of `uint8_t', as computed by sizeof. */ +#define H5_SIZEOF_UINT8_T @H5_SIZEOF_UINT8_T@ + +/* The size of `uint_fast16_t', as computed by sizeof. */ +#define H5_SIZEOF_UINT_FAST16_T @H5_SIZEOF_UINT_FAST16_T@ + +/* The size of `uint_fast32_t', as computed by sizeof. */ +#define H5_SIZEOF_UINT_FAST32_T @H5_SIZEOF_UINT_FAST32_T@ + +/* The size of `uint_fast64_t', as computed by sizeof. */ +#define H5_SIZEOF_UINT_FAST64_T @H5_SIZEOF_UINT_FAST64_T@ + +/* The size of `uint_fast8_t', as computed by sizeof. */ +#define H5_SIZEOF_UINT_FAST8_T @H5_SIZEOF_UINT_FAST8_T@ + +/* The size of `uint_least16_t', as computed by sizeof. */ +#define H5_SIZEOF_UINT_LEAST16_T @H5_SIZEOF_UINT_LEAST16_T@ + +/* The size of `uint_least32_t', as computed by sizeof. */ +#define H5_SIZEOF_UINT_LEAST32_T @H5_SIZEOF_UINT_LEAST32_T@ + +/* The size of `uint_least64_t', as computed by sizeof. */ +#define H5_SIZEOF_UINT_LEAST64_T @H5_SIZEOF_UINT_LEAST64_T@ + +/* The size of `uint_least8_t', as computed by sizeof. */ +#define H5_SIZEOF_UINT_LEAST8_T @H5_SIZEOF_UINT_LEAST8_T@ + +/* The size of `unsigned', as computed by sizeof. */ +#define H5_SIZEOF_UNSIGNED @H5_SIZEOF_UNSIGNED@ + +/* The size of `__int64', as computed by sizeof. */ +#define H5_SIZEOF___INT64 @H5_SIZEOF___INT64@ + +/* Define to 1 if you have the ANSI C header files. */ +#cmakedefine H5_STDC_HEADERS @H5_STDC_HEADERS@ + +/* Define if strict file format checks are enabled */ +#cmakedefine H5_STRICT_FORMAT_CHECKS @H5_STRICT_FORMAT_CHECKS@ + +/* Define if your system supports pthread_attr_setscope(&attribute, + PTHREAD_SCOPE_SYSTEM) call. */ +#cmakedefine H5_SYSTEM_SCOPE_THREADS @H5_SYSTEM_SCOPE_THREADS@ + +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ +#cmakedefine H5_TIME_WITH_SYS_TIME @H5_TIME_WITH_SYS_TIME@ + +/* Define to 1 if your <sys/time.h> declares `struct tm'. */ +#cmakedefine H5_TM_IN_SYS_TIME @H5_TM_IN_SYS_TIME@ + +/* Define if your system can compile unsigned long long to floating-point + casts. */ +#cmakedefine H5_ULLONG_TO_FP_CAST_WORKS @H5_ULLONG_TO_FP_CAST_WORKS@ + +/* Define if your system can convert unsigned long long to long double with + correct precision. */ +#cmakedefine H5_ULLONG_TO_LDOUBLE_PRECISION @H5_ULLONG_TO_LDOUBLE_PRECISION@ + +/* Define if your system accurately converting unsigned long to float values. + */ +#cmakedefine H5_ULONG_TO_FLOAT_ACCURATE @H5_ULONG_TO_FLOAT_ACCURATE@ + +/* Define if your system can accurately convert unsigned (long) long values to + floating-point values. */ +#cmakedefine H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE @H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE@ + +/* Define using v1.6 public API symbols by default */ +#cmakedefine H5_USE_16_API_DEFAULT @H5_USE_16_API_DEFAULT@ + +/* Define if a memory checking tool will be used on the library, to cause + library to be very picky about memory operations and also disable the + internal free list manager code. */ +#cmakedefine H5_USING_MEMCHECKER @H5_USING_MEMCHECKER@ + +/* Version number of package */ +#define VERSION "@HDF5_PACKAGE_VERSION@" + +/* Define if vsnprintf() returns the correct value for formatted strings that + don't fit into size allowed */ +#cmakedefine H5_VSNPRINTF_WORKS @H5_VSNPRINTF_WORKS@ + +/* Data accuracy is prefered to speed during data conversions */ +#cmakedefine H5_WANT_DATA_ACCURACY @H5_WANT_DATA_ACCURACY@ + +/* Check exception handling functions during data conversions */ +#cmakedefine H5_WANT_DCONV_EXCEPTION @H5_WANT_DCONV_EXCEPTION@ + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if !defined(__APPLE__) +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#else +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#endif + +/* Define to empty if `const' does not conform to ANSI C. */ +#cmakedefine H5_const + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#cmakedefine H5_inline @H5_inline@ +#endif + +/* Define to `long int' if <sys/types.h> does not define. */ +#cmakedefine H5_off_t + +/* Define to `unsigned long' if <sys/types.h> does not define. */ +#cmakedefine H5_size_t + +/* Define to `long' if <sys/types.h> does not define. */ +#cmakedefine H5_ssize_t + +#if defined(__cplusplus) && defined(inline) +#undef inline +#endif + +#endif
\ No newline at end of file diff --git a/config/cmake/HDF5-config.cmake.build.in b/config/cmake/HDF5-config.cmake.build.in new file mode 100644 index 0000000..132e8be --- /dev/null +++ b/config/cmake/HDF5-config.cmake.build.in @@ -0,0 +1,42 @@ +#-----------------------------------------------------------------------------
+# HDF5 Config file for compiling against hdf5 build directory
+#-----------------------------------------------------------------------------
+
+SET (HDF5_INCLUDE_DIRS "@HDF5_INCLUDES_BUILD_TIME@")
+
+#-----------------------------------------------------------------------------
+# Don't include targets if this file is being picked up by another
+# project which has already build hdf5 as a subproject
+#-----------------------------------------------------------------------------
+IF (NOT TARGET "hdf5" AND NOT HDF5_INSTALL_SKIP_TARGETS)
+ GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+ INCLUDE (${SELF_DIR}/HDF5-targets.cmake)
+ENDIF (NOT TARGET "hdf5" AND NOT HDF5_INSTALL_SKIP_TARGETS)
+
+SET (HDF5_VERSION_STRING @HDF5_VERSION_STRING@)
+SET (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@)
+SET (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
+
+SET (HDF5_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@)
+SET (HDF5_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@)
+SET (HDF5_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@)
+SET (HDF5_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
+SET (HDF5_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
+
+#
+# To be continued ...
+#
+# XXX_INCLUDE_DIRS The final set of include directories listed in one variable for use by client code. This should not be a cache entry.
+# XXX_LIBRARIES The libraries to link against to use XXX. These should include full paths. This should not be a cache entry.
+# XXX_DEFINITIONS Definitions to use when compiling code that uses XXX. This really shouldn't include options such as (-DHAS_JPEG)that a client source-code file uses to decide whether to #include <jpeg.h>
+# XXX_EXECUTABLE Where to find the XXX tool.
+# XXX_YYY_EXECUTABLE Where to find the YYY tool that comes with XXX.
+# XXX_LIBRARY_DIRS Optionally, the final set of library directories listed in one variable for use by client code. This should not be a cache entry.
+# XXX_ROOT_DIR Where to find the base directory of XXX.
+# XXX_VERSION_YY Expect Version YY if true. Make sure at most one of these is ever true.
+# XXX_WRAP_YY If False, do not try to use the relevent CMake wrapping command.
+# XXX_YY_FOUND If False, optional YY part of XXX sytem is not available.
+# XXX_FOUND Set to false, or undefined, if we haven't found, or don't want to use XXX.
+# XXX_RUNTIME_LIBRARY_DIRS Optionally, the runtime library search path for use when running an executable linked to shared libraries.
+# The list should be used by user code to create the PATH on windows or LD_LIBRARY_PATH on unix.
+# This should not be a cache entry.
diff --git a/config/cmake/HDF5-config.cmake.install.in b/config/cmake/HDF5-config.cmake.install.in new file mode 100644 index 0000000..2c33edf --- /dev/null +++ b/config/cmake/HDF5-config.cmake.install.in @@ -0,0 +1,43 @@ +#-----------------------------------------------------------------------------
+# HDF5 Config file for compiling against hdf5 install directory
+#-----------------------------------------------------------------------------
+
+GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+GET_FILENAME_COMPONENT (HDF5_INCLUDE_DIRS "${SELF_DIR}/../include" ABSOLUTE)
+SET (HDF5_FORTRAN_DIR ${HDF5_INCLUDE_DIRS}/fortran)
+
+#-----------------------------------------------------------------------------
+# Don't include targets if this file is being picked up by another
+# project which has already build hdf5 as a subproject
+#-----------------------------------------------------------------------------
+IF (NOT TARGET "hdf5")
+ INCLUDE (${SELF_DIR}/HDF5-targets.cmake)
+ENDIF (NOT TARGET "hdf5")
+
+SET (HDF5_VERSION_STRING @HDF5_VERSION_STRING@)
+SET (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@)
+SET (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
+
+SET (HDF5_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@)
+SET (HDF5_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@)
+SET (HDF5_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@)
+SET (HDF5_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
+SET (HDF5_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
+
+#
+# To be continued ...
+#
+# XXX_INCLUDE_DIRS The final set of include directories listed in one variable for use by client code. This should not be a cache entry.
+# XXX_LIBRARIES The libraries to link against to use XXX. These should include full paths. This should not be a cache entry.
+# XXX_DEFINITIONS Definitions to use when compiling code that uses XXX. This really shouldn't include options such as (-DHAS_JPEG)that a client source-code file uses to decide whether to #include <jpeg.h>
+# XXX_EXECUTABLE Where to find the XXX tool.
+# XXX_YYY_EXECUTABLE Where to find the YYY tool that comes with XXX.
+# XXX_LIBRARY_DIRS Optionally, the final set of library directories listed in one variable for use by client code. This should not be a cache entry.
+# XXX_ROOT_DIR Where to find the base directory of XXX.
+# XXX_VERSION_YY Expect Version YY if true. Make sure at most one of these is ever true.
+# XXX_WRAP_YY If False, do not try to use the relevent CMake wrapping command.
+# XXX_YY_FOUND If False, optional YY part of XXX sytem is not available.
+# XXX_FOUND Set to false, or undefined, if we haven't found, or don't want to use XXX.
+# XXX_RUNTIME_LIBRARY_DIRS Optionally, the runtime library search path for use when running an executable linked to shared libraries.
+# The list should be used by user code to create the PATH on windows or LD_LIBRARY_PATH on unix.
+# This should not be a cache entry.
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake new file mode 100644 index 0000000..8b30fbf --- /dev/null +++ b/config/cmake/HDF5Macros.cmake @@ -0,0 +1,122 @@ +#------------------------------------------------------------------------------- +MACRO (SET_GLOBAL_VARIABLE name value) + SET (${name} ${value} CACHE INTERNAL "Used to pass variables between directories" FORCE) +ENDMACRO (SET_GLOBAL_VARIABLE) + +#------------------------------------------------------------------------------- +MACRO (IDE_GENERATED_PROPERTIES SOURCE_PATH HEADERS SOURCES) + #set(source_group_path "Source/AIM/${NAME}") + STRING (REPLACE "/" "\\\\" source_group_path ${SOURCE_PATH}) + source_group(${source_group_path} FILES ${HEADERS} ${SOURCES}) + + #-- The following is needed if we ever start to use OS X Frameworks but only + #-- works on CMake 2.6 and greater + #SET_PROPERTY (SOURCE ${HEADERS} + # PROPERTY MACOSX_PACKAGE_LOCATION Headers/${NAME} + #) +ENDMACRO (IDE_GENERATED_PROPERTIES) + +#------------------------------------------------------------------------------- +MACRO (IDE_SOURCE_PROPERTIES SOURCE_PATH HEADERS SOURCES) + # INSTALL (FILES ${HEADERS} + # DESTINATION include/R3D/${NAME} + # COMPONENT Headers + # ) + + STRING (REPLACE "/" "\\\\" source_group_path ${SOURCE_PATH} ) + source_group (${source_group_path} FILES ${HEADERS} ${SOURCES}) + + #-- The following is needed if we ever start to use OS X Frameworks but only + #-- works on CMake 2.6 and greater + #SET_PROPERTY (SOURCE ${HEADERS} + # PROPERTY MACOSX_PACKAGE_LOCATION Headers/${NAME} + #) +ENDMACRO (IDE_SOURCE_PROPERTIES) + +#------------------------------------------------------------------------------- +MACRO (H5_NAMING target) + IF (WIN32 AND NOT MINGW) + IF (BUILD_SHARED_LIBS) + IF (H5_LEGACY_NAMING) + SET_TARGET_PROPERTIES (${target} PROPERTIES OUTPUT_NAME "dll") + SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX "${target}") + ELSE (H5_LEGACY_NAMING) + SET_TARGET_PROPERTIES (${target} PROPERTIES OUTPUT_NAME "${target}dll") + ENDIF (H5_LEGACY_NAMING) + ENDIF (BUILD_SHARED_LIBS) + ENDIF (WIN32 AND NOT MINGW) +ENDMACRO (H5_NAMING) + +#------------------------------------------------------------------------------- +MACRO (H5_SET_LIB_OPTIONS libtarget libname libtype) + # message (STATUS "${libname} libtype: ${libtype}") + IF (${libtype} MATCHES "SHARED") + IF (WIN32 AND NOT MINGW) + IF (H5_LEGACY_NAMING) + SET (LIB_RELEASE_NAME "${libname}dll") + SET (LIB_DEBUG_NAME "${libname}ddll") + ELSE (H5_LEGACY_NAMING) + SET (LIB_RELEASE_NAME "${libname}") + SET (LIB_DEBUG_NAME "${libname}_D") + ENDIF (H5_LEGACY_NAMING) + ELSE (WIN32 AND NOT MINGW) + SET (LIB_RELEASE_NAME "${libname}") + SET (LIB_DEBUG_NAME "${libname}_debug") + ENDIF (WIN32 AND NOT MINGW) + ELSE (${libtype} MATCHES "SHARED") + IF (WIN32 AND NOT MINGW) + IF (H5_LEGACY_NAMING) + SET (LIB_RELEASE_NAME "${libname}") + SET (LIB_DEBUG_NAME "${libname}d") + ELSE (H5_LEGACY_NAMING) + SET (LIB_RELEASE_NAME "lib${libname}") + SET (LIB_DEBUG_NAME "lib${libname}_D") + ENDIF (H5_LEGACY_NAMING) + ELSE (WIN32 AND NOT MINGW) + SET (LIB_RELEASE_NAME "lib${libname}") + SET (LIB_DEBUG_NAME "lib${libname}_debug") + ENDIF (WIN32 AND NOT MINGW) + ENDIF (${libtype} MATCHES "SHARED") + + SET_TARGET_PROPERTIES (${libtarget} + PROPERTIES + DEBUG_OUTPUT_NAME ${LIB_DEBUG_NAME} + RELEASE_OUTPUT_NAME ${LIB_RELEASE_NAME} + MINSIZEREL_OUTPUT_NAME ${LIB_RELEASE_NAME} + RELWITHDEBINFO_OUTPUT_NAME ${LIB_RELEASE_NAME} + ) + + #----- Use MSVC Naming conventions for Shared Libraries + IF (MINGW AND BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES (${libtarget} + PROPERTIES + IMPORT_SUFFIX ".lib" + IMPORT_PREFIX "" + PREFIX "" + ) + ENDIF (MINGW AND BUILD_SHARED_LIBS) + + IF (BUILD_SHARED_LIBS) + IF (WIN32) + SET (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION_MAJOR}) + ELSE (WIN32) + SET (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION}) + ENDIF (WIN32) + SET_TARGET_PROPERTIES (${libtarget} PROPERTIES VERSION ${LIBHDF_VERSION}) + SET_TARGET_PROPERTIES (${libtarget} PROPERTIES SOVERSION ${LIBHDF_VERSION}) + ENDIF (BUILD_SHARED_LIBS) + + #-- Apple Specific install_name for libraries + IF (APPLE) + OPTION (HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF) + IF (HDF5_BUILD_WITH_INSTALL_NAME) + SET_TARGET_PROPERTIES(${libtarget} PROPERTIES + LINK_FLAGS "-current_version ${HDF5_PACKAGE_VERSION} -compatibility_version ${HDF5_PACKAGE_VERSION}" + INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" + BUILD_WITH_INSTALL_RPATH ${HDF5_BUILD_WITH_INSTALL_NAME} + ) + ENDIF (HDF5_BUILD_WITH_INSTALL_NAME) + ENDIF (APPLE) + +ENDMACRO (H5_SET_LIB_OPTIONS) + diff --git a/config/cmake/HDF5Tests.c b/config/cmake/HDF5Tests.c new file mode 100644 index 0000000..35e7258 --- /dev/null +++ b/config/cmake/HDF5Tests.c @@ -0,0 +1,366 @@ +#define SIMPLE_TEST(x) int main(){ x; return 0; } + +#ifdef CXX_HAVE_OFFSETOF + #include <stdio.h> +#include <stddef.h> + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus +extern "C" +# endif +int FC_DUMMY_MAIN() +{ return 1;} +#endif +#endif +int +main () +{ + + struct index_st + { + unsigned char type; + unsigned char num; + unsigned int len; + }; + typedef struct index_st index_t; + int x,y; + x = offsetof(struct index_st, len); + y = offsetof(index_t, num) + + ; + return 0; +} +#endif + +#ifdef HAVE_C99_DESIGNATED_INITIALIZER + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus +extern "C" +# endif +int FC_DUMMY_MAIN() +{ return 1;} +#endif +#endif +int +main () +{ + + typedef struct + { + int x; + union + { + int i; + double d; + }u; + }di_struct_t; + di_struct_t x = + { 0, + { .d = 0.0}}; + ; + return 0; +} + +#endif + +#ifdef HAVE_C99_FUNC + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ + const char *fname = __func__; + ; + return 0; +} + +#endif + +#ifdef VSNPRINTF_WORKS +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> + +int test_vsnprintf(const char *fmt,...) +{ + va_list ap; + char *s = malloc(16); + int ret; + + va_start(ap, fmt); + ret=vsnprintf(s,16,"%s",ap); + va_end(ap); + + return(ret!=42 ? 1 : 0); +} + +int main(void) +{ + exit(test_vsnprintf("%s","A string that is longer than 16 characters")); +} +#endif + + +#ifdef TIME_WITH_SYS_TIME +/* Time with sys/time test */ + +#include <sys/types.h> +#include <sys/time.h> +#include <time.h> + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} + +#endif + +#ifdef STDC_HEADERS +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> +int main() { return 0; } +#endif /* STDC_HEADERS */ + +#ifdef HAVE_TM_ZONE + +#include <sys/types.h> +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +#include <time.h> +SIMPLE_TEST(struct tm tm; tm.tm_zone); + +#endif /* HAVE_TM_ZONE */ + +#ifdef HAVE_STRUCT_TM_TM_ZONE + +#include <sys/types.h> +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +#include <time.h> +SIMPLE_TEST(struct tm tm; tm.tm_zone); + +#endif /* HAVE_STRUCT_TM_TM_ZONE */ + +#ifdef HAVE_ATTRIBUTE + +#if 0 +static void test int __attribute((unused)) var) +{ + int __attribute__((unused)) x = var; +} + +int main(void) +{ + test(19); +} + +#else +int +main () +{ +int __attribute__((unused)) x + ; + return 0; +} +#endif + + +#endif /* HAVE_ATTRIBUTE */ + +#ifdef HAVE_FUNCTION + +#ifdef FC_DUMMY_MAIN +#ifndef FC_DUMMY_MAIN_EQ_F77 +# ifdef __cplusplus + extern "C" +# endif + int FC_DUMMY_MAIN() { return 1; } +#endif +#endif +int +main () +{ +(void)__FUNCTION__ + ; + return 0; +} + +#endif /* HAVE_FUNCTION */ + +#ifdef HAVE_TM_GMTOFF + +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +#include <time.h> +SIMPLE_TEST(struct tm tm; tm.tm_gmtoff=0); + +#endif /* HAVE_TM_GMTOFF */ + +#ifdef HAVE_TIMEZONE + +#include <sys/time.h> +#include <time.h> +SIMPLE_TEST(timezone=0); + +#endif /* HAVE_TIMEZONE */ + +#ifdef HAVE_STRUCT_TIMEZONE + +#include <sys/types.h> +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +#include <time.h> +SIMPLE_TEST(struct timezone tz; tz.tz_minuteswest=0); + +#endif /* HAVE_STRUCT_TIMEZONE */ + +#ifdef HAVE_STAT_ST_BLOCKS + +#include <sys/stat.h> +SIMPLE_TEST(struct stat sb; sb.st_blocks=0); + +#endif /* HAVE_STAT_ST_BLOCKS */ + +#ifdef PRINTF_LL_WIDTH + +#ifdef HAVE_LONG_LONG +# define LL_TYPE long long +#else /* HAVE_LONG_LONG */ +# define LL_TYPE __int64 +#endif /* HAVE_LONG_LONG */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +int main(void) +{ + char *llwidthArgs[] = { "l64", "l", "L", "q", "ll", NULL }; + char *s = malloc(128); + char **currentArg = NULL; + LL_TYPE x = (LL_TYPE)1048576 * (LL_TYPE)1048576; + for (currentArg = llwidthArgs; *currentArg != NULL; currentArg++) + { + char formatString[64]; + sprintf(formatString, "%%%sd", *currentArg); + sprintf(s, formatString, x); + if (strcmp(s, "1099511627776") == 0) + { + printf("PRINTF_LL_WIDTH=[%s]\n", *currentArg); + exit(0); + } + } + exit(1); +} + +#endif /* PRINTF_LL_WIDTH */ + +#ifdef SYSTEM_SCOPE_THREADS +#include <stdlib.h> +#include <pthread.h> + +int main(void) +{ + pthread_attr_t attribute; + int ret; + + pthread_attr_init(&attribute); + ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); + exit(ret==0 ? 0 : 1); +} + +#endif /* SYSTEM_SCOPE_THREADS */ + +#ifdef HAVE_SOCKLEN_T + +#include <stdio.h> +#include <stdlib.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif + +SIMPLE_TEST(socklen_t foo); + +#endif /* HAVE_SOCKLEN_T */ + +#ifdef DEV_T_IS_SCALAR + +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif + +int main () +{ + dev_t d1, d2; + if(d1==d2) + return 0; + return 1; +} + +#endif /* DEV_T_IS_SCALAR */ + +#if defined( INLINE_TEST_inline ) || defined( INLINE_TEST___inline__ ) || defined( INLINE_TEST___inline ) +#ifndef __cplusplus +typedef int foo_t; +static INLINE_TEST_INLINE foo_t static_foo () { return 0; } +INLINE_TEST_INLINE foo_t foo () {return 0; } +int main() { return 0; } +#endif + +#endif /* INLINE_TEST */ + +#ifdef HAVE_OFF64_T +#include <sys/types.h> +int main() +{ + off64_t n = 0; + return (int)n; +} +#endif + + +#ifdef GETTIMEOFDAY_GIVES_TZ +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +#include <time.h> +int main(void) +{ + struct timeval tv; + struct timezone tz; + tz.tz_minuteswest = 7777; /* Initialize to an unreasonable number */ + tz.tz_dsttime = 7; + gettimeofday(&tv, &tz); + /* Check whether the function returned any value at all */ + if(tz.tz_minuteswest == 7777 && tz.tz_dsttime == 7) + exit(1); + else exit (0); +} +#endif + diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake new file mode 100755 index 0000000..7ca38e1 --- /dev/null +++ b/config/cmake/cacheinit.cmake @@ -0,0 +1,35 @@ +# This is the CMakeCache file.
+
+########################
+# EXTERNAL cache entries
+########################
+
+SET (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE)
+
+SET (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
+
+SET (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
+
+SET (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
+
+SET (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
+
+SET (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
+
+SET (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
+
+SET (HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE BOOL "Disable compiler warnings" FORCE)
+
+SET (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
+
+SET (HDF5_ENABLE_PARALLEL OFF CACHE BOOL "Enable parallel build (requires MPI)" FORCE)
+
+SET (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
+
+SET (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
+
+SET (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
+
+SET (HDF5_USE_H5DUMP_PACKED_BITS OFF CACHE BOOL "Use the PACKED BITS feature in h5dump" FORCE)
+
+SET (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE)
diff --git a/config/cmake/hdf5_zlib.h.in b/config/cmake/hdf5_zlib.h.in new file mode 100644 index 0000000..104db27 --- /dev/null +++ b/config/cmake/hdf5_zlib.h.in @@ -0,0 +1 @@ +#include <@H5_ZLIB_HEADER@> diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in new file mode 100644 index 0000000..a3032e5 --- /dev/null +++ b/config/cmake/libhdf5.settings.cmake.in @@ -0,0 +1,68 @@ + SUMMARY OF THE HDF5 CONFIGURATION + ================================= + +General Information: +------------------- + HDF5 Version: @H5_VERSION@ + Configured on: @CONFIG_DATE@ + Configured by: @CONFIG_USER@ + Configure mode: @CONFIG_MODE@ + Host system: @host_cpu@-@host_vendor@-@host_os@ + Uname information: @UNAME_INFO@ + Byte sex: @BYTESEX@ + Libraries: @STATIC_SHARED@ + Installation point: @prefix@ + +Compiling Options: +------------------ + Compilation Mode: @CONFIG_MODE@ + C Compiler: @CC_VERSION@ + CFLAGS: @CFLAGS@ + H5_CFLAGS: @H5_CFLAGS@ + AM_CFLAGS: @AM_CFLAGS@ + CPPFLAGS: @CPPFLAGS@ + H5_CPPFLAGS: @H5_CPPFLAGS@ + AM_CPPFLAGS: @AM_CPPFLAGS@ + Shared Libraries: @enable_shared@ + Static Libraries: @enable_static@ + Statically Linked Executables: @STATIC_EXEC@ + LDFLAGS: @LDFLAGS@ + AM_LDFLAGS: @AM_LDFLAGS@ + Extra libraries: @LIBS@ + Archiver: @AR@ + Ranlib: @RANLIB@ + Debugged Packages: @DEBUG_PKG@ + API Tracing: @TRACE_API@ + +Languages: +---------- + Fortran: @HDF_FORTRAN@ +@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Compiler: @FC@ +@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Flags: @FCFLAGS@ +@BUILD_FORTRAN_CONDITIONAL_TRUE@ H5 Fortran Flags: @H5_FCFLAGS@ +@BUILD_FORTRAN_CONDITIONAL_TRUE@ AM Fortran Flags: @AM_FCFLAGS@ + C++: @HDF_CXX@ +@BUILD_CXX_CONDITIONAL_TRUE@ C++ Compiler: @CXX@ +@BUILD_CXX_CONDITIONAL_TRUE@ C++ Flags: @CXXFLAGS@ +@BUILD_CXX_CONDITIONAL_TRUE@ H5 C++ Flags: @H5_CXXFLAGS@ +@BUILD_CXX_CONDITIONAL_TRUE@ AM C++ Flags: @AM_CXXFLAGS@ + +Features: +--------- + Parallel HDF5: @PARALLEL@ + High Level library: @HDF5_HL@ + Threadsafety: @THREADSAFE@ + Default API Mapping: @DEFAULT_API_VERSION@ + With Deprecated Public Symbols: @DEPRECATED_SYMBOLS@ + I/O filters (external): @EXTERNAL_FILTERS@ + I/O filters (internal): @FILTERS@ + MPE: @MPE@ + Direct VFD: @DIRECT_VFD@ + dmalloc: @HAVE_DMALLOC@ +Clear file buffers before write: @CLEARFILEBUF@ + Using memory checker: @USINGMEMCHECKER@ + Function Stack Tracing: @CODESTACK@ + GPFS: @GPFS@ + Strict File Format Checks: @STRICT_FORMAT_CHECKS@ + Optimization Instrumentation: @INSTRUMENT@ + Linux Large File Support (LFS): @LINUX_LFS@ diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake new file mode 100644 index 0000000..4218671 --- /dev/null +++ b/config/cmake/runTest.cmake @@ -0,0 +1,82 @@ +# runTest.cmake executes a command and captures the output in a file. File is then compared +# against a reference file. 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_FOLDER) + MESSAGE ( FATAL_ERROR "Require TEST_FOLDER to be defined") +ENDIF (NOT TEST_FOLDER) +IF (NOT TEST_OUTPUT) + MESSAGE (FATAL_ERROR "Require TEST_OUTPUT to be defined") +ENDIF (NOT TEST_OUTPUT) +#IF (NOT TEST_EXPECT) +# MESSAGE (STATUS "Require TEST_EXPECT to be defined") +#ENDIF (NOT TEST_EXPECT) +IF (NOT TEST_REFERENCE) + MESSAGE (FATAL_ERROR "Require TEST_REFERENCE to be defined") +ENDIF (NOT TEST_REFERENCE) + +SET (ERROR_APPEND 1) + +MESSAGE (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}") + +# run the test program, capture the stdout/stderr and the result var +EXECUTE_PROCESS ( + COMMAND ${TEST_PROGRAM} ${TEST_ARGS} + WORKING_DIRECTORY ${TEST_FOLDER} + RESULT_VARIABLE TEST_RESULT + OUTPUT_FILE ${TEST_OUTPUT} + ERROR_FILE ${TEST_OUTPUT}.err + OUTPUT_VARIABLE TEST_ERROR + ERROR_VARIABLE TEST_ERROR +) + +MESSAGE (STATUS "COMMAND Result: ${TEST_RESULT}") + +IF (ERROR_APPEND) + FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) + FILE (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") +ENDIF (ERROR_APPEND) + +IF (TEST_APPEND) + FILE (APPEND ${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n") +ENDIF (TEST_APPEND) + +# if the return value is !=0 bail out +IF (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT}) + MESSAGE ( FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != 0.\n${TEST_ERROR}") +ENDIF (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT}) + +MESSAGE (STATUS "COMMAND Error: ${TEST_ERROR}") + +IF (TEST_MASK) + FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + #STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}") + STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage: <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}") + FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") +ENDIF (TEST_MASK) + +IF (WIN32 AND NOT MINGW) + FILE (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) + FILE (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}") +ENDIF (WIN32 AND NOT MINGW) + +# now compare the output with the reference +EXECUTE_PROCESS ( + COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_OUTPUT} ${TEST_REFERENCE} + RESULT_VARIABLE TEST_RESULT +) + +# again, if return value is !=0 scream and shout +IF (TEST_RESULT) + MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not match ${TEST_REFERENCE}") +ENDIF (TEST_RESULT) + +# everything went fine... +MESSAGE ("Passed: The output of ${TEST_PROGRAM} matches ${TEST_REFERENCE}") + diff --git a/config/cmake/xlatefile.c b/config/cmake/xlatefile.c new file mode 100644 index 0000000..c16f573 --- /dev/null +++ b/config/cmake/xlatefile.c @@ -0,0 +1,56 @@ +#include <stdio.h> +#include <string.h> +#include <stdlib.h> + +#define BUFFERSIZE 1024 + +int main(int argc, char *argv[]) { + FILE *infile = NULL; + FILE *outfile = NULL; + char *buffer = NULL; + char argbuf[8]; + unsigned int bytes = 0; + unsigned int idx = 0; + unsigned int lineidx = 0; + unsigned int stripXlines = 3; + + if(argc < 3) + exit(1); + if(NULL == (infile = fopen(argv[1], "rb"))) + exit(2); + if(NULL == (outfile = fopen(argv[2], "wb+"))) + exit(3); + if(argc > 3) + if(argv[3][0] == '-') + if(argv[3][1] == 'l') { + strcpy(argbuf, &argv[3][2]); + stripXlines = atoi(argbuf); + } + buffer = (char*)malloc(BUFFERSIZE); + if(buffer) { + while(!feof(infile)) { + /* read the file into the buffer. */ + bytes = fread(buffer, 1, BUFFERSIZE, infile); + if(lineidx < stripXlines) { + for(idx = 0; idx < bytes; idx++) { + if(buffer[idx] == '\n') { + lineidx++; + if(buffer[idx+1] == '\r') + idx++; + } + if(lineidx >= stripXlines) { + fwrite(&buffer[idx+1], 1, bytes-idx-1, outfile); + idx = bytes; + } + } + } + else + fwrite(buffer, 1, bytes, outfile); + } + free(buffer); + } + fclose(outfile); + fclose(infile); + + return 0; +} diff --git a/config/examples.am b/config/examples.am index 28bd447..30ea717 100644 --- a/config/examples.am +++ b/config/examples.am @@ -30,6 +30,8 @@ ## ## INSTALL_FILES ## The source files that the examples use which should be installed. +## INSTALL_SCRIPT_FILES +## INSTALL_TOP_SCRIPT_FILES ## ## EXAMPLEDIR ## The directory into which examples should be installed. @@ -52,6 +54,8 @@ CLEANFILES=$(TEST_PROG) $(TEST_PROG_PARA) # How to create EXAMPLEDIR if it doesn't already exist $(EXAMPLEDIR): -$(top_srcdir)/bin/mkdirs $@ +$(EXAMPLETOPDIR): + -$(top_srcdir)/bin/mkdirs $@ # Install and uninstall rules. We install the source files, not the # example programs themselves. @@ -66,10 +70,26 @@ install-examples: $(EXAMPLEDIR) $(INSTALL_FILES) (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1);\ fi; \ done + @for f in X $(INSTALL_SCRIPT_FILES); do \ + if test $$f != X; then \ + (set -x; $(INSTALL) $$f $(EXAMPLEDIR)/. || exit 1);\ + fi; \ + done + @for f in X $(INSTALL_TOP_SCRIPT_FILES); do \ + if test $$f != X; then \ + (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLETOPDIR)/. || exit 1); \ + fi; \ + done uninstall-examples: - @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ - set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \ + @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \ + set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \ + fi + @if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \ + set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \ + fi + @if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \ + set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \ fi installcheck-local: diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1 index 667f04e..26a0c3a 100644 --- a/config/linux-gnulibc1 +++ b/config/linux-gnulibc1 @@ -35,6 +35,7 @@ fi # Figure out Intel C compiler flags . $srcdir/config/intel-flags +echo "CC_BASENAME is $CC_BASENAME." # Use default Fortran 90 compiler according to what C compiler is used. if test "X-" = "X-$FC"; then case $CC_BASENAME in @@ -61,7 +62,7 @@ else ifc*|ifort*|pgf90*) ;; - *) + *f95*) # Figure out which compiler we are using: pgf90 or Absoft f95 RM='rm -f' tmpfile=/tmp/cmpver.$$ @@ -75,6 +76,10 @@ else fi fi $RM $tmpfile + fc_version_info=`$FC -V | grep Absoft` + ;; + + *) ;; esac fi @@ -131,3 +136,86 @@ fi hdf5_cv_mpi_special_collective_io_works=${hdf5_cv_mpi_special_collective_io_works='no'} hdf5_cv_mpi_complex_derived_datatype_works=${hdf5_cv_mpi_complex_derived_datatype_works='no'} +# compiler version strings +case $CC in + # whatever matches *pgcc* will also match *gcc*, so this one must come first + *pgcc*) + cc_version_info=`$CC $CFLAGS $H5_CFLAGS -V 2>&1 | grep 'pgcc'` + ;; + + *gcc*) + cc_version_info=`$CC $CFLAGS $H5_CFLAGS --version 2>&1 | grep -v 'PathScale' |\ + grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'` + ;; + + *icc*) + cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -V 2>&1 | grep 'Version' |\ + sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` + ;; + + *) + echo "No match to get cc_version_info for $CC" + ;; +esac + +# get fortran version info +case $FC in + *gfortran*) + fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS --version 2>&1 |\ + grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'` + ;; + + *ifc*|*ifort*) + fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Version' |\ + sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` + ;; + + *f95*) + # Figure out which compiler we are using: pgf90 or Absoft f95 + RM='rm -f' + tmpfile=/tmp/cmpver.$$ + $FC -V >$tmpfile + if test -s "$tmpfile"; then + if( grep -s 'Absoft' $tmpfile > /dev/null) then + FC_BASENAME=f95 + fi + fi + $RM $tmpfile + fc_version_info=`$FC -V | grep Absoft` + ;; + + *g95*) + fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS --version 2>&1 |\ + grep 'GCC'` + ;; + + *pgf90*) + fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'pgf90'` + ;; + + *) + echo "No match to get fc_version_info for $FC" + ;; +esac + + +# get c++ version info +case $CXX in + *g++*) + cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\ + grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'` + ;; + *icpc*) + cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Version' |\ + sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'` + ;; + *pgCC*) + cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'pgCC'` + ;; + + + *) + echo "No match to get cxx_version_info for $CXX" + ;; +esac + diff --git a/config/lt_vers.am b/config/lt_vers.am index 71fa126..19b3066 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 = 63 +LT_VERS_REVISION = 65 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/config/solaris2.x b/config/solaris2.x index 5ef6415..cea71bd 100644 --- a/config/solaris2.x +++ b/config/solaris2.x @@ -111,3 +111,43 @@ if test -z "$cxx_flags_set"; then PROFILE_CPPFLAGS= cxx_flags_set=yes fi + +# compiler version strings +case $CC in + *cc*) + cc_version_info=`$CC $CFLAGS $H5_CFLAGS -V 2>&1 | grep 'Sun' |\ + sed 's/.*\(Sun.*\)/\1 /'` + ;; + + *) + echo "No match to get cc_version_info for $CC" + ;; +esac +echo "C compiler '$CC' is $cc_version_info" + +case $FC in + # The PGI and Intel compilers are automatically detected below + *f90*) + fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Sun' |\ + sed 's/.*\(Sun.*\)/\1 /'` + ;; + + *) + echo "No match to get fc_version_info for $FC" + ;; +esac +echo "Fortran compiler '$FC' is $fc_version_info" + +# get c++ version info +case $CXX in + *CC*) + cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Sun' |\ + sed 's/.*\(Sun.*\)/\1 /'` + ;; + + *) + echo "No match to get cxx_version_info for $CXX" + ;; +esac + + |