diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2014-03-18 16:21:46 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2014-03-18 16:21:46 (GMT) |
commit | 03d10edd23ce76e9389b54be138ef1bbb8791cef (patch) | |
tree | 97c8e0737bcb88af41df69fd7db4a23e103c6455 | |
parent | 73a72c59b8cd243de54993f1fb0991afede4ba4d (diff) | |
download | hdf5-03d10edd23ce76e9389b54be138ef1bbb8791cef.zip hdf5-03d10edd23ce76e9389b54be138ef1bbb8791cef.tar.gz hdf5-03d10edd23ce76e9389b54be138ef1bbb8791cef.tar.bz2 |
[svn-r24824] HDFFV-8700 -
KitWare recommendations: Change CMake commands to lower case.
Bump up CMake minimum versions.
Split test file into separate file for h5repack test.
Tested: local linux
28 files changed, 246 insertions, 148 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 80aa594..8d7cec2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,22 +52,22 @@ PROJECT (HDF5 C CXX) # # # Setup all necessary overrides for zlib so that HDF5 uses our # # internally compiled zlib rather than any other version -# IF(HDF5_ENABLE_Z_LIB_SUPPORT) +# if (HDF5_ENABLE_Z_LIB_SUPPORT) # # We must tell the main HDF5 library that it depends on our zlib # set (HDF5_LIB_DEPENDENCIES vtkzlib) # # Override the zlib header file -# IF(VTK_USE_SYSTEM_ZLIB) +# if (VTK_USE_SYSTEM_ZLIB) # set (H5_ZLIB_HEADER "zlib.h") -# ELSE(VTK_USE_SYSTEM_ZLIB) +# else (VTK_USE_SYSTEM_ZLIB) # set (H5_ZLIB_HEADER "vtk_zlib.h") # # Set vars that FindZlib would have set if used in sub project # set (ZLIB_INCLUDE_DIRS "${VTK_ZLIB_INCLUDE_DIRS}") # set (ZLIB_LIBRARIES vtkzlib) -# ENDIF(VTK_USE_SYSTEM_ZLIB) -# ENDIF(HDF5_ENABLE_Z_LIB_SUPPORT) +# endif (VTK_USE_SYSTEM_ZLIB) +# endif (HDF5_ENABLE_Z_LIB_SUPPORT) # # # Add the sub project -# ADD_SUBDIRECTORY(Utilities/hdf5-1.8) +# add_subdirectory (Utilities/hdf5-1.8) #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- @@ -78,12 +78,12 @@ PROJECT (HDF5 C CXX) # explicitly turn off this option to build HDF5 in the Express IDE... # option (HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." ON) -MARK_AS_ADVANCED (HDF5_USE_FOLDERS) +mark_as_advanced (HDF5_USE_FOLDERS) if (HDF5_USE_FOLDERS) set_property (GLOBAL PROPERTY USE_FOLDERS ON) endif (HDF5_USE_FOLDERS) option (HDF5_NO_PACKAGES "CPACK - Disable packaging" OFF) -MARK_AS_ADVANCED (HDF5_NO_PACKAGES) +mark_as_advanced (HDF5_NO_PACKAGES) #----------------------------------------------------------------------------- # Set the core names of all the libraries @@ -169,7 +169,7 @@ endif (NOT HDF5_INSTALL_DATA_DIR) #----------------------------------------------------------------------------- # parse the full version number from H5public.h and include in H5_VERS_INFO #----------------------------------------------------------------------------- -FILE (READ ${HDF5_SRC_DIR}/H5public.h _h5public_h_contents) +file (READ ${HDF5_SRC_DIR}/H5public.h _h5public_h_contents) string (REGEX REPLACE ".*#define[ \t]+H5_VERS_MAJOR[ \t]+([0-9]*).*$" "\\1" H5_VERS_MAJOR ${_h5public_h_contents}) string (REGEX REPLACE ".*#define[ \t]+H5_VERS_MINOR[ \t]+([0-9]*).*$" @@ -183,14 +183,14 @@ string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._]*) #----------------------------------------------------------------------------- # parse the full soversion number from config/lt_vers.am and include in H5_SOVERS_INFO #----------------------------------------------------------------------------- -FILE (READ ${HDF5_SOURCE_DIR}/config/lt_vers.am _lt_vers_am_contents) +file (READ ${HDF5_SOURCE_DIR}/config/lt_vers.am _lt_vers_am_contents) string (REGEX REPLACE ".*LT_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_SOVERS_INTERFACE ${_lt_vers_am_contents}) string (REGEX REPLACE ".*LT_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_SOVERS_MINOR ${_lt_vers_am_contents}) string (REGEX REPLACE ".*LT_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$" "\\1" H5_SOVERS_RELEASE ${_lt_vers_am_contents}) -MATH(EXPR H5_SOVERS_MAJOR ${H5_SOVERS_INTERFACE}-${H5_SOVERS_RELEASE}) +MATH (EXPR H5_SOVERS_MAJOR ${H5_SOVERS_INTERFACE}-${H5_SOVERS_RELEASE}) message (STATUS "SOVERSION: ${H5_SOVERS_MAJOR}.${H5_SOVERS_RELEASE}.${H5_SOVERS_MINOR}") #----------------------------------------------------------------------------- @@ -216,16 +216,16 @@ set (HDF5_PACKAGE_BUGREPORT "help@hdfgroup.org") # Set Install folder value #----------------------------------------------------------------------------- if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - IF(CMAKE_HOST_UNIX) + 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) + 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_HOST_UNIX) endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) #----------------------------------------------------------------------------- @@ -327,7 +327,7 @@ endif (HDF5_ENABLE_COVERAGE) #----------------------------------------------------------------------------- # option (HDF5_ENABLE_USING_DMALLOC "Indicate that dmalloc is used" OFF) # if (HDF5_ENABLE_USING_DMALLOC) -# FIND_PACKAGE (DMALLOC) +# find_package (DMALLOC) # set (H5_HAVE_DMALLOC DMALLOC_FOUND) # endif (HDF5_ENABLE_USING_DMALLOC) @@ -396,7 +396,7 @@ if (CMAKE_BUILD_TYPE MATCHES Debug) if (HDF5_ENABLE_INSTRUMENT) set (H5_HAVE_INSTRUMENTED_LIBRARY 1) endif (HDF5_ENABLE_INSTRUMENT) - MARK_AS_ADVANCED (HDF5_Enable_Instrument) + mark_as_advanced (HDF5_Enable_Instrument) #-- NMake Makefiles will overwhelm the console with warnings if -Wall is used. if (NOT WIN32) add_definitions (-Wall) @@ -754,7 +754,7 @@ endif (WIN32 AND NOT CYGWIN) #----------------------------------------------------------------------------- # Add the HDF5 Library Target to the build #----------------------------------------------------------------------------- -ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src) +add_subdirectory (${HDF5_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/src) if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL) @@ -774,28 +774,28 @@ if (BUILD_TESTING) CACHE INTEGER "Timeout in seconds for each test (default 1200=20minutes)" ) - ENABLE_TESTING () + enable_testing () include (CTest) if (NOT HDF5_EXTERNALLY_CONFIGURED) if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test") - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/tools/lib ${PROJECT_BINARY_DIR}/tools/lib) - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/test ${PROJECT_BINARY_DIR}/test) + add_subdirectory (${HDF5_SOURCE_DIR}/tools/lib ${PROJECT_BINARY_DIR}/tools/lib) + add_subdirectory (${HDF5_SOURCE_DIR}/test ${PROJECT_BINARY_DIR}/test) endif (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test") if (EXISTS "${HDF5_SOURCE_DIR}/perform" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/perform") - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/perform ${PROJECT_BINARY_DIR}/perform) - ENDIF(EXISTS "${HDF5_SOURCE_DIR}/perform" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/perform") + add_subdirectory (${HDF5_SOURCE_DIR}/perform ${PROJECT_BINARY_DIR}/perform) + endif (EXISTS "${HDF5_SOURCE_DIR}/perform" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/perform") if (H5_HAVE_PARALLEL) if (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar") - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/testpar ${PROJECT_BINARY_DIR}/testpar) + add_subdirectory (${HDF5_SOURCE_DIR}/testpar ${PROJECT_BINARY_DIR}/testpar) endif (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar") endif (H5_HAVE_PARALLEL) endif (NOT HDF5_EXTERNALLY_CONFIGURED) option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF) - MARK_AS_ADVANCED (HDF5_TEST_VFD) + mark_as_advanced (HDF5_TEST_VFD) if (HDF5_TEST_VFD) option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON) - MARK_AS_ADVANCED (HDF5_TEST_FHEAP_VFD) + mark_as_advanced (HDF5_TEST_FHEAP_VFD) endif (HDF5_TEST_VFD) include (${HDF5_SOURCE_DIR}/CTestConfig.cmake) @@ -829,11 +829,11 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for # # set (FCFLAGS "${Fortran_DEFINES}") - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/fortran ${PROJECT_BINARY_DIR}/fortran) + add_subdirectory (${HDF5_SOURCE_DIR}/fortran ${PROJECT_BINARY_DIR}/fortran) if (HDF5_BUILD_HL_LIB) if (EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran") #-- Build the High Level Fortran source codes - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/hl/fortran ${PROJECT_BINARY_DIR}/hl/fortran) + add_subdirectory (${HDF5_SOURCE_DIR}/hl/fortran ${PROJECT_BINARY_DIR}/hl/fortran) endif (EXISTS "${HDF5_SOURCE_DIR}/hl/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl/fortran") endif (HDF5_BUILD_HL_LIB) endif (HDF5_BUILD_FORTRAN) @@ -845,7 +845,7 @@ endif (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/ if (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples") option (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" OFF) if (HDF5_BUILD_EXAMPLES) - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/examples ${PROJECT_BINARY_DIR}/examples) + add_subdirectory (${HDF5_SOURCE_DIR}/examples ${PROJECT_BINARY_DIR}/examples) endif (HDF5_BUILD_EXAMPLES) endif (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples") @@ -862,7 +862,7 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") if (CMAKE_NO_STD_NAMESPACE) set (H5_NO_STD 1) endif (CMAKE_NO_STD_NAMESPACE) - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/c++ ${PROJECT_BINARY_DIR}/c++) + add_subdirectory (${HDF5_SOURCE_DIR}/c++ ${PROJECT_BINARY_DIR}/c++) endif (HDF5_BUILD_CPP_LIB) endif (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++") @@ -872,7 +872,7 @@ endif (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++" if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools") option (HDF5_BUILD_TOOLS "Build HDF5 Tools" OFF) if (HDF5_BUILD_TOOLS) - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools) + add_subdirectory (${HDF5_SOURCE_DIR}/tools ${PROJECT_BINARY_DIR}/tools) endif (HDF5_BUILD_TOOLS) endif (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools") @@ -883,7 +883,7 @@ if (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl") option (HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" OFF) if (HDF5_BUILD_HL_LIB) set (H5_INCLUDE_HL 1) - ADD_SUBDIRECTORY (${HDF5_SOURCE_DIR}/hl ${PROJECT_BINARY_DIR}/hl) + add_subdirectory (${HDF5_SOURCE_DIR}/hl ${PROJECT_BINARY_DIR}/hl) endif (HDF5_BUILD_HL_LIB) endif (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl") @@ -1259,6 +1259,7 @@ # h5repack sources ./tools/h5repack/Makefile.am ./tools/h5repack/Makefile.in +./tools/h5repack/dynlib_rpk.c ./tools/h5repack/h5repack.sh.in ./tools/h5repack/h5repack_plugin.sh.in ./tools/h5repack/h5repack.c diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt index c1de616..89426c5 100644 --- a/c++/CMakeLists.txt +++ b/c++/CMakeLists.txt @@ -36,18 +36,18 @@ if (H5_HAVE_PARALLEL) add_definitions ("-DMPICH_IGNORE_CXX_SEEK") endif (H5_HAVE_PARALLEL) -ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/src ${HDF5_CPP_BINARY_DIR}/src) +add_subdirectory (${HDF5_CPP_SOURCE_DIR}/src ${HDF5_CPP_BINARY_DIR}/src) #----------------------------------------------------------------------------- # Build the CPP Examples #----------------------------------------------------------------------------- if (HDF5_BUILD_EXAMPLES) - ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/examples ${HDF5_CPP_BINARY_DIR}/examples) + add_subdirectory (${HDF5_CPP_SOURCE_DIR}/examples ${HDF5_CPP_BINARY_DIR}/examples) endif (HDF5_BUILD_EXAMPLES) #----------------------------------------------------------------------------- # Build the CPP unit tests #----------------------------------------------------------------------------- if (BUILD_TESTING) - ADD_SUBDIRECTORY (${HDF5_CPP_SOURCE_DIR}/test ${HDF5_CPP_BINARY_DIR}/test) + add_subdirectory (${HDF5_CPP_SOURCE_DIR}/test ${HDF5_CPP_BINARY_DIR}/test) endif (BUILD_TESTING) diff --git a/config/cmake/CheckTypeSize.cmake b/config/cmake/CheckTypeSize.cmake index 0fe2cbc..4af5741 100644 --- a/config/cmake/CheckTypeSize.cmake +++ b/config/cmake/CheckTypeSize.cmake @@ -34,12 +34,12 @@ MACRO (HDF_CHECK_TYPE_SIZE TYPE VARIABLE) ) if (HAVE_${VARIABLE}) message (STATUS "Check size of ${TYPE} - done") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log + 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 + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\n\n" ) endif (HAVE_${VARIABLE}) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 93c6138..03a7975 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -289,7 +289,7 @@ MACRO (HDF5_FUNCTION_TEST OTHER_TEST) 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 + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Performing Other Test ${OTHER_TEST} failed with the following output:\n" "${OUTPUT}\n" ) @@ -467,14 +467,14 @@ if (NOT WINDOWS) else (TEST_LFS_WORKS_RUN MATCHES 0) set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg}) message (STATUS "${msg}... no") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test TEST_LFS_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n" ) endif (TEST_LFS_WORKS_RUN MATCHES 0) else (TEST_LFS_WORKS_COMPILE ) set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg}) message (STATUS "${msg}... no") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test TEST_LFS_WORKS Compile failed with the following output:\n ${OUTPUT}\n" ) endif (TEST_LFS_WORKS_COMPILE) @@ -757,7 +757,7 @@ MACRO (HDF5_CXX_FUNCTION_TEST OTHER_TEST) else ("${OTHER_TEST}" EQUAL 0) message (STATUS "Performing CXX Test ${OTHER_TEST} - Failed") set (${OTHER_TEST} "" CACHE INTERNAL "CXX test ${FUNCTION}") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Performing CXX Test ${OTHER_TEST} failed with the following output:\n" "${OUTPUT}\n" ) @@ -802,14 +802,14 @@ if (NOT WINDOWS) else (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0) set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg}) message (STATUS "${msg}... no") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test TEST_DIRECT_VFD_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n" ) endif (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0) else (TEST_DIRECT_VFD_WORKS_COMPILE ) set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg}) message (STATUS "${msg}... no") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test TEST_DIRECT_VFD_WORKS Compile failed with the following output:\n ${OUTPUT}\n" ) endif (TEST_DIRECT_VFD_WORKS_COMPILE) @@ -870,7 +870,7 @@ if (WINDOWS) if ("${HAVE_IOEO_EXITCODE}" EQUAL 0) set (H5_HAVE_IOEO 1 CACHE INTERNAL "Test InitOnceExecuteOnce") message (STATUS "Performing Test InitOnceExecuteOnce - Success") - FILE (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Performing C SOURCE FILE Test InitOnceExecuteOnce succeded with the following output:\n" "${OUTPUT}\n" "Return value: ${HAVE_IOEO}\n") @@ -882,7 +882,7 @@ if (WINDOWS) endif (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN") message (STATUS "Performing Test InitOnceExecuteOnce - Failed") - FILE (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Performing InitOnceExecuteOnce Test failed with the following output:\n" "${OUTPUT}\n" "Return value: ${HAVE_IOEO_EXITCODE}\n") @@ -950,7 +950,7 @@ if (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown") 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 + 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) @@ -1000,14 +1000,14 @@ MACRO (H5ConversionTests TEST msg) else (${TEST}_RUN MATCHES 0) set (${TEST} "" CACHE INTERNAL ${msg}) message (STATUS "${msg}... no") - FILE (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log + 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 + file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Test ${TEST} Compile failed with the following output:\n ${OUTPUT}\n" ) endif (${TEST}_COMPILE) diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 69ff5b3..e65ea21 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -15,11 +15,11 @@ FortranCInterface_HEADER ( SYMBOLS mysub mymod:my_sub ) -FILE (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL\\(.*,.*\\) +(.*)") +file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL\\(.*,.*\\) +(.*)") string (REGEX MATCH "H5_FC_GLOBAL\\(.*,.*\\) +(.*)" RESULT ${CONTENTS}) set (H5_FC_FUNC "H5_FC_FUNC(name,NAME) ${CMAKE_MATCH_1}") -FILE (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)") +file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)") string (REGEX MATCH "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)" RESULT ${CONTENTS}) set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}") @@ -36,7 +36,7 @@ MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE) else (CMAKE_REQUIRED_LIBRARIES) set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) endif (CMAKE_REQUIRED_LIBRARIES) - FILE (WRITE + file (WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f "${CODE}" ) @@ -54,14 +54,14 @@ MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE) if (${VARIABLE}) set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}") message (STATUS "Testing Fortran ${FUNCTION} - OK") - FILE (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n" "${OUTPUT}\n\n" ) else (${VARIABLE}) message (STATUS "Testing Fortran ${FUNCTION} - Fail") set (${VARIABLE} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}") - FILE (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n" "${OUTPUT}\n\n") endif (${VARIABLE}) diff --git a/config/cmake/grepTest.cmake b/config/cmake/grepTest.cmake index 7670ad5..579d855 100644 --- a/config/cmake/grepTest.cmake +++ b/config/cmake/grepTest.cmake @@ -41,7 +41,7 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}") message (STATUS "COMMAND Error: ${TEST_ERROR}") # now grep the output with the reference -FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) +file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) # TEST_REFERENCE should always be matched STRING(REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM}) diff --git a/config/cmake/prunTest.cmake b/config/cmake/prunTest.cmake index 9cf0c55..3d5ec31 100644 --- a/config/cmake/prunTest.cmake +++ b/config/cmake/prunTest.cmake @@ -46,34 +46,34 @@ EXECUTE_PROCESS ( message (STATUS "COMMAND Result: ${TEST_RESULT}") -FILE (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) -FILE (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}") +file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) +file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}") if (ERROR_APPEND) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) - FILE (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + 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_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_ERROR}\n") + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_ERROR}\n") endif (TEST_APPEND) message (STATUS "COMMAND Error: ${TEST_ERROR}") if (TEST_MASK) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} 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}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK) if (TEST_MASK_MOD) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + 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}") - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK_MOD) if (TEST_MASK_ERROR) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}") @@ -81,26 +81,26 @@ if (TEST_MASK_ERROR) STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}") STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK_ERROR) if (TEST_FILTER) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}") - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_FILTER) #if (TEST_REF_FILTER) # message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}") -# FILE (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM) +# file (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM) # STRING(REGEX REPLACE "${TEST_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}") -# FILE (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}") +# file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}") #endif (TEST_REF_FILTER) if (NOT TEST_SKIP_COMPARE) if (WIN32 AND NOT MINGW) - FILE (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM) - FILE (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}") + file (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM) + file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}") endif (WIN32 AND NOT MINGW) # now compare the output with the reference @@ -110,9 +110,9 @@ if (NOT TEST_SKIP_COMPARE) ) if (NOT ${TEST_RESULT} STREQUAL 0) set (TEST_RESULT 0) - FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act) + file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act) LIST (LENGTH test_act len_act) - FILE (STRINGS ${TEST_FOLDER}/P_${TEST_REFERENCE} test_ref) + file (STRINGS ${TEST_FOLDER}/P_${TEST_REFERENCE} test_ref) LIST (LENGTH test_ref len_ref) if (NOT ${len_act} STREQUAL "0") MATH (EXPR _FP_LEN "${len_ref} - 1") diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake index 9a891e6..879426c 100644 --- a/config/cmake/runTest.cmake +++ b/config/cmake/runTest.cmake @@ -49,12 +49,12 @@ EXECUTE_PROCESS ( 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}") + 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_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n") + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n") endif (TEST_APPEND) # if the return value is !=${TEST_EXPECT} bail out @@ -65,22 +65,22 @@ endif (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT}) message (STATUS "COMMAND Error: ${TEST_ERROR}") if (TEST_MASK) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} 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}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK) if (TEST_MASK_MOD) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + 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}") - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_MASK_MOD) if (TEST_MASK_ERROR) if (NOT TEST_ERRREF) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) else (NOT TEST_ERRREF) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) endif (NOT TEST_ERRREF) STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") @@ -90,22 +90,22 @@ if (TEST_MASK_ERROR) STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") if (NOT TEST_ERRREF) - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") else (NOT TEST_ERRREF) - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}") endif (NOT TEST_ERRREF) endif (TEST_MASK_ERROR) if (TEST_FILTER) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}") - FILE (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif (TEST_FILTER) if (NOT TEST_SKIP_COMPARE) if (WIN32 AND NOT MINGW) - FILE (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) - FILE (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}") + 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 @@ -115,9 +115,9 @@ if (NOT TEST_SKIP_COMPARE) ) if (NOT ${TEST_RESULT} STREQUAL 0) set (TEST_RESULT 0) - FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act) + file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act) LIST (LENGTH test_act len_act) - FILE (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref) + file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref) LIST (LENGTH test_ref len_ref) if (NOT ${len_act} STREQUAL "0") MATH (EXPR _FP_LEN "${len_ref} - 1") @@ -146,8 +146,8 @@ if (NOT TEST_SKIP_COMPARE) if (TEST_ERRREF) if (WIN32 AND NOT MINGW) - FILE (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) - FILE (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}") + file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) + file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}") endif (WIN32 AND NOT MINGW) # now compare the error output with the error reference @@ -157,9 +157,9 @@ if (NOT TEST_SKIP_COMPARE) ) if (NOT ${TEST_RESULT} STREQUAL 0) set (TEST_RESULT 0) - FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act) + file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act) LIST (LENGTH test_act len_act) - FILE (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref) + file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref) LIST (LENGTH test_ref len_ref) MATH (EXPR _FP_LEN "${len_ref} - 1") if (NOT ${len_act} STREQUAL "0") diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake index 2b6b934..2e0740b 100644 --- a/config/cmake/userblockTest.cmake +++ b/config/cmake/userblockTest.cmake @@ -35,7 +35,7 @@ set (TEST_STRING_SIZE 0) if (TEST_CHECKUB STREQUAL "YES") # find the length of the user block to check #s1=`cat $ufile | wc -c | sed -e 's/ //g'` - FILE (STRINGS ${TEST_FOLDER}/${TEST_UFILE} TEST_U_STRING) + file (STRINGS ${TEST_FOLDER}/${TEST_UFILE} TEST_U_STRING) string (LENGTH ${TEST_U_STRING} TEST_U_STRING_LEN) # Get the size of the original user block, if any. @@ -54,7 +54,7 @@ if (TEST_CHECKUB STREQUAL "YES") if (NOT ${TEST_RESULT} STREQUAL "0") message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} ${TEST_OFILE} is: ${TEST_ERROR}") endif (NOT ${TEST_RESULT} STREQUAL "0") - FILE (READ ${TEST_HFILE}.len.txt TEST_O_STRING_LEN) + file (READ ${TEST_HFILE}.len.txt TEST_O_STRING_LEN) endif (TEST_OFILE) MATH( EXPR TEST_STRING_SIZE "${TEST_U_STRING_LEN} + ${TEST_O_STRING_LEN}" ) @@ -71,11 +71,11 @@ if (TEST_CHECKUB STREQUAL "YES") OUTPUT_STRIP_TRAILING_WHITESPACE ) #cat $ufile >> $cmpfile - FILE (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME) - FILE (APPEND ${TEST_HFILE}-ub.cmp "${TEST_STREAM}") + file (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME) + file (APPEND ${TEST_HFILE}-ub.cmp "${TEST_STREAM}") else (NOT TEST_O_STRING_LEN STREQUAL "0") - FILE (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME) - FILE (WRITE ${TEST_HFILE}-ub.cmp ${TEST_STREAM}) + file (STRINGS ${TEST_UFILE} TEST_STREAM NEWLINE_CONSUME) + file (WRITE ${TEST_HFILE}-ub.cmp ${TEST_STREAM}) endif (NOT TEST_O_STRING_LEN STREQUAL "0") #$JAM_BIN/getub -c $size $hfile > $tfile diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake index f12dee7..d3cb87e 100644 --- a/config/cmake/vfdTest.cmake +++ b/config/cmake/vfdTest.cmake @@ -36,8 +36,8 @@ EXECUTE_PROCESS ( message (STATUS "COMMAND Result: ${TEST_RESULT}") if (ERROR_APPEND) - FILE (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err TEST_STREAM) - FILE (APPEND ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out "${TEST_STREAM}") + file (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err TEST_STREAM) + file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out "${TEST_STREAM}") endif (ERROR_APPEND) # if the return value is !=${TEST_EXPECT} bail out diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake index 9f51d74..2a20fd8 100644 --- a/examples/CMakeTests.cmake +++ b/examples/CMakeTests.cmake @@ -4,7 +4,7 @@ ### T E S T I N G ### ############################################################################## ############################################################################## - FILE (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/red ${PROJECT_BINARY_DIR}/blue ${PROJECT_BINARY_DIR}/u2w) + file (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/red ${PROJECT_BINARY_DIR}/blue ${PROJECT_BINARY_DIR}/u2w) # Remove any output file left over from previous test run add_test ( diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index c0f5a03..4d8c9dd 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -8,21 +8,21 @@ endif (H5_HAVE_PARALLEL) #----------------------------------------------------------------------------- # Traverse source subdirectory #----------------------------------------------------------------------------- -ADD_SUBDIRECTORY (${HDF5_F90_SOURCE_DIR}/src ${HDF5_F90_BINARY_DIR}/src) +add_subdirectory (${HDF5_F90_SOURCE_DIR}/src ${HDF5_F90_BINARY_DIR}/src) #----------------------------------------------------------------------------- # Build the Fortran Examples #----------------------------------------------------------------------------- if (HDF5_BUILD_EXAMPLES) - ADD_SUBDIRECTORY (${HDF5_F90_SOURCE_DIR}/examples ${HDF5_F90_BINARY_DIR}/examples) + add_subdirectory (${HDF5_F90_SOURCE_DIR}/examples ${HDF5_F90_BINARY_DIR}/examples) endif (HDF5_BUILD_EXAMPLES) #----------------------------------------------------------------------------- # Testing #----------------------------------------------------------------------------- if (BUILD_TESTING) - ADD_SUBDIRECTORY (${HDF5_F90_SOURCE_DIR}/test ${HDF5_F90_BINARY_DIR}/test) + add_subdirectory (${HDF5_F90_SOURCE_DIR}/test ${HDF5_F90_BINARY_DIR}/test) if (MPI_Fortran_FOUND) - ADD_SUBDIRECTORY (${HDF5_F90_SOURCE_DIR}/testpar ${HDF5_F90_BINARY_DIR}/testpar) + add_subdirectory (${HDF5_F90_SOURCE_DIR}/testpar ${HDF5_F90_BINARY_DIR}/testpar) endif (MPI_Fortran_FOUND) endif (BUILD_TESTING) diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt index d50c62d..22c0770 100644 --- a/hl/CMakeLists.txt +++ b/hl/CMakeLists.txt @@ -20,25 +20,25 @@ endif (BUILD_SHARED_LIBS) #----------------------------------------------------------------------------- INCLUDE_DIRECTORIES (${HDF5_HL_SOURCE_DIR}/src ) -ADD_SUBDIRECTORY (${HDF5_HL_SOURCE_DIR}/src ${HDF5_HL_BINARY_DIR}/src) +add_subdirectory (${HDF5_HL_SOURCE_DIR}/src ${HDF5_HL_BINARY_DIR}/src) #-- Build the High level Tools if (HDF5_BUILD_TOOLS) - ADD_SUBDIRECTORY (${HDF5_HL_SOURCE_DIR}/tools ${HDF5_HL_BINARY_DIR}/tools) + add_subdirectory (${HDF5_HL_SOURCE_DIR}/tools ${HDF5_HL_BINARY_DIR}/tools) endif (HDF5_BUILD_TOOLS) #-- Add High Level Examples if (HDF5_BUILD_EXAMPLES) - ADD_SUBDIRECTORY (${HDF5_HL_SOURCE_DIR}/examples ${HDF5_HL_BINARY_DIR}/examples) + add_subdirectory (${HDF5_HL_SOURCE_DIR}/examples ${HDF5_HL_BINARY_DIR}/examples) endif (HDF5_BUILD_EXAMPLES) #-- Build the Unit testing if requested if (NOT HDF5_EXTERNALLY_CONFIGURED) if (BUILD_TESTING) - ADD_SUBDIRECTORY (${HDF5_HL_SOURCE_DIR}/test ${HDF5_HL_BINARY_DIR}/test) + add_subdirectory (${HDF5_HL_SOURCE_DIR}/test ${HDF5_HL_BINARY_DIR}/test) endif (BUILD_TESTING) endif (NOT HDF5_EXTERNALLY_CONFIGURED) if (HDF5_BUILD_CPP_LIB) - ADD_SUBDIRECTORY (${HDF5_HL_SOURCE_DIR}/c++ ${HDF5_HL_BINARY_DIR}/c++) + add_subdirectory (${HDF5_HL_SOURCE_DIR}/c++ ${HDF5_HL_BINARY_DIR}/c++) endif (HDF5_BUILD_CPP_LIB) diff --git a/hl/c++/CMakeLists.txt b/hl/c++/CMakeLists.txt index 386f5a6..9f0aa7e 100644 --- a/hl/c++/CMakeLists.txt +++ b/hl/c++/CMakeLists.txt @@ -4,13 +4,13 @@ PROJECT (HDF5_HL_CPP) #----------------------------------------------------------------------------- # Main HL lib is in /src #----------------------------------------------------------------------------- -ADD_SUBDIRECTORY (${HDF5_HL_CPP_SOURCE_DIR}/src ${HDF5_HL_CPP_BINARY_DIR}/src) +add_subdirectory (${HDF5_HL_CPP_SOURCE_DIR}/src ${HDF5_HL_CPP_BINARY_DIR}/src) # -------------------------------------------------------------------- # Add in the examples for the Packet Table codes # -------------------------------------------------------------------- if (HDF5_BUILD_EXAMPLES) - ADD_SUBDIRECTORY (${HDF5_HL_CPP_SOURCE_DIR}/examples ${HDF5_HL_CPP_BINARY_DIR}/examples) + add_subdirectory (${HDF5_HL_CPP_SOURCE_DIR}/examples ${HDF5_HL_CPP_BINARY_DIR}/examples) endif (HDF5_BUILD_EXAMPLES) # -------------------------------------------------------------------- @@ -18,5 +18,5 @@ endif (HDF5_BUILD_EXAMPLES) # -------------------------------------------------------------------- if (BUILD_TESTING) - ADD_SUBDIRECTORY (${HDF5_HL_CPP_SOURCE_DIR}/test ${HDF5_HL_CPP_BINARY_DIR}/test) + add_subdirectory (${HDF5_HL_CPP_SOURCE_DIR}/test ${HDF5_HL_CPP_BINARY_DIR}/test) endif (BUILD_TESTING) diff --git a/hl/fortran/CMakeLists.txt b/hl/fortran/CMakeLists.txt index 72fc7a8..c26d94c 100644 --- a/hl/fortran/CMakeLists.txt +++ b/hl/fortran/CMakeLists.txt @@ -4,18 +4,18 @@ PROJECT (HDF5_HL_F90 C CXX Fortran) #----------------------------------------------------------------------------- # List Source files #----------------------------------------------------------------------------- -ADD_SUBDIRECTORY (${HDF5_HL_F90_SOURCE_DIR}/src ${HDF5_HL_F90_BINARY_DIR}/src) +add_subdirectory (${HDF5_HL_F90_SOURCE_DIR}/src ${HDF5_HL_F90_BINARY_DIR}/src) #----------------------------------------------------------------------------- # Build the HL Fortran Examples #----------------------------------------------------------------------------- if (HDF5_BUILD_FORTRAN_EXAMPLES) - ADD_SUBDIRECTORY (${HDF5_HL_F90_SOURCE_DIR}/examples ${HDF5_HL_F90_BINARY_DIR}/examples) + add_subdirectory (${HDF5_HL_F90_SOURCE_DIR}/examples ${HDF5_HL_F90_BINARY_DIR}/examples) endif (HDF5_BUILD_FORTRAN_EXAMPLES) #----------------------------------------------------------------------------- # Testing #----------------------------------------------------------------------------- if (BUILD_TESTING) - ADD_SUBDIRECTORY (${HDF5_HL_F90_SOURCE_DIR}/test ${HDF5_HL_F90_BINARY_DIR}/test) + add_subdirectory (${HDF5_HL_F90_SOURCE_DIR}/test ${HDF5_HL_F90_BINARY_DIR}/test) endif (BUILD_TESTING) diff --git a/hl/tools/CMakeTests.cmake b/hl/tools/CMakeTests.cmake index 7c5bd77..a340c2d 100644 --- a/hl/tools/CMakeTests.cmake +++ b/hl/tools/CMakeTests.cmake @@ -6,7 +6,7 @@ ############################################################################## # Make testfiles dir under build dir -FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") +file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") # # copy test files from source to build dir diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b7f87b4..dcbe9d4 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -46,8 +46,8 @@ set_target_properties (${HDF5_TEST_LIB_TARGET} PROPERTIES #----------------------------------------------------------------------------- if (BUILD_SHARED_LIBS) # make plugins dir - FILE (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir1") - FILE (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir2") + file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir1") + file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/testdir2") #----------------------------------------------------------------------------- # Define Test Library Sources @@ -294,7 +294,7 @@ set_target_properties (links_env PROPERTIES FOLDER test) #-- Adding test for libinfo set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake) file (WRITE ${GREP_RUNNER} - "FILE (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\") + "file (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\") if (\${TEST_RESULT} STREQUAL \"0\") message (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\") else (\${TEST_RESULT} STREQUAL \"0\") diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index a9a7232..27820ae 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -15,32 +15,32 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SOURCE_DIR}/lib) # If testing was NOT enabled, then we need to build the tools library # -------------------------------------------------------------------- if (NOT BUILD_TESTING) - ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/lib) + add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/lib) endif (NOT BUILD_TESTING) #-- Add the h5diff and test executables -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5diff) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5diff) #-- Add the h5ls executable -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5ls) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5ls) #-- Misc Executables -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/misc) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/misc) #-- Add the h5import and test executables -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5import) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5import) #-- h5Repack executables -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5repack) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5repack) #-- Add the h5dump and test executables -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5jam) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5jam) #-- Add the h5copy and test executables -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5copy) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5copy) #-- Add the h5stat and test executables -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5stat) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5stat) #-- Add the h5dump and test executables -ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/h5dump) +add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5dump) diff --git a/tools/h5copy/CMakeTests.cmake b/tools/h5copy/CMakeTests.cmake index 34976fe..77399a8 100644 --- a/tools/h5copy/CMakeTests.cmake +++ b/tools/h5copy/CMakeTests.cmake @@ -19,7 +19,7 @@ ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_misc1.out ) - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) GET_FILENAME_COMPONENT(fname "${listfiles}" NAME) diff --git a/tools/h5diff/CMakeTests.cmake b/tools/h5diff/CMakeTests.cmake index 8bae2ca..19a5fe4 100644 --- a/tools/h5diff/CMakeTests.cmake +++ b/tools/h5diff/CMakeTests.cmake @@ -234,7 +234,7 @@ ) # Make testfiles dir under build dir - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") # # copy test files from source to build dir diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake index 433faa3..bb2a37e 100644 --- a/tools/h5dump/CMakeTests.cmake +++ b/tools/h5dump/CMakeTests.cmake @@ -307,7 +307,7 @@ ) # make test dir - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") # # copy test files from source dir to test dir @@ -326,8 +326,8 @@ foreach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES}) if (WIN32 AND NOT CYGWIN) - FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} TEST_STREAM) - FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}") + file (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} TEST_STREAM) + file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}") else (WIN32 AND NOT CYGWIN) add_custom_command ( TARGET h5dump @@ -373,8 +373,8 @@ ) if (WIN32 AND NOT CYGWIN) - FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM) - FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}") + file (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM) + file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}") else (WIN32 AND NOT CYGWIN) add_custom_command ( TARGET h5dump diff --git a/tools/h5import/CMakeTests.cmake b/tools/h5import/CMakeTests.cmake index 2adbdde..5c5b4de 100644 --- a/tools/h5import/CMakeTests.cmake +++ b/tools/h5import/CMakeTests.cmake @@ -61,7 +61,7 @@ textpfe.h5 ) - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") foreach (conf_file ${HDF5_REFERENCE_CONF_FILES}) set (dest "${PROJECT_BINARY_DIR}/testfiles/${conf_file}") #message (STATUS " Copying ${conf_file}") diff --git a/tools/h5jam/CMakeTests.cmake b/tools/h5jam/CMakeTests.cmake index 4b71d7f..7be6934 100644 --- a/tools/h5jam/CMakeTests.cmake +++ b/tools/h5jam/CMakeTests.cmake @@ -20,7 +20,7 @@ twithub513.h5 ) - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}") #message (STATUS " Copying ${h5_file}") @@ -255,7 +255,7 @@ set_tests_properties (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM) endif (NOT "${compare_test}" STREQUAL "") - CHECKFILE (${testname} "H5JAM-${testname}-UNJAM-CHECK_NOUB" ${chkfile} ${outfile}) + CHECKfile (${testname} "H5JAM-${testname}-UNJAM-CHECK_NOUB" ${chkfile} ${outfile}) endif (NOT HDF5_ENABLE_USING_MEMCHECKER) ENDMACRO(UNJAMTEST testname infile ufile outfile) @@ -298,7 +298,7 @@ -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake" ) set_tests_properties (H5JAM-${testname}-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-CHECK_UB_1-clear-objects) - CHECKFILE (${testname} "H5JAM-${testname}-CHECK_UB_1" ${chkfile} ${outfile}) + CHECKfile (${testname} "H5JAM-${testname}-CHECK_UB_1" ${chkfile} ${outfile}) endif (NOT HDF5_ENABLE_USING_MEMCHECKER) ENDMACRO (JAMTEST testname jamfile infile outfile) @@ -353,7 +353,7 @@ -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake" ) set_tests_properties (H5JAM-${testname}_NONE-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects) - CHECKFILE (${testname} "H5JAM-${testname}_NONE-CHECK_UB_1" ${infile} ${chkfile}) + CHECKfile (${testname} "H5JAM-${testname}_NONE-CHECK_UB_1" ${infile} ${chkfile}) endif (NOT HDF5_ENABLE_USING_MEMCHECKER) ENDMACRO (JAMTEST_NONE testname jamfile infile setfile chkfile) diff --git a/tools/h5ls/CMakeTests.cmake b/tools/h5ls/CMakeTests.cmake index eb68d79..b739130 100644 --- a/tools/h5ls/CMakeTests.cmake +++ b/tools/h5ls/CMakeTests.cmake @@ -92,7 +92,7 @@ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2be.ls ) - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") # copy the list of test files foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES}) diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt index 4625607..4d26c0c 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.10) +cmake_minimum_required (VERSION 2.8.11) PROJECT (HDF5_TOOLS_H5REPACK) #----------------------------------------------------------------------------- @@ -54,7 +54,7 @@ if (BUILD_TESTING) add_definitions (${HDF5_EXTRA_C_FLAGS}) INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) - add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SRC_DIR}/dynlib1.c) + add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${LIB_TYPE} dynlib_rpk.c) TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} " " " ") target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS ( @@ -65,7 +65,7 @@ if (BUILD_TESTING) ) # make plugins dir - FILE (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") + file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") #----------------------------------------------------------------------------- # Copy plugin library to a plugins folder #----------------------------------------------------------------------------- diff --git a/tools/h5repack/dynlib_rpk.c b/tools/h5repack/dynlib_rpk.c new file mode 100644 index 0000000..1ccc33a --- /dev/null +++ b/tools/h5repack/dynlib_rpk.c @@ -0,0 +1,97 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright by The HDF Group. * + * All rights reserved. * + * * + * This file is part of HDF5. The full HDF5 copyright notice, including * + * terms governing use, modification, and redistribution, is contained in * + * the files COPYING and Copyright.html. COPYING can be found at the root * + * of the source code distribution tree; Copyright.html can be found at the * + * root level of an installed copy of the electronic document set and is * + * linked from the top-level documents page. It can also be found at * + * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * + * to either file, you may request a copy from help@hdfgroup.org. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* + * Programmer: Raymond Lu + * 13 February 2013 + * + * Purpose: Tests the plugin module (H5PL) + */ + +#include <stdlib.h> +#include <stdio.h> +#include "H5PLextern.h" + +#define H5Z_FILTER_DYNLIB1 257 + +static size_t H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts, + const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); + +/* This message derives from H5Z */ +const H5Z_class2_t H5Z_DYNLIB1[1] = {{ + H5Z_CLASS_T_VERS, /* H5Z_class_t version */ + H5Z_FILTER_DYNLIB1, /* Filter id number */ + 1, 1, /* Encoding and decoding enabled */ + "dynlib1", /* Filter name for debugging */ + NULL, /* The "can apply" callback */ + NULL, /* The "set local" callback */ + (H5Z_func_t)H5Z_filter_dynlib1, /* The actual filter function */ +}}; + +H5PL_type_t H5PLget_plugin_type(void) {return H5PL_TYPE_FILTER;} +const void *H5PLget_plugin_info(void) {return H5Z_DYNLIB1;} + +/*------------------------------------------------------------------------- + * Function: H5Z_filter_dynlib1 + * + * Purpose: A dynlib1 filter method that adds on and subtract from + * the original value with another value. It will be built + * as a shared library. plugin.c test will load and use + * this filter library. + * + * Return: Success: Data chunk size + * + * Failure: 0 + * + * Programmer: Raymond Lu + * 29 March 2013 + * + *------------------------------------------------------------------------- + */ +static size_t +H5Z_filter_dynlib1(unsigned int flags, size_t cd_nelmts, + const unsigned int *cd_values, size_t nbytes, + size_t *buf_size, void **buf) +{ + int *int_ptr = (int *)*buf; /* Pointer to the data values */ + size_t buf_left = *buf_size; /* Amount of data buffer left to process */ + int add_on = 0; + + /* Check for the correct number of parameters */ + if(cd_nelmts == 0) + return(0); + + /* Check that permanent parameters are set correctly */ + if(cd_values[0] > 9) + return(0); + + add_on = (int)cd_values[0]; + + if(flags & H5Z_FLAG_REVERSE) { /*read*/ + /* Substract the "add on" value to all the data values */ + while(buf_left > 0) { + *int_ptr++ -= add_on; + buf_left -= sizeof(int); + } /* end while */ + } /* end if */ + else { /*write*/ + /* Add the "add on" value to all the data values */ + while(buf_left > 0) { + *int_ptr++ += add_on; + buf_left -= sizeof(int); + } /* end while */ + } /* end else */ + + return nbytes; +} /* end H5Z_filter_dynlib1() */ + diff --git a/tools/misc/CMakeTests.cmake b/tools/misc/CMakeTests.cmake index a935c2b..468ff3a 100644 --- a/tools/misc/CMakeTests.cmake +++ b/tools/misc/CMakeTests.cmake @@ -58,7 +58,7 @@ ) # make test dir - FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") foreach (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES}) set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}") |