diff options
Diffstat (limited to 'tools/h5copy')
-rw-r--r-- | tools/h5copy/CMakeLists.txt | 52 | ||||
-rw-r--r-- | tools/h5copy/h5copy.c | 2 |
2 files changed, 39 insertions, 15 deletions
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index 61f5ef3..b9dad2d 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -4,7 +4,7 @@ PROJECT (HDF5_TOOLS_H5COPY) #----------------------------------------------------------------------------- # Setup include Directories #----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_TOOLS_SOURCE_DIR}/lib) +INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test) # -------------------------------------------------------------------- @@ -26,8 +26,14 @@ TARGET_LINK_LIBRARIES (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) SET (H5_DEP_EXECUTABLES h5copy) +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## + IF (BUILD_TESTING) - IF (NOT BUILD_SHARED_LIBS) + IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) ADD_EXECUTABLE (h5copygentest ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copygentest.c) H5_NAMING (h5copygentest) IF (WIN32) @@ -41,13 +47,11 @@ IF (BUILD_TESTING) TARGET_LINK_LIBRARIES (h5copygentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) #ADD_TEST (NAME h5copygentest COMMAND $<TARGET_FILE:h5copygentest>) - - SET (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} - #h5copygentest - ) - ENDIF (NOT BUILD_SHARED_LIBS) + ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) - #-- Copy all the HDF5 files from the test directory into the source directory + # -------------------------------------------------------------------- + # Copy all the HDF5 files from the test directory into the source directory + # -------------------------------------------------------------------- SET (HDF5_REFERENCE_FILES h5copy_extlinks_src.out.ls h5copy_ref.out.ls @@ -82,12 +86,12 @@ IF (BUILD_TESTING) ARGS -E copy_if_different ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/${h5_file} ${dest} ) ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES}) - - # Test files - SET (HDF_FILE1 h5copytst) - SET (HDF_FILE2 h5copy_ref) - SET (HDF_EXT_SRC_FILE h5copy_extlinks_src) - SET (HDF_EXT_TRG_FILE h5copy_extlinks_trg) + +############################################################################## +############################################################################## +### T H E T E S T S M A C R O S ### +############################################################################## +############################################################################## MACRO (ADD_H5_TEST testname resultcode testfile vparam srcname dstname) @@ -129,6 +133,20 @@ IF (BUILD_TESTING) ) ENDMACRO (ADD_H5LS_TEST file) +############################################################################## +############################################################################## +### T H E T E S T S ### +############################################################################## +############################################################################## + + # -------------------------------------------------------------------- + # test file names + # -------------------------------------------------------------------- + SET (HDF_FILE1 h5copytst) + SET (HDF_FILE2 h5copy_ref) + SET (HDF_EXT_SRC_FILE h5copy_extlinks_src) + SET (HDF_EXT_TRG_FILE h5copy_extlinks_trg) + ############# COPY OBJECTS ############## # Remove any output file left over from previous test run @@ -236,6 +254,12 @@ IF (BUILD_TESTING) ENDIF (BUILD_TESTING) +############################################################################## +############################################################################## +### I N S T A L L A T I O N ### +############################################################################## +############################################################################## + #-----------------------------------------------------------------------------
# Rules for Installation of tools using make Install target
#-----------------------------------------------------------------------------
diff --git a/tools/h5copy/h5copy.c b/tools/h5copy/h5copy.c index 89cb5fb..d850f85 100644 --- a/tools/h5copy/h5copy.c +++ b/tools/h5copy/h5copy.c @@ -416,7 +416,7 @@ main (int argc, const char *argv[]) if(verbose) linkinfo.opt.msg_mode = 1; - li_ret = H5tools_get_link_info(fid_src, oname_src, &linkinfo); + li_ret = H5tools_get_link_info(fid_src, oname_src, &linkinfo, 1); if (li_ret == 0) /* dangling link */ { if(H5Lcopy(fid_src, oname_src, |