From e5759186e8d28b1acf4e38f4181667200ecead00 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 27 Feb 2014 14:16:04 -0500 Subject: [svn-r24746] Merge trunk revision 24744 from cmake branch includes; HDFFV-8505: UD filter changes to remove filters in h5repack. Tested: local linux --- CMakeInstallation.cmake | 93 ++++++- CMakeLists.txt | 39 +-- MANIFEST | 10 +- config/cmake/H5pubconf.h.in | 4 +- config/cmake/HDF518_Examples.cmake.in | 2 +- config/cmake/PkgInfo.in | 1 + config/cmake/README.txt.cmake.in | 53 ++++ config/cmake/hdf.bmp | Bin 0 -> 1254 bytes config/cmake/hdf.gif | Bin 1016 -> 0 bytes config/cmake/hdf.icns | Bin 0 -> 2632 bytes config/cmake/hdf.ico | Bin 0 -> 23558 bytes config/cmake/libhdf5.settings.cmake.in | 2 +- config/cmake/version.plist.in | 17 ++ src/H5Z.c | 8 +- tools/h5repack/CMakeTests.cmake | 4 + tools/h5repack/h5repack_plugin.sh.in | 7 + tools/h5repack/testfiles/h5repack_layout.UD.h5 | Bin 0 -> 43744 bytes .../h5repack_layout.UD.h5-plugin_none.ddl | 130 ++++++++++ .../plugin_none.h5repack_layout.UD.h5.tst | 14 + tools/lib/h5tools_filters.c | 286 +++++++++++---------- 20 files changed, 497 insertions(+), 173 deletions(-) create mode 100644 config/cmake/PkgInfo.in create mode 100644 config/cmake/README.txt.cmake.in create mode 100644 config/cmake/hdf.bmp delete mode 100644 config/cmake/hdf.gif create mode 100755 config/cmake/hdf.icns create mode 100644 config/cmake/hdf.ico create mode 100644 config/cmake/version.plist.in create mode 100644 tools/h5repack/testfiles/h5repack_layout.UD.h5 create mode 100644 tools/h5repack/testfiles/h5repack_layout.UD.h5-plugin_none.ddl create mode 100644 tools/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index 20891de..1d74786 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -137,6 +137,54 @@ IF (HDF5_PACK_EXAMPLES) ENDIF (HDF5_PACK_EXAMPLES) #----------------------------------------------------------------------------- +# Configure the README.txt file for the binary package +#----------------------------------------------------------------------------- +SET (BINARY_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}) +SET (BINARY_PLATFORM "${CMAKE_SYSTEM_NAME}") +IF (WIN32) + SET (BINARY_EXAMPLE_ENDING "zip") + SET (BINARY_INSTALL_ENDING "exe") + IF (CMAKE_CL_64) + SET (BINARY_SYSTEM_NAME "win64") + ELSE (CMAKE_CL_64) + SET (BINARY_SYSTEM_NAME "win32") + ENDIF (CMAKE_CL_64) + IF (${CMAKE_SYSTEM_VERSION} MATCHES "6.1") + SET (BINARY_PLATFORM "${BINARY_PLATFORM} 7") + ELSEIF (${CMAKE_SYSTEM_VERSION} MATCHES "6.2") + SET (BINARY_PLATFORM "${BINARY_PLATFORM} 8") + ENDIF (${CMAKE_SYSTEM_VERSION} MATCHES "6.1") + SET (BINARY_PLATFORM "${BINARY_PLATFORM} ${MSVC_C_ARCHITECTURE_ID}") + IF (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*") + SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2010") + ELSEIF (${CMAKE_C_COMPILER_VERSION} MATCHES "15.*") + SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2008") + ELSEIF (${CMAKE_C_COMPILER_VERSION} MATCHES "17.*") + SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2012") + ELSE (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*") + SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}") + ENDIF (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*") +ELSEIF (APPLE) + SET (BINARY_EXAMPLE_ENDING "tar.gz") + SET (BINARY_INSTALL_ENDING "dmg") + SET (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}") + SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}") +ELSE (WIN32) + SET (BINARY_EXAMPLE_ENDING "tar.gz") + SET (BINARY_INSTALL_ENDING "sh") + SET (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}") + SET (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}") +ENDIF (WIN32) +IF (HDF4_BUILD_FORTRAN) + SET (BINARY_PLATFORM "${BINARY_PLATFORM} / ${CMAKE_Fortran_COMPILER_ID} Fortran") +ENDIF (HDF4_BUILD_FORTRAN) + +CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/README.txt.cmake.in + ${HDF5_BINARY_DIR}/README.txt @ONLY +) + +#----------------------------------------------------------------------------- # Add Document File(s) to CMake Install #----------------------------------------------------------------------------- IF (NOT HDF5_EXTERNALLY_CONFIGURED) @@ -199,17 +247,22 @@ ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED) IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) SET (CPACK_PACKAGE_VENDOR "HDF_Group") SET (CPACK_PACKAGE_NAME "${HDF5_PACKAGE_NAME}") - SET (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}") + IF (CDASH_LOCAL) + SET (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}") + ELSE (CDASH_LOCAL) + SET (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION_STRING}") + ENDIF (CDASH_LOCAL) SET (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}") SET (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}") SET (CPACK_PACKAGE_VERSION_PATCH "") - SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") IF (EXISTS "${HDF5_SOURCE_DIR}/release_docs") SET (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt") SET (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/COPYING") SET (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt") ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs") SET (CPACK_PACKAGE_RELOCATABLE TRUE) + SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") + SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.bmp") SET (CPACK_GENERATOR "TGZ") IF (WIN32) @@ -218,15 +271,20 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) # - Root install directory (displayed to end user at installer-run time) # - "NSIS package/display name" (text used in the installer GUI) # - Registry key used to store info about the installation + SET (CPACK_NSIS_PACKAGE_NAME "${HDF5_PACKAGE_STRING}") IF (CMAKE_CL_64) SET (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") - SET (CPACK_NSIS_PACKAGE_NAME "${HDF5_PACKAGE_STRING} (Win64)") - SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${HDF5_PACKAGE_STRING}-${LIB_TYPE} (Win64)") + SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION} (Win64)") ELSE (CMAKE_CL_64) SET (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES") - SET (CPACK_NSIS_PACKAGE_NAME "${HDF5_PACKAGE_STRING}") - SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${HDF5_PACKAGE_STRING}-${LIB_TYPE}") + SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") ENDIF (CMAKE_CL_64) + # set the install/unistall icon used for the installer itself + # There is a bug in NSI that does not handle full unix paths properly. + SET (CPACK_NSIS_MUI_ICON "${HDF5_RESOURCES_DIR}\\\\hdf.ico") + SET (CPACK_NSIS_MUI_UNIICON "${HDF5_RESOURCES_DIR}\\\\hdf.ico") + # set the package header icon for MUI + SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}\\\\hdf.bmp") SET (CPACK_NSIS_DISPLAY_NAME "@CPACK_NSIS_PACKAGE_NAME@, is a data model, library, and file format for storing and managing data") SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}") SET (CPACK_MONOLITHIC_INSTALL ON) @@ -237,8 +295,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) SET (CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}") SET (CPACK_PACKAGING_INSTALL_PREFIX "/") - SET (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}") - SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif") + SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.icns") SET (CPACK_SET_DESTDIR TRUE) # Required when packaging, and set CMAKE_INSTALL_PREFIX to "/". IF (HDF5_PACK_MACOSX_BUNDLE) @@ -246,11 +303,14 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) SET (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}") SET (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in / SET (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/") - SET (CPACK_BUNDLE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif") + SET (CPACK_BUNDLE_ICON "${HDF5_RESOURCES_DIR}/hdf.icns") SET (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist") SET (CPACK_APPLE_GUI_INFO_STRING "HDF5 (Hierarchical Data Format 5) Software Library and Utilities") - SET (CPACK_APPLE_GUI_COPYRIGHT "Copyright © 2006-2013 by The HDF Group. All rights reserved.") + SET (CPACK_APPLE_GUI_COPYRIGHT "Copyright © 2006-2014 by The HDF Group. All rights reserved.") SET (CPACK_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}") + SET (CPACK_APPLE_GUI_BUNDLE_NAME "${HDF5_PACKAGE_STRING}") + SET (CPACK_APPLE_GUI_VERSION_STRING "${CPACK_PACKAGE_VERSION_STRING}") + SET (CPACK_APPLE_GUI_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}") #----------------------------------------------------------------------------- # Configure the Info.plist file for the install bundle #----------------------------------------------------------------------------- @@ -258,6 +318,19 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) ${HDF5_RESOURCES_DIR}/CPack.Info.plist.in ${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY ) + CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/PkgInfo.in + ${HDF5_BINARY_DIR}/CMakeFiles/PkgInfo @ONLY + ) + CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/version.plist.in + ${HDF5_BINARY_DIR}/CMakeFiles/version.plist @ONLY + ) + INSTALL ( + FILES ${HDF5_BINARY_DIR}/CMakeFiles/PkgInfo + ${HDF5_BINARY_DIR}/CMakeFiles/version.plist + DESTINATION .. + ) ENDIF(HDF5_PACK_MACOSX_BUNDLE) ELSE (WIN32) LIST (APPEND CPACK_GENERATOR "STGZ") diff --git a/CMakeLists.txt b/CMakeLists.txt index c6c513c..48134d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,14 +198,14 @@ MESSAGE (STATUS "SOVERSION: ${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_ #----------------------------------------------------------------------------- SET (HDF5_PACKAGE "hdf5") SET (HDF5_PACKAGE_NAME "HDF5") -IF ("${H5_VERS_SUBRELEASE}" STREQUAL "") - SET (HDF5_PACKAGE_VERSION "${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}") -ELSE ("${H5_VERS_SUBRELEASE}" STREQUAL "") - SET (HDF5_PACKAGE_VERSION "${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}") -ENDIF ("${H5_VERS_SUBRELEASE}" STREQUAL "") +SET (HDF5_PACKAGE_VERSION "${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}") SET (HDF5_PACKAGE_VERSION_MAJOR "${H5_VERS_MAJOR}.${H5_VERS_MINOR}") SET (HDF5_PACKAGE_VERSION_MINOR "${H5_VERS_RELEASE}") -SET (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}") +IF (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "") + SET (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}-${H5_VERS_SUBRELEASE}") +ELSE (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "") + SET (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}") +ENDIF (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "") SET (HDF5_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}") SET (HDF5_PACKAGE_STRING "${HDF5_PACKAGE_NAME} ${HDF5_PACKAGE_VERSION_STRING}") SET (HDF5_PACKAGE_TARNAME "${HDF5_PACKAGE}${HDF_PACKAGE_EXT}") @@ -213,6 +213,22 @@ SET (HDF5_PACKAGE_URL "http://www.hdfgroup.org") SET (HDF5_PACKAGE_BUGREPORT "help@hdfgroup.org") #----------------------------------------------------------------------------- +# Set Install folder value +#----------------------------------------------------------------------------- +IF (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + IF(CMAKE_HOST_UNIX) + SET(CMAKE_INSTALL_PREFIX "/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}" + CACHE PATH "Install path prefix, prepended onto install directories." FORCE) + ELSE(CMAKE_HOST_UNIX) + GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES) + SET(CMAKE_INSTALL_PREFIX + "${CMAKE_GENERIC_PROGRAM_FILES}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}" + CACHE PATH "Install path prefix, prepended onto install directories." FORCE) + SET(CMAKE_GENERIC_PROGRAM_FILES) + ENDIF(CMAKE_HOST_UNIX) +ENDIF (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + +#----------------------------------------------------------------------------- # Include some macros for reusable code #----------------------------------------------------------------------------- INCLUDE (${HDF5_RESOURCES_DIR}/HDFMacros.cmake) @@ -267,13 +283,6 @@ SET (EXTERNAL_LIBRARYDLL_LIST "") INCLUDE (${HDF5_RESOURCES_DIR}/ConfigureChecks.cmake) #----------------------------------------------------------------------------- -# Option to use legacy naming for windows libs/programs, default is legacy -#----------------------------------------------------------------------------- -IF (WIN32 AND NOT CYGWIN) - OPTION (HDF_LEGACY_NAMING "Use Legacy Names for Libraries and Programs" OFF) -ENDIF (WIN32 AND NOT CYGWIN) - -#----------------------------------------------------------------------------- # Option to Build Shared/Static libs, default is static #----------------------------------------------------------------------------- OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" OFF) @@ -382,7 +391,7 @@ ENDIF (MAKE_SYSTEM) IF (CMAKE_BUILD_TYPE MATCHES Debug) ADD_DEFINITIONS (-DDEBUG) ADD_DEFINITIONS ( - -DH5Z_DEBUG -DH5VM_DEBUG -DH5T_DEBUG + -DH5Z_DEBUG -DH5V_DEBUG -DH5T_DEBUG -DH5S_DEBUG -DH5P_DEBUG -DH5O_DEBUG -DH5MM_DEBUG -DH5MF_DEBUG -DH5I_DEBUG -DH5HL_DEBUG -DH5HG_DEBUG -DH5G_DEBUG -DH5F_DEBUG -DH5E_DEBUG -DH5D_DEBUG -DH5B_DEBUG -DH5AC_DEBUG -UNDEBUG @@ -673,7 +682,7 @@ ENDIF (HDF5_ENABLE_PARALLEL) IF (H5_HAVE_PARALLEL) SET (LINK_LIBS ${LINK_LIBS} ${MPI_C_LIBRARIES}) IF (MPI_C_LINK_FLAGS) - SET (CMAKE_EXE_LINKER_FLAGS ${MPI_C_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}) + SET (CMAKE_EXE_LINKER_FLAGS "${MPI_C_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") ENDIF (MPI_C_LINK_FLAGS) ENDIF (H5_HAVE_PARALLEL) diff --git a/MANIFEST b/MANIFEST index bea0985..8649f77 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1999,6 +1999,7 @@ ./tools/h5repack/testfiles/h5repack_layouto.h5 ./tools/h5repack/testfiles/h5repack_layout2.h5 ./tools/h5repack/testfiles/h5repack_layout3.h5 +./tools/h5repack/testfiles/h5repack_layout.UD.h5 ./tools/h5repack/testfiles/h5repack_named_dtypes.h5 ./tools/h5repack/testfiles/h5repack_nbit.h5 ./tools/h5repack/testfiles/h5repack_objs.h5 @@ -2008,10 +2009,12 @@ ./tools/h5repack/testfiles/h5repack_szip.h5 ./tools/h5repack/testfiles/ublock.bin ./tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl +./tools/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst ./tools/h5repack/testfiles/plugin_test.h5repack_layout.h5.tst ./tools/h5repack/testfiles/h5repack-help.txt ./tools/h5repack/testfiles/h5repack_filters.h5.tst ./tools/h5repack/testfiles/h5repack_layout.h5.ddl +./tools/h5repack/testfiles/h5repack_layout.UD.h5-plugin_none.ddl ./tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl # jam utility and tests @@ -2295,9 +2298,14 @@ ./config/cmake/CTestCustom.cmake ./config/cmake/ConfigureChecks.cmake ./config/cmake/CPack.Info.plist.in -./config/cmake/hdf.gif +./config/cmake/hdf.bmp +./config/cmake/hdf.icns +./config/cmake/hdf.ico +./config/cmake/PkgInfo.in +./config/cmake/version.plist.in ./config/cmake/NSIS.template.in ./config/cmake/NSIS.InstallOptions.ini.in +./config/cmake/README.txt.cmake.in # CMake-specific User Files ./config/cmake/UserMacros/Windows_MT.cmake diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index 2aca31c..dc2aabc 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -565,7 +565,7 @@ #define H5_PACKAGE_URL "@HDF5_PACKAGE_URL@" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "@HDF5_PACKAGE_VERSION@" +#define H5_PACKAGE_VERSION "@HDF5_PACKAGE_VERSION_STRING@" /* Width for printf() for type `long long' or `__int64', use `ll' */ #cmakedefine H5_PRINTF_LL_WIDTH @H5_PRINTF_LL_WIDTH@ @@ -747,7 +747,7 @@ #cmakedefine H5_USING_MEMCHECKER @H5_USING_MEMCHECKER@ /* Version number of package */ -#define H5_VERSION "@HDF5_PACKAGE_VERSION@" +#define H5_VERSION "@HDF5_PACKAGE_VERSION_STRING@" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index 1883d3e..075920e 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR) # ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log ############################################################################################################### -set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@/HDF_Group/@HDF5_PACKAGE_NAME@/@HDF5_PACKAGE_VERSION@") +set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@") set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") set(STATICLIBRARIES "@H5_ENABLE_STATIC_LIB@") set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG}) diff --git a/config/cmake/PkgInfo.in b/config/cmake/PkgInfo.in new file mode 100644 index 0000000..e530f88 --- /dev/null +++ b/config/cmake/PkgInfo.in @@ -0,0 +1 @@ +FMWK???? \ No newline at end of file diff --git a/config/cmake/README.txt.cmake.in b/config/cmake/README.txt.cmake.in new file mode 100644 index 0000000..4d3ab3d --- /dev/null +++ b/config/cmake/README.txt.cmake.in @@ -0,0 +1,53 @@ +@HDF5_PACKAGE_NAME@ version @HDF5_PACKAGE_VERSION_STRING@ +------------------------------------------------------------------------------ + +This directory contains the binary (release) distribution of +@HDF5_PACKAGE_NAME@ @HDF5_PACKAGE_VERSION_MAJOR@ that was compiled on; + @BINARY_PLATFORM@. + +It was built with the following options: + -- @LIB_TYPE@ C/C++/Fortran libraries + -- SZIP (encoder enabled) and ZLIB + -- @LIB_TYPE@ HDF5 tools + +The contents of this directory are: + + COPYING - Copyright notice + README.txt - This file + @HDF5_PACKAGE_NAME@-@HDF5_PACKAGE_VERSION@-@BINARY_SYSTEM_NAME@.@BINARY_INSTALL_ENDING@ - HDF5 Install Package + +Installation +=========================================================================== +1. Execute @HDF5_PACKAGE_NAME@-@HDF5_PACKAGE_VERSION@-@BINARY_SYSTEM_NAME@.@BINARY_INSTALL_ENDING@ +2. Follow prompts +=========================================================================== + +After Installation +=========================================================================== +The compressed examples file HDF5Examples-0.1.1-Source.@BINARY_EXAMPLE_ENDING@, located in the +HDF5 install folder, can be built and tested with CMake and the supplied +HDF518_Examples.cmake file. The HDF518_Examples.cmake expects HDF5 to have +been installed in the default location with above compilers. + +To test the installation with the examples; + Create a directory to run the examples. + Copy HDF5Examples-0.1.1-Source.@BINARY_EXAMPLE_ENDING@ to this directory, do NOT unzip. + Copy HDF518_Examples.cmake to this directory. + Edit HDF518_Examples.cmake line 8 to set INSTALLDIR to where HDF5 is installed. + Execute from this directory: + ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log + +When executed, the ctest script will save the results to the log file, test.log, as +indicated by the ctest command. If you wish the to see more build and test information, +add "-VV" to the ctest command. + +For more information see USING_CMake_Examples.txt in the install folder. +=========================================================================== + +Documentation for this release can be found at the following URL: + http://www.hdfgroup.org/HDF5/doc/. + +See the HDF5 home page for further details: + http://hdfgroup.org/HDF5/ + +Bugs should be reported to help@hdfgroup.org. diff --git a/config/cmake/hdf.bmp b/config/cmake/hdf.bmp new file mode 100644 index 0000000..9e9e4aa Binary files /dev/null and b/config/cmake/hdf.bmp differ diff --git a/config/cmake/hdf.gif b/config/cmake/hdf.gif deleted file mode 100644 index 656617b..0000000 Binary files a/config/cmake/hdf.gif and /dev/null differ diff --git a/config/cmake/hdf.icns b/config/cmake/hdf.icns new file mode 100755 index 0000000..22afa2e Binary files /dev/null and b/config/cmake/hdf.icns differ diff --git a/config/cmake/hdf.ico b/config/cmake/hdf.ico new file mode 100644 index 0000000..26abc96 Binary files /dev/null and b/config/cmake/hdf.ico differ diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in index 4027c55..3970a9f 100644 --- a/config/cmake/libhdf5.settings.cmake.in +++ b/config/cmake/libhdf5.settings.cmake.in @@ -3,7 +3,7 @@ General Information: ------------------- - HDF5 Version: @HDF5_PACKAGE_VERSION@ + HDF5 Version: @HDF5_PACKAGE_VERSION_STRING@ Configured on: @CONFIG_DATE@ Configured by: @CMAKE_GENERATOR@ Configure mode: CMAKE @CMAKE_VERSION@ diff --git a/config/cmake/version.plist.in b/config/cmake/version.plist.in new file mode 100644 index 0000000..817d89e --- /dev/null +++ b/config/cmake/version.plist.in @@ -0,0 +1,17 @@ + + + + + + BuildVersion + @CPACK_PACKAGE_VERSION_MAJOR@ + CFBundleShortVersionString + @CPACK_APPLE_GUI_SHORT_VERSION_STRING@ + CFBundleVersion + @CPACK_APPLE_GUI_SHORT_VERSION_STRING@ + ProjectName + @CPACK_APPLE_GUI_BUNDLE_NAME@ + SourceVersion + @CPACK_PACKAGE_VERSION_MINOR@ + + diff --git a/src/H5Z.c b/src/H5Z.c index 486d2c4..cf2ed14 100644 --- a/src/H5Z.c +++ b/src/H5Z.c @@ -665,7 +665,13 @@ H5Zfilter_avail(H5Z_filter_t id) HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number") if((ret_value = H5Z_filter_avail(id)) < 0) - HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "unable to check the availability of the filter") + HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "unable to check the availability of the filter") + else if(ret_value == FALSE) { + const H5Z_class2_t *filter_info; + + if(NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)id))) + ret_value = TRUE; + } /* end if */ done: FUNC_LEAVE_API(ret_value) diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake index 46d46aa..3252c30 100644 --- a/tools/h5repack/CMakeTests.cmake +++ b/tools/h5repack/CMakeTests.cmake @@ -55,6 +55,7 @@ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layouto.h5 ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout2.h5 ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout3.h5 + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.UD.h5 ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_named_dtypes.h5 ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_nbit.h5 ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_objs.h5 @@ -88,6 +89,8 @@ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_filters.h5.tst ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5-plugin_test.ddl ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/plugin_test.h5repack_layout.h5.tst + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.UD.h5-plugin_none.ddl + ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/plugin_none.h5repack_layout.UD.h5.tst ) FOREACH (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) @@ -1063,6 +1066,7 @@ ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CO ############################################################################## IF (BUILD_SHARED_LIBS) ADD_H5_UD_TEST (plugin_test 0 h5repack_layout.h5 -v -f UD=257,1,9) + ADD_H5_UD_TEST (plugin_none 0 h5repack_layout.UD.h5 -v -f NONE) ELSE (BUILD_SHARED_LIBS) MESSAGE (STATUS " **** Plugins libraries must be built as shared libraries **** ") ADD_TEST ( diff --git a/tools/h5repack/h5repack_plugin.sh.in b/tools/h5repack/h5repack_plugin.sh.in index 750b05b..7502397 100644 --- a/tools/h5repack/h5repack_plugin.sh.in +++ b/tools/h5repack/h5repack_plugin.sh.in @@ -66,6 +66,10 @@ $SRC_H5REPACK_TESTFILES/h5repack_layout.h5 $SRC_H5REPACK_TESTFILES/h5repack_layout.h5-plugin_test.ddl $SRC_H5REPACK_TESTFILES/plugin_test.h5repack_layout.h5.tst " +#$SRC_H5REPACK_TESTFILES/h5repack_layout.UD.h5 +#$SRC_H5REPACK_TESTFILES/h5repack_layout.UD.h5-plugin_none.ddl +#$SRC_H5REPACK_TESTFILES/plugin_none.h5repack_layout.UD.h5.tst +#" # # copy test files and expected output files from source dirs to test dir @@ -239,6 +243,9 @@ COPY_TESTFILES_TO_TESTDIR arg="h5repack_layout.h5 -v -f UD=257,1,9" TOOLTEST_DUMP plugin_test $arg +#arg="h5repack_layout.UD.h5 -v -f NONE" +#TOOLTEST_DUMP plugin_none $arg + # print results if test $nerrors -ne 0 ; then echo "$nerrors errors encountered" diff --git a/tools/h5repack/testfiles/h5repack_layout.UD.h5 b/tools/h5repack/testfiles/h5repack_layout.UD.h5 new file mode 100644 index 0000000..caf2024 Binary files /dev/null and b/tools/h5repack/testfiles/h5repack_layout.UD.h5 differ diff --git a/tools/h5repack/testfiles/h5repack_layout.UD.h5-plugin_none.ddl b/tools/h5repack/testfiles/h5repack_layout.UD.h5-plugin_none.ddl new file mode 100644 index 0000000..fb94c21 --- /dev/null +++ b/tools/h5repack/testfiles/h5repack_layout.UD.h5-plugin_none.ddl @@ -0,0 +1,130 @@ +HDF5 "out-plugin_none.h5repack_layout.UD.h5" { +GROUP "/" { + DATASET "dset1" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } + STORAGE_LAYOUT { + CHUNKED ( 40, 20 ) + SIZE 3200 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE 0 + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_INCR + } + } + DATASET "dset2" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } + STORAGE_LAYOUT { + CHUNKED ( 40, 20 ) + SIZE 3200 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE 0 + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_INCR + } + } + DATASET "dset3" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } + STORAGE_LAYOUT { + CHUNKED ( 40, 20 ) + SIZE 3200 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE 0 + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_INCR + } + } + DATASET "dset4" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } + STORAGE_LAYOUT { + CHUNKED ( 40, 20 ) + SIZE 3200 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE 0 + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_INCR + } + } + DATASET "dset_chunk" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 40, 20 ) / ( 40, H5S_UNLIMITED ) } + STORAGE_LAYOUT { + CHUNKED ( 20, 10 ) + SIZE 3200 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE 0 + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_INCR + } + } + DATASET "dset_compact" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } + STORAGE_LAYOUT { + CHUNKED ( 40, 20 ) + SIZE 3200 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE 0 + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_INCR + } + } + DATASET "dset_contiguous" { + DATATYPE H5T_STD_I32LE + DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } + STORAGE_LAYOUT { + CHUNKED ( 40, 20 ) + SIZE 3200 + } + FILTERS { + NONE + } + FILLVALUE { + FILL_TIME H5D_FILL_TIME_IFSET + VALUE 0 + } + ALLOCATION_TIME { + H5D_ALLOC_TIME_INCR + } + } +} +} diff --git a/tools/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst b/tools/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst new file mode 100644 index 0000000..4fb6906 --- /dev/null +++ b/tools/h5repack/testfiles/plugin_none.h5repack_layout.UD.h5.tst @@ -0,0 +1,14 @@ +Objects to modify layout are... +Objects to apply filter are... + Uncompress all +----------------------------------------- + Type Filter (Compression) Name +----------------------------------------- + group / + dset (1.000:1) /dset1 + dset (1.000:1) /dset2 + dset (1.000:1) /dset3 + dset (1.000:1) /dset4 + dset (1.000:1) /dset_chunk + dset (1.000:1) /dset_compact + dset (1.000:1) /dset_contiguous diff --git a/tools/lib/h5tools_filters.c b/tools/lib/h5tools_filters.c index 2da21ef..79cf253 100644 --- a/tools/lib/h5tools_filters.c +++ b/tools/lib/h5tools_filters.c @@ -22,8 +22,9 @@ */ static void print_warning(const char *dname, const char *fname) { - fprintf(stderr,"warning: dataset <%s> cannot be read, %s filter is not available\n", - dname,fname); + fprintf(stderr, + "warning: dataset <%s> cannot be read, %s filter is not available\n", + dname, fname); } /*------------------------------------------------------------------------- @@ -46,109 +47,111 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr hid_t dcpl_id) /* dataset creation property list */ { - int nfilters; /* number of filters */ - H5Z_filter_t filtn; /* filter identification number */ - int i; /* index */ - - - /* get information about filters */ - if ((nfilters = H5Pget_nfilters(dcpl_id))<0) - return -1; - - /* if we do not have filters, we can read the dataset safely */ - if (!nfilters) - return 1; - - /* check availability of filters */ - for(i = 0; i < nfilters; i++) - { - if((filtn = H5Pget_filter2(dcpl_id, (unsigned)i, 0, 0, 0, (size_t)0, 0, NULL)) < 0) - return -1; - - switch(filtn) - { -/*------------------------------------------------------------------------- - * user defined filter - *------------------------------------------------------------------------- - */ - default: - if(name) - print_warning(name, "user defined"); - return 0; - -/*------------------------------------------------------------------------- - * H5Z_FILTER_DEFLATE 1 , deflation like gzip - *------------------------------------------------------------------------- - */ - case H5Z_FILTER_DEFLATE: + int nfilters; /* number of filters */ + H5Z_filter_t filtn; /* filter identification number */ + int i; /* index */ + int udfilter_avail; /* index */ + + /* get information about filters */ + if ((nfilters = H5Pget_nfilters(dcpl_id)) < 0) + return -1; + + /* if we do not have filters, we can read the dataset safely */ + if (!nfilters) + return 1; + + /* check availability of filters */ + for (i = 0; i < nfilters; i++) { + if ((filtn = H5Pget_filter2(dcpl_id, (unsigned) i, 0, 0, 0, (size_t) 0, 0, NULL)) < 0) + return -1; + + switch (filtn) { + /*------------------------------------------------------------------------- + * user defined filter + *------------------------------------------------------------------------- + */ + default: + if ((udfilter_avail = H5Zfilter_avail(filtn)) < 0) + return -1; + else if (udfilter_avail == 0) { + if (name) + print_warning(name, "user defined"); + return 0; + } + break; + + /*------------------------------------------------------------------------- + * H5Z_FILTER_DEFLATE 1 , deflation like gzip + *------------------------------------------------------------------------- + */ + case H5Z_FILTER_DEFLATE: #ifndef H5_HAVE_FILTER_DEFLATE - if (name) - print_warning(name,"deflate"); - return 0; + if (name) + print_warning(name,"deflate"); + return 0; #endif - break; -/*------------------------------------------------------------------------- - * H5Z_FILTER_SZIP 4 , szip compression - *------------------------------------------------------------------------- - */ - case H5Z_FILTER_SZIP: + break; + /*------------------------------------------------------------------------- + * H5Z_FILTER_SZIP 4 , szip compression + *------------------------------------------------------------------------- + */ + case H5Z_FILTER_SZIP: #ifndef H5_HAVE_FILTER_SZIP - if (name) - print_warning(name,"SZIP"); - return 0; + if (name) + print_warning(name,"SZIP"); + return 0; #endif - break; -/*------------------------------------------------------------------------- - * H5Z_FILTER_SHUFFLE 2 , shuffle the data - *------------------------------------------------------------------------- - */ - case H5Z_FILTER_SHUFFLE: + break; + /*------------------------------------------------------------------------- + * H5Z_FILTER_SHUFFLE 2 , shuffle the data + *------------------------------------------------------------------------- + */ + case H5Z_FILTER_SHUFFLE: #ifndef H5_HAVE_FILTER_SHUFFLE - if (name) - print_warning(name,"shuffle"); - return 0; + if (name) + print_warning(name,"shuffle"); + return 0; #endif - break; -/*------------------------------------------------------------------------- - * H5Z_FILTER_FLETCHER32 3 , fletcher32 checksum of EDC - *------------------------------------------------------------------------- - */ - case H5Z_FILTER_FLETCHER32: + break; + /*------------------------------------------------------------------------- + * H5Z_FILTER_FLETCHER32 3 , fletcher32 checksum of EDC + *------------------------------------------------------------------------- + */ + case H5Z_FILTER_FLETCHER32: #ifndef H5_HAVE_FILTER_FLETCHER32 - if (name) - print_warning(name,"fletcher32"); - return 0; + if (name) + print_warning(name,"fletcher32"); + return 0; #endif - break; -/*------------------------------------------------------------------------- - * H5Z_FILTER_NBIT - *------------------------------------------------------------------------- - */ - case H5Z_FILTER_NBIT: + break; + /*------------------------------------------------------------------------- + * H5Z_FILTER_NBIT + *------------------------------------------------------------------------- + */ + case H5Z_FILTER_NBIT: #ifndef H5_HAVE_FILTER_NBIT - if (name) - print_warning(name,"nbit"); - return 0; + if (name) + print_warning(name,"nbit"); + return 0; #endif - break; -/*------------------------------------------------------------------------- - * H5Z_FILTER_SCALEOFFSET - *------------------------------------------------------------------------- - */ - case H5Z_FILTER_SCALEOFFSET: + break; + /*------------------------------------------------------------------------- + * H5Z_FILTER_SCALEOFFSET + *------------------------------------------------------------------------- + */ + case H5Z_FILTER_SCALEOFFSET: #ifndef H5_HAVE_FILTER_SCALEOFFSET - if (name) - print_warning(name,"scaleoffset"); - return 0; + if (name) + print_warning(name,"scaleoffset"); + return 0; #endif - break; - }/*switch*/ - }/*for*/ + break; + }/*switch*/ + }/*for*/ - return 1; + return 1; } - /*------------------------------------------------------------------------- * Function: h5tools_canwritef * @@ -164,71 +167,70 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr * *------------------------------------------------------------------------- */ -int h5tools_can_encode( H5Z_filter_t filtn) -{ - switch (filtn) - { - /* user defined filter */ - default: - return 0; +int h5tools_can_encode(H5Z_filter_t filtn) { + switch (filtn) { + /* user defined filter */ + default: + return 0; - case H5Z_FILTER_DEFLATE: + case H5Z_FILTER_DEFLATE: #ifndef H5_HAVE_FILTER_DEFLATE - return 0; + return 0; #endif - break; - case H5Z_FILTER_SZIP: + break; + case H5Z_FILTER_SZIP: #ifndef H5_HAVE_FILTER_SZIP - return 0; + return 0; #else - { - unsigned int filter_config_flags; - - if(H5Zget_filter_info(filtn, &filter_config_flags)<0) - return -1; - if ((filter_config_flags & - (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) == 0) { - /* filter present but neither encode nor decode is supported (???) */ - return -1; - } else if ((filter_config_flags & - (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) == - H5Z_FILTER_CONFIG_DECODE_ENABLED) { - /* decoder only: read but not write */ - return 0; - } else if ((filter_config_flags & - (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) == - H5Z_FILTER_CONFIG_ENCODE_ENABLED) { - /* encoder only: write but not read (???) */ - return -1; - } else if ((filter_config_flags & - (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) == - (H5Z_FILTER_CONFIG_ENCODE_ENABLED|H5Z_FILTER_CONFIG_DECODE_ENABLED)) { - return 1; - } - } + { + unsigned int filter_config_flags; + + if (H5Zget_filter_info(filtn, &filter_config_flags) < 0) + return -1; + if ((filter_config_flags + & (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) == 0) { + /* filter present but neither encode nor decode is supported (???) */ + return -1; + } + else if ((filter_config_flags + & (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) == H5Z_FILTER_CONFIG_DECODE_ENABLED) { + /* decoder only: read but not write */ + return 0; + } + else if ((filter_config_flags + & (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) == H5Z_FILTER_CONFIG_ENCODE_ENABLED) { + /* encoder only: write but not read (???) */ + return -1; + } + else if ((filter_config_flags + & (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) + == (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) { + return 1; + } + } #endif - break; - case H5Z_FILTER_SHUFFLE: + break; + case H5Z_FILTER_SHUFFLE: #ifndef H5_HAVE_FILTER_SHUFFLE - return 0; + return 0; #endif - break; - case H5Z_FILTER_FLETCHER32: + break; + case H5Z_FILTER_FLETCHER32: #ifndef H5_HAVE_FILTER_FLETCHER32 - return 0; + return 0; #endif - break; - case H5Z_FILTER_NBIT: + break; + case H5Z_FILTER_NBIT: #ifndef H5_HAVE_FILTER_NBIT - return 0; + return 0; #endif - break; - case H5Z_FILTER_SCALEOFFSET: + break; + case H5Z_FILTER_SCALEOFFSET: #ifndef H5_HAVE_FILTER_SCALEOFFSET - return 0; + return 0; #endif - break; - }/*switch*/ + break; + }/*switch*/ - return 1; + return 1; } -- cgit v0.12