diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5copy/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tools/h5diff/CMakeLists.txt | 8 | ||||
-rw-r--r-- | tools/h5dump/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tools/h5dump/CMakeTests.cmake | 20 | ||||
-rw-r--r-- | tools/h5dump/binread.c | 66 | ||||
-rw-r--r-- | tools/h5dump/h5dump_xml.c | 2 | ||||
-rw-r--r-- | tools/h5dump/testh5dump.sh.in | 17 | ||||
-rw-r--r-- | tools/h5import/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tools/h5jam/CMakeLists.txt | 10 | ||||
-rw-r--r-- | tools/h5ls/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tools/h5ls/h5ls.c | 6 | ||||
-rw-r--r-- | tools/h5repack/CMakeLists.txt | 12 | ||||
-rw-r--r-- | tools/h5repack/CMakeTests.cmake | 134 | ||||
-rw-r--r-- | tools/h5repack/h5repack.sh.in | 8 | ||||
-rw-r--r-- | tools/h5repack/testfiles/README | 5 | ||||
-rw-r--r-- | tools/h5repack/testfiles/h5repack_nested_8bit_enum.h5 | bin | 0 -> 273992 bytes | |||
-rw-r--r-- | tools/h5repack/testfiles/h5repack_nested_8bit_enum_deflated.h5 | bin | 0 -> 120630 bytes | |||
-rw-r--r-- | tools/h5stat/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tools/lib/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tools/lib/h5tools_str.c | 2 | ||||
-rw-r--r-- | tools/lib/h5tools_utils.h | 6 | ||||
-rw-r--r-- | tools/misc/CMakeLists.txt | 12 | ||||
-rw-r--r-- | tools/perform/CMakeLists.txt | 30 |
23 files changed, 150 insertions, 216 deletions
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index 8c27536..7291197 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -11,7 +11,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # -------------------------------------------------------------------- add_executable (h5copy ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copy.c) TARGET_NAMING (h5copy ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5copy " " " ") +TARGET_C_PROPERTIES (h5copy ${LIB_TYPE} " " " ") target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5copy PROPERTIES FOLDER tools) @@ -20,8 +20,8 @@ set (H5_DEP_EXECUTABLES h5copy) if (BUILD_TESTING) if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) add_executable (h5copygentest ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copygentest.c) - TARGET_NAMING (h5copygentest ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5copygentest " " " ") + TARGET_NAMING (h5copygentest STATIC) + TARGET_C_PROPERTIES (h5copygentest STATIC " " " ") target_link_libraries (h5copygentest ${HDF5_LIB_TARGET}) set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools) diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt index f539d20..39095a5 100644 --- a/tools/h5diff/CMakeLists.txt +++ b/tools/h5diff/CMakeLists.txt @@ -14,7 +14,7 @@ add_executable (h5diff ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_main.c ) TARGET_NAMING (h5diff ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5diff " " " ") +TARGET_C_PROPERTIES (h5diff ${LIB_TYPE} " " " ") target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5diff PROPERTIES FOLDER tools) @@ -26,7 +26,7 @@ if (H5_HAVE_PARALLEL) ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/ph5diff_main.c ) TARGET_NAMING (ph5diff ${LIB_TYPE}) - TARGET_C_PROPERTIES (ph5diff " " " ") + TARGET_C_PROPERTIES (ph5diff ${LIB_TYPE} " " " ") target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (ph5diff PROPERTIES FOLDER tools) endif (H5_HAVE_PARALLEL) @@ -37,8 +37,8 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) add_executable (h5diffgentest ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diffgentest.c) - TARGET_NAMING (h5diffgentest ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5diffgentest " " " ") + TARGET_NAMING (h5diffgentest STATIC) + TARGET_C_PROPERTIES (h5diffgentest STATIC " " " ") target_link_libraries (h5diffgentest ${HDF5_LIB_TARGET}) set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools) diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 4559ae3..7658c04 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -15,7 +15,7 @@ add_executable (h5dump ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_xml.c ) TARGET_NAMING (h5dump ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5dump " " " ") +TARGET_C_PROPERTIES (h5dump ${LIB_TYPE} " " " ") target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5dump PROPERTIES FOLDER tools) @@ -27,8 +27,8 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) add_executable (h5dumpgentest ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dumpgentest.c) - TARGET_NAMING (h5dumpgentest ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5dumpgentest " " " ") + TARGET_NAMING (h5dumpgentest STATIC) + TARGET_C_PROPERTIES (h5dumpgentest STATIC " " " ") target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools) diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake index afb482e..00ec760 100644 --- a/tools/h5dump/CMakeTests.cmake +++ b/tools/h5dump/CMakeTests.cmake @@ -1340,30 +1340,14 @@ set (USE_FILTER_SZIP "true") endif (H5_HAVE_FILTER_SZIP) - if (H5_HAVE_FILTER_SHUFFLE) - set (USE_FILTER_SHUFFLE "true") - endif (H5_HAVE_FILTER_SHUFFLE) - - if (H5_HAVE_FILTER_FLETCHER32) - set (USE_FILTER_FLETCHER32 "true") - endif (H5_HAVE_FILTER_FLETCHER32) - - if (H5_HAVE_FILTER_NBIT) - set (USE_FILTER_NBIT "true") - endif (H5_HAVE_FILTER_NBIT) - - if (H5_HAVE_FILTER_SCALEOFFSET) - set (USE_FILTER_SCALEOFFSET "true") - endif (H5_HAVE_FILTER_SCALEOFFSET) - - if (USE_FILTER_DEFLATE AND USE_FILTER_SHUFFLE AND USE_FILTER_FLETCHER32 AND USE_FILTER_NBIT AND USE_FILTER_SCALEOFFSET) + if (USE_FILTER_DEFLATE) # data read internal filters ADD_H5_TEST (treadintfilter 0 --enable-error-stack -d deflate -d shuffle -d fletcher32 -d nbit -d scaleoffset tfilters.h5) if (HDF5_ENABLE_SZIP_SUPPORT) # data read all filters ADD_H5_TEST (treadfilter 0 --enable-error-stack -d all -d szip tfilters.h5) endif (HDF5_ENABLE_SZIP_SUPPORT) - endif (USE_FILTER_DEFLATE AND USE_FILTER_SHUFFLE AND USE_FILTER_FLETCHER32 AND USE_FILTER_NBIT AND USE_FILTER_SCALEOFFSET) + endif (USE_FILTER_DEFLATE) # test for displaying objects with very long names ADD_H5_TEST (tlonglinks 0 --enable-error-stack tlonglinks.h5) diff --git a/tools/h5dump/binread.c b/tools/h5dump/binread.c index 5abb9af..74db92c 100644 --- a/tools/h5dump/binread.c +++ b/tools/h5dump/binread.c @@ -49,8 +49,7 @@ static void usage (void) { - fprintf(stderr, "\ - usage: binread FILE_NAME\n"); + fprintf(stderr, "usage: binread FILE_NAME\n"); } /*------------------------------------------------------------------------- @@ -64,38 +63,35 @@ usage (void) int main (int argc, const char *argv[]) { - FILE *stream; - int numread; - TYPE buf[NELMTS]; - size_t i, nelmts = NELMTS; - char *fname=NULL; - - if (argc != 2) - { - usage(); - exit(1); - } - - fname = strdup(argv[1]); - - if( (stream = fopen(fname, "rb" )) != NULL ) - { - numread = fread( buf, sizeof( TYPE ), nelmts, stream ); - printf( "Number of items read = %d\n", numread ); - - for (i = 0; i < nelmts; i++) - { - printf(FORMAT,buf[i]); - } - printf("\n"); - - fclose( stream ); - } - else - printf( "File %s could not be opened\n",fname ); - - free(fname); - - return 0; + FILE *stream; + size_t numread; + TYPE buf[NELMTS]; + size_t i, nelmts = NELMTS; + char *fname=NULL; + + if (argc != 2) { + usage(); + exit(1); + } + + fname = strdup(argv[1]); + + if((stream = fopen(fname, "rb")) != NULL) { + numread = fread(buf, sizeof( TYPE ), nelmts, stream); + printf("Number of items read = %llu\n", (unsigned long long)numread); + + for (i = 0; i < nelmts; i++) { + printf(FORMAT,buf[i]); + } + printf("\n"); + + fclose(stream); + } + else + printf("File %s could not be opened\n", fname); + + free(fname); + + return 0; } diff --git a/tools/h5dump/h5dump_xml.c b/tools/h5dump/h5dump_xml.c index 64667cb..6ccbc8c 100644 --- a/tools/h5dump/h5dump_xml.c +++ b/tools/h5dump/h5dump_xml.c @@ -3563,7 +3563,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type) /* Render the element */ h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "\"%f\"", *(float *) buf); + h5tools_str_append(&buffer, "\"%f\"", (double)*(float *)buf); h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0); ctx.need_prefix = TRUE; diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 36f12a0..95f8091 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -436,8 +436,21 @@ TESTING() { # the actual output file is calculated by replacing the `.ddl' with # `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a # non-zero value. +# If $1 == ignorecase then do caseless CMP and DIFF. # ADD_H5_TEST TOOLTEST() { + # check if caseless compare and diff requested + if [ "$1" = ignorecase ]; then + caseless="-i" + # replace cmp with diff which runs much longer. + xCMP="$DIFF -i" + shift + else + caseless="" + # stick with faster cmp if ignorecase is not requested. + xCMP="$CMP" + fi + expect="$TESTDIR/$1" actual="$TESTDIR/`basename $1 .ddl`.out" actual_err="$TESTDIR/`basename $1 .ddl`.err" @@ -463,13 +476,13 @@ TOOLTEST() { # Create the expect file if it doesn't yet exist. echo " CREATED" cp $actual $expect - elif $CMP $expect $actual; then + elif $xCMP $expect $actual > /dev/null 2>&1 ; then echo " PASSED" else echo "*FAILED*" echo " Expected result (*.ddl) differs from actual result (*.out)" nerrors="`expr $nerrors + 1`" - test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /' fi # Clean up output file diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index 2ba2b78..bf1515e 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -11,7 +11,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # -------------------------------------------------------------------- add_executable (h5import ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c) TARGET_NAMING (h5import ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5import " " " ") +TARGET_C_PROPERTIES (h5import ${LIB_TYPE} " " " ") target_link_libraries (h5import ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) #set_target_properties (h5import PROPERTIES COMPILE_DEFINITIONS H5DEBUGIMPORT) set_target_properties (h5import PROPERTIES FOLDER tools) @@ -24,7 +24,7 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- add_executable (h5importtest ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5importtest.c) TARGET_NAMING (h5importtest ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5importtest " " " ") + TARGET_C_PROPERTIES (h5importtest ${LIB_TYPE} " " " ") target_link_libraries (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5importtest PROPERTIES FOLDER tools) diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt index 412a2f0..4498132 100644 --- a/tools/h5jam/CMakeLists.txt +++ b/tools/h5jam/CMakeLists.txt @@ -11,25 +11,25 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # -------------------------------------------------------------------- add_executable (h5jam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jam.c) TARGET_NAMING (h5jam ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5jam " " " ") +TARGET_C_PROPERTIES (h5jam ${LIB_TYPE} " " " ") target_link_libraries (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5jam PROPERTIES FOLDER tools) add_executable (getub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/getub.c) TARGET_NAMING (getub ${LIB_TYPE}) -TARGET_C_PROPERTIES (getub " " " ") +TARGET_C_PROPERTIES (getub ${LIB_TYPE} " " " ") target_link_libraries (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (getub PROPERTIES FOLDER tools) add_executable (tellub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/tellub.c) TARGET_NAMING (tellub ${LIB_TYPE}) -TARGET_C_PROPERTIES (tellub " " " ") +TARGET_C_PROPERTIES (tellub ${LIB_TYPE} " " " ") target_link_libraries (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (tellub PROPERTIES FOLDER tools) add_executable (h5unjam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5unjam.c) TARGET_NAMING (h5unjam ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5unjam " " " ") +TARGET_C_PROPERTIES (h5unjam ${LIB_TYPE} " " " ") target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5unjam PROPERTIES FOLDER tools) @@ -47,7 +47,7 @@ if (BUILD_TESTING) if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) add_executable (h5jamgentest ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jamgentest.c) TARGET_NAMING (h5jamgentest ${LIB_TYPE}) - TARGET_C_PROPERTIES (testhdf5 " " " ") + TARGET_C_PROPERTIES (testhdf5 ${LIB_TYPE} " " " ") target_link_libraries (h5jamgentest ${HDF5_LIB_TARGET}) set_target_properties (h5jamgentest PROPERTIES FOLDER generator/tools) diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index 0d163ce..984b36b 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -11,7 +11,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) #----------------------------------------------------------------------------- add_executable (h5ls ${HDF5_TOOLS_H5LS_SOURCE_DIR}/h5ls.c) TARGET_NAMING (h5ls ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5ls " " " ") +TARGET_C_PROPERTIES (h5ls ${LIB_TYPE} " " " ") target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5ls PROPERTIES FOLDER tools) diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index d0dd216..96bd8d0 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1855,17 +1855,17 @@ dataset_list2(hid_t dset, const char UNUSED *name) for (i=0, total=0; i<nf; i++) { if (H5Pget_external(dcpl, (unsigned)i, sizeof(f_name), f_name, &f_offset, &f_size)<0) { h5tools_str_append(&buffer, - " #%03d %10"HSIZE_T_FORMAT"u %10s %10s ***ERROR*** %s\n", + " #%03d %10"H5_PRINTF_LL_WIDTH"u %10s %10s ***ERROR*** %s\n", i, total, "", "", i+1<nf?"Following addresses are incorrect":""); } else if (H5S_UNLIMITED==f_size) { - h5tools_str_append(&buffer, " #%03d %10"HSIZE_T_FORMAT"u %10"HSIZE_T_FORMAT"u %10s ", + h5tools_str_append(&buffer, " #%03d %10"H5_PRINTF_LL_WIDTH"u %10"H5_PRINTF_LL_WIDTH"u %10s ", i, total, (hsize_t)f_offset, "INF"); print_string(&buffer, f_name, TRUE); } else { - h5tools_str_append(&buffer, " #%03d %10"HSIZE_T_FORMAT"u %10"HSIZE_T_FORMAT"u %10"HSIZE_T_FORMAT"u ", + h5tools_str_append(&buffer, " #%03d %10"H5_PRINTF_LL_WIDTH"u %10"H5_PRINTF_LL_WIDTH"u %10"H5_PRINTF_LL_WIDTH"u ", i, total, (hsize_t)f_offset, f_size); print_string(&buffer, f_name, TRUE); } diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt index f6c3050..42d9f3d 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -22,7 +22,7 @@ set (REPACK_COMMON_SRCS add_executable (h5repack ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c) TARGET_NAMING (h5repack ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5repack " " " ") +TARGET_C_PROPERTIES (h5repack ${LIB_TYPE} " " " ") target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5repack PROPERTIES FOLDER tools) @@ -34,13 +34,13 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- add_executable (testh5repack_detect_szip ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testh5repack_detect_szip.c) TARGET_NAMING (testh5repack_detect_szip ${LIB_TYPE}) - TARGET_C_PROPERTIES (testh5repack_detect_szip " " " ") + TARGET_C_PROPERTIES (testh5repack_detect_szip ${LIB_TYPE} " " " ") target_link_libraries (testh5repack_detect_szip ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (testh5repack_detect_szip PROPERTIES FOLDER tools) add_executable (h5repacktest ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repacktst.c) TARGET_NAMING (h5repacktest ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5repacktest " " " ") + TARGET_C_PROPERTIES (h5repacktest ${LIB_TYPE} " " " ") target_link_libraries (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5repacktest PROPERTIES FOLDER tools) @@ -54,12 +54,12 @@ if (BUILD_TESTING) add_definitions (${HDF_EXTRA_C_FLAGS}) INCLUDE_DIRECTORIES (${HDF5_SRC_DIR}) - add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${LIB_TYPE} dynlib_rpk.c) - TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} " " " ") + add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED dynlib_rpk.c) + TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} SHARED " " " ") target_link_libraries (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) H5_SET_LIB_OPTIONS ( ${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TOOL_PLUGIN_LIB_NAME} - ${LIB_TYPE} + SHARED HDF5_TOOL_PLUGIN_LIB_NAME_RELEASE HDF5_TOOL_PLUGIN_LIB_NAME_DEBUG ) diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake index 220c871..efaa6e5 100644 --- a/tools/h5repack/CMakeTests.cmake +++ b/tools/h5repack/CMakeTests.cmake @@ -341,7 +341,7 @@ ENDMACRO (ADD_H5_TEST_META) MACRO (ADD_H5_UD_TEST testname resultcode resultfile) - if (HDF5_BUILD_TOOLS AND NOT HDF5_ENABLE_USING_MEMCHECKER) + if (NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( NAME H5REPACK_UD-${testname}-clearall-objects @@ -382,7 +382,7 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5REPACK_UD-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_UD-${testname}") - endif (HDF5_BUILD_TOOLS AND NOT HDF5_ENABLE_USING_MEMCHECKER) + endif (NOT HDF5_ENABLE_USING_MEMCHECKER) ENDMACRO (ADD_H5_UD_TEST) ############################################################################## @@ -649,22 +649,6 @@ set (USE_FILTER_SZIP "true") endif (H5_HAVE_FILTER_SZIP) - if (H5_HAVE_FILTER_SHUFFLE) - set (USE_FILTER_SHUFFLE "true") - endif (H5_HAVE_FILTER_SHUFFLE) - - if (H5_HAVE_FILTER_FLETCHER32) - set (USE_FILTER_FLETCHER32 "true") - endif (H5_HAVE_FILTER_FLETCHER32) - - if (H5_HAVE_FILTER_NBIT) - set (USE_FILTER_NBIT "true") - endif (H5_HAVE_FILTER_NBIT) - - if (H5_HAVE_FILTER_SCALEOFFSET) - set (USE_FILTER_SCALEOFFSET "true") - endif (H5_HAVE_FILTER_SCALEOFFSET) - # copy files (these files have no filters) ADD_H5_TEST (fill "TEST" ${FILE0}) ADD_H5_TEST (objs "TEST" ${FILE1}) @@ -709,42 +693,26 @@ # shuffle with individual object set (arg ${FILE4} -f dset2:SHUF -l dset2:CHUNK=20x10) - set (TESTTYPE "TEST") - if (NOT USE_FILTER_SHUFFLE) - set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_SHUFFLE) - ADD_H5_TEST (shuffle_individual ${TESTTYPE} ${arg}) + ADD_H5_TEST (shuffle_individual "TEST" ${arg}) # shuffle for all set (arg ${FILE4} -f SHUF) - set (TESTTYPE "TEST") - if (NOT USE_FILTER_SHUFFLE) - set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_SHUFFLE) - ADD_H5_TEST (shuffle_all ${TESTTYPE} ${arg}) + ADD_H5_TEST (shuffle_all "TEST" ${arg}) # fletcher32 with individual object set (arg ${FILE4} -f dset2:FLET -l dset2:CHUNK=20x10) - set (TESTTYPE "TEST") - if (NOT USE_FILTER_FLETCHER32) - set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_FLETCHER32) - ADD_H5_TEST (fletcher_individual ${TESTTYPE} ${arg}) + ADD_H5_TEST (fletcher_individual "TEST" ${arg}) # fletcher32 for all set (arg ${FILE4} -f FLET) - set (TESTTYPE "TEST") - if (NOT USE_FILTER_FLETCHER32) - set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_FLETCHER32) - ADD_H5_TEST (fletcher_all ${TESTTYPE} ${arg}) + ADD_H5_TEST (fletcher_all "TEST" ${arg}) # all filters set (arg ${FILE4} -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10) set (TESTTYPE "TEST") - if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE) + if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE) set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE) + endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE) ADD_H5_TEST (all_filters ${TESTTYPE} ${arg}) # verbose gzip with individual object @@ -793,90 +761,50 @@ # shuffle copy set (arg ${FILE9}) - set (TESTTYPE "TEST") - if (NOT USE_FILTER_SHUFFLE) - set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_SHUFFLE) - ADD_H5_TEST (shuffle_copy ${TESTTYPE} ${arg}) + ADD_H5_TEST (shuffle_copy "TEST" ${arg}) # shuffle remove set (arg ${FILE9} -f dset_shuffle:NONE) - set (TESTTYPE "TEST") - if (NOT USE_FILTER_SHUFFLE) - set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_SHUFFLE) - ADD_H5_TEST (shuffle_remove ${TESTTYPE} ${arg}) + ADD_H5_TEST (shuffle_remove "TEST" ${arg}) # fletcher32 copy set (arg ${FILE10}) - set (TESTTYPE "TEST") - if (NOT USE_FILTER_FLETCHER32) - set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_FLETCHER32) - ADD_H5_TEST (fletcher_copy ${TESTTYPE} ${arg}) + ADD_H5_TEST (fletcher_copy "TEST" ${arg}) # fletcher32 remove set (arg ${FILE10} -f dset_fletcher32:NONE) - set (TESTTYPE "TEST") - if (NOT USE_FILTER_FLETCHER32) - set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_FLETCHER32) - ADD_H5_TEST (fletcher_remove ${TESTTYPE} ${arg}) + ADD_H5_TEST (fletcher_remove "TEST" ${arg}) # nbit copy set (arg ${FILE12}) - set (TESTTYPE "TEST") - if (NOT USE_FILTER_NBIT) - set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_NBIT) - ADD_H5_TEST (nbit_copy ${TESTTYPE} ${arg}) + ADD_H5_TEST (nbit_copy "TEST" ${arg}) # nbit remove set (arg ${FILE12} -f dset_nbit:NONE) - set (TESTTYPE "TEST") - if (NOT USE_FILTER_NBIT) - set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_NBIT) - ADD_H5_TEST (nbit_remove ${TESTTYPE} ${arg}) + ADD_H5_TEST (nbit_remove "TEST" ${arg}) # nbit add set (arg ${FILE12} -f dset_int31:NBIT) - set (TESTTYPE "TEST") - if (NOT USE_FILTER_NBIT) - set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_NBIT) - ADD_H5_TEST (nbit_add ${TESTTYPE} ${arg}) + ADD_H5_TEST (nbit_add "TEST" ${arg}) # scaleoffset copy set (arg ${FILE13}) - set (TESTTYPE "TEST") - if (NOT USE_FILTER_SCALEOFFSET) - set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_SCALEOFFSET) - ADD_H5_TEST (scale_copy ${TESTTYPE} ${arg}) + ADD_H5_TEST (scale_copy "TEST" ${arg}) # scaleoffset add set (arg ${FILE13} -f dset_none:SOFF=31,IN) - set (TESTTYPE "TEST") - if (NOT USE_FILTER_SCALEOFFSET) - set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_SCALEOFFSET) - ADD_H5_TEST (scale_add ${TESTTYPE} ${arg}) + ADD_H5_TEST (scale_add "TEST" ${arg}) # scaleoffset remove set (arg ${FILE13} -f dset_scaleoffset:NONE) - set (TESTTYPE "TEST") - if (NOT USE_FILTER_SCALEOFFSET) - set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_SCALEOFFSET) - ADD_H5_TEST (scale_remove ${TESTTYPE} ${arg}) + ADD_H5_TEST (scale_remove "TEST" ${arg}) # remove all filters set (arg ${FILE11} -f NONE) set (TESTTYPE "TEST") - if (NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_NBIT OR NOT USE_FILTER_SCALEOFFSET) + if (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER) set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_NBIT OR NOT USE_FILTER_SCALEOFFSET) + endif (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER) ADD_H5_TEST (remove_all ${TESTTYPE} ${arg}) #filter conversions @@ -943,14 +871,14 @@ # Use first dset to test. #--------------------------------------------------------------------------- # chunk to chunk - specify chunk dim bigger than any current dim -ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300) + ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300) # chunk to contiguous -ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI) + ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI) # chunk to compact - convert big dataset (should be > 64k) for this purpose, # should remain as original layout (chunk) -ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA) + ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA) #-------------------------------------------------------------------------- # Test -f for some specific cases. Chunked dataset with unlimited max dims. @@ -960,16 +888,16 @@ ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUN # - should not change max dims from unlimit # chunk dim is bigger than dataset dim. ( dset size < 64k ) -ADD_H5_VERIFY_TEST (error1 "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE) + ADD_H5_VERIFY_TEST (error1 "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE) # chunk dim is bigger than dataset dim. ( dset size > 64k ) -ADD_H5_VERIFY_TEST (error2 "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE) + ADD_H5_VERIFY_TEST (error2 "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE) # chunk dims are smaller than dataset dims. ( dset size < 64k ) -ADD_H5_VERIFY_TEST (error3 "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED -f chunk_unlimit3:NONE) + ADD_H5_VERIFY_TEST (error3 "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED -f chunk_unlimit3:NONE) # file input - should not fail -ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE) + ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE) #-------------------------------------------------------------------------- # Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset @@ -977,9 +905,9 @@ ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE) # (HDFFV-8214) #-------------------------------------------------------------------------- # chunk dim is bigger than dataset dim. should succeed. -ADD_H5_VERIFY_TEST (ckdim_biger "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI) + ADD_H5_VERIFY_TEST (ckdim_biger "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI) # chunk dim is smaller than dataset dim. should succeed. -ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI) + ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI) @@ -1008,9 +936,9 @@ ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CO # several global filters set (arg ${FILE4} --filter GZIP=1 --filter SHUF) set (TESTTYPE "TEST") - if (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE) + if (NOT USE_FILTER_DEFLATE) set (TESTTYPE "SKIP") - endif (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE) + endif (NOT USE_FILTER_DEFLATE) ADD_H5_TEST (global_filters ${TESTTYPE} ${arg}) # syntax of -i infile -o outfile diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index e3bb939..4a32491 100644 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -93,6 +93,8 @@ $SRC_H5REPACK_TESTFILES/h5repack_layouto.h5 $SRC_H5REPACK_TESTFILES/h5repack_layout2.h5 $SRC_H5REPACK_TESTFILES/h5repack_layout3.h5 $SRC_H5REPACK_TESTFILES/h5repack_named_dtypes.h5 +$SRC_H5REPACK_TESTFILES/h5repack_nested_8bit_enum.h5 +$SRC_H5REPACK_TESTFILES/h5repack_nested_8bit_enum_deflated.h5 $SRC_H5REPACK_TESTFILES/h5repack_nbit.h5 $SRC_H5REPACK_TESTFILES/h5repack_objs.h5 $SRC_H5REPACK_TESTFILES/h5repack_refs.h5 @@ -701,6 +703,12 @@ TOOLTEST hlink h5repack_hlink.h5 TOOLTEST layout h5repack_layout.h5 TOOLTEST early h5repack_early.h5 +# nested 8bit enum in both deflated and non-deflated datafiles +if [ $USE_FILTER_DEFLATE != "yes" ]; then +TOOLTEST nested_8bit_enum h5repack_nested_8bit_enum.h5 +else +TOOLTEST nested_8bit_enum h5repack_nested_8bit_enum_deflated.h5 +fi # use h5repack_layout.h5 to write some filters (this file has no filters) diff --git a/tools/h5repack/testfiles/README b/tools/h5repack/testfiles/README new file mode 100644 index 0000000..4096dee --- /dev/null +++ b/tools/h5repack/testfiles/README @@ -0,0 +1,5 @@ +h5repack_nested_8bit_enum_deflated.h5: +h5repack_nested_8bit_enum.h5: + enuberated 8bit type nested in compount type. Original file provided + by a user (HDFFV-8667) as a test file. Used h5copy to extract only the + Compound type dataset. The non-deflated version is produced by h5repack. diff --git a/tools/h5repack/testfiles/h5repack_nested_8bit_enum.h5 b/tools/h5repack/testfiles/h5repack_nested_8bit_enum.h5 Binary files differnew file mode 100644 index 0000000..f1bd8e9 --- /dev/null +++ b/tools/h5repack/testfiles/h5repack_nested_8bit_enum.h5 diff --git a/tools/h5repack/testfiles/h5repack_nested_8bit_enum_deflated.h5 b/tools/h5repack/testfiles/h5repack_nested_8bit_enum_deflated.h5 Binary files differnew file mode 100644 index 0000000..2e66da2 --- /dev/null +++ b/tools/h5repack/testfiles/h5repack_nested_8bit_enum_deflated.h5 diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index 2969405..5230693 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -11,7 +11,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) # -------------------------------------------------------------------- add_executable (h5stat ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c) TARGET_NAMING (h5stat ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5stat " " " ") +TARGET_C_PROPERTIES (h5stat ${LIB_TYPE} " " " ") target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5stat PROPERTIES FOLDER tools) @@ -23,8 +23,8 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) add_executable (h5stat_gentest ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat_gentest.c) - TARGET_NAMING (h5stat_gentest ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5stat_gentest " " " ") + TARGET_NAMING (h5stat_gentest STATIC) + TARGET_C_PROPERTIES (h5stat_gentest STATIC " " " ") target_link_libraries (h5stat_gentest ${HDF5_LIB_TARGET}) set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools) diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index 35ad46e..dbd72cd 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -38,14 +38,14 @@ set (H5_TOOLS_LIB_HDRS ) add_library (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} ${H5_TOOLS_LIB_SRCS} ${H5_TOOLS_LIB_HDRS}) -TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} " " " ") +TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} " " " ") target_link_libraries (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}") H5_SET_LIB_OPTIONS ( ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME} ${LIB_TYPE} HDF5_TOOLS_LIB_NAME_RELEASE - HDF5_TOOLS_LIB_NAME_DEBUG + HDF5_TOOLS_LIB_NAME_DEBUG ) #set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES COMPILE_DEFINITIONS H5DIFF_DEBUG) set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 6b94b68..2603984 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -736,7 +736,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai float tempfloat; HDmemcpy(&tempfloat, vp, sizeof(float)); - h5tools_str_append(str, OPT(info->fmt_float, "%g"), tempfloat); + h5tools_str_append(str, OPT(info->fmt_float, "%g"), (double)tempfloat); } else if (sizeof(double) == nsize) { /* if (H5Tequal(type, H5T_NATIVE_DOUBLE)) */ diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h index 3285278..fd588b9 100644 --- a/tools/lib/h5tools_utils.h +++ b/tools/lib/h5tools_utils.h @@ -124,9 +124,9 @@ H5TOOLS_DLLVAR int h5tools_nCols; /*max number of columns for /* Definitions of useful routines */ H5TOOLS_DLL void indentation(int); H5TOOLS_DLL void print_version(const char *progname); -H5TOOLS_DLL void parallel_print(const char* format, ... ); -H5TOOLS_DLL void error_msg(const char *fmt, ...); -H5TOOLS_DLL void warn_msg(const char *fmt, ...); +H5TOOLS_DLL void parallel_print(const char* format, ... )__attribute__((format (printf, 1, 2))); +H5TOOLS_DLL void error_msg(const char *fmt, ...)__attribute__((format (printf, 1, 2))); +H5TOOLS_DLL void warn_msg(const char *fmt, ...)__attribute__((format (printf, 1, 2))); H5TOOLS_DLL void help_ref_msg(FILE *output); H5TOOLS_DLL void free_table(table_t *table); #ifdef H5DUMP_DEBUG diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index 932948d..e0f94d0 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -12,19 +12,19 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib) #-- Misc Executables add_executable (h5debug ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5debug.c) TARGET_NAMING (h5debug ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5debug " " " ") +TARGET_C_PROPERTIES (h5debug ${LIB_TYPE} " " " ") target_link_libraries (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5debug PROPERTIES FOLDER tools) add_executable (h5repart ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart.c) TARGET_NAMING (h5repart ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5repart " " " ") +TARGET_C_PROPERTIES (h5repart ${LIB_TYPE} " " " ") target_link_libraries (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart PROPERTIES FOLDER tools) add_executable (h5mkgrp ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5mkgrp.c) TARGET_NAMING (h5mkgrp ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5mkgrp " " " ") +TARGET_C_PROPERTIES (h5mkgrp ${LIB_TYPE} " " " ") target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5mkgrp PROPERTIES FOLDER tools) @@ -47,8 +47,8 @@ if (BUILD_TESTING) # -------------------------------------------------------------------- if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS) add_executable (h5repart_gentest ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart_gentest.c) - TARGET_NAMING (h5repart_gentest ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5repart_gentest " " " ") + TARGET_NAMING (h5repart_gentest STATIC) + TARGET_C_PROPERTIES (h5repart_gentest STATIC " " " ") target_link_libraries (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools) #add_test (NAME h5repart_gentest COMMAND $<TARGET_FILE:h5repart_gentest>) @@ -56,7 +56,7 @@ if (BUILD_TESTING) add_executable (h5repart_test ${HDF5_TOOLS_MISC_SOURCE_DIR}/repart_test.c) TARGET_NAMING (h5repart_test ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5repart_test " " " ") + TARGET_C_PROPERTIES (h5repart_test ${LIB_TYPE} " " " ") target_link_libraries (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5repart_test PROPERTIES FOLDER tools) diff --git a/tools/perform/CMakeLists.txt b/tools/perform/CMakeLists.txt index e6abf7f..17b40fa 100644 --- a/tools/perform/CMakeLists.txt +++ b/tools/perform/CMakeLists.txt @@ -22,7 +22,7 @@ set (h5perf_serial_SRCS ) add_executable (h5perf_serial ${h5perf_serial_SRCS}) TARGET_NAMING (h5perf_serial ${LIB_TYPE}) -TARGET_C_PROPERTIES (h5perf_serial " " " ") +TARGET_C_PROPERTIES (h5perf_serial ${LIB_TYPE} " " " ") target_link_libraries (h5perf_serial ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5perf_serial PROPERTIES FOLDER perform) @@ -33,13 +33,13 @@ if (HDF5_BUILD_PERFORM_STANDALONE) ${HDF5_PERFORM_SOURCE_DIR}/sio_engine.c ) add_executable (h5perf_serial_alone ${h5perf_serial_alone_SRCS}) - set_property (TARGET h5perf_serial_alone - APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE - ) TARGET_NAMING (h5perf_serial_alone ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5perf_serial_alone " " " ") + TARGET_C_PROPERTIES (h5perf_serial_alone ${LIB_TYPE} " " " ") target_link_libraries (h5perf_serial_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (h5perf_serial_alone PROPERTIES FOLDER perform) + set_property (TARGET h5perf_serial_alone + APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE + ) endif (HDF5_BUILD_PERFORM_STANDALONE) #-- Adding test for chunk @@ -48,7 +48,7 @@ set (chunk_SRCS ) ADD_EXECUTABLE(chunk ${chunk_SRCS}) TARGET_NAMING (chunk ${LIB_TYPE}) -TARGET_C_PROPERTIES (chunk " " " ") +TARGET_C_PROPERTIES (chunk ${LIB_TYPE} " " " ") TARGET_LINK_LIBRARIES(chunk ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (chunk PROPERTIES FOLDER perform) @@ -58,7 +58,7 @@ set (iopipe_SRCS ) add_executable (iopipe ${iopipe_SRCS}) TARGET_NAMING (iopipe ${LIB_TYPE}) -TARGET_C_PROPERTIES (iopipe " " " ") +TARGET_C_PROPERTIES (iopipe ${LIB_TYPE} " " " ") target_link_libraries (iopipe ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (iopipe PROPERTIES FOLDER perform) @@ -68,7 +68,7 @@ set (overhead_SRCS ) add_executable (overhead ${overhead_SRCS}) TARGET_NAMING (overhead ${LIB_TYPE}) -TARGET_C_PROPERTIES (overhead " " " ") +TARGET_C_PROPERTIES (overhead ${LIB_TYPE} " " " ") target_link_libraries (overhead ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) set_target_properties (overhead PROPERTIES FOLDER perform) @@ -79,7 +79,7 @@ if (BUILD_TESTING) ) add_executable (perf_meta ${perf_meta_SRCS}) TARGET_NAMING (perf_meta ${LIB_TYPE}) - TARGET_C_PROPERTIES (perf_meta " " " ") + TARGET_C_PROPERTIES (perf_meta ${LIB_TYPE} " " " ") target_link_libraries (perf_meta ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (perf_meta PROPERTIES FOLDER perform) endif (BUILD_TESTING) @@ -90,7 +90,7 @@ set (zip_perf_SRCS ) add_executable (zip_perf ${zip_perf_SRCS}) TARGET_NAMING (zip_perf ${LIB_TYPE}) -TARGET_C_PROPERTIES (zip_perf " " " ") +TARGET_C_PROPERTIES (zip_perf ${LIB_TYPE} " " " ") target_link_libraries (zip_perf ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (zip_perf PROPERTIES FOLDER perform) @@ -102,7 +102,7 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING) ) add_executable (h5perf ${h5perf_SRCS}) TARGET_NAMING (h5perf ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5perf " " " ") + TARGET_C_PROPERTIES (h5perf ${LIB_TYPE} " " " ") target_link_libraries (h5perf ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5perf PROPERTIES FOLDER perform) @@ -113,13 +113,13 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING) ${HDF5_PERFORM_SOURCE_DIR}/pio_engine.c ) add_executable (h5perf_alone ${h5perf_alone_SRCS}) - set_property (TARGET h5perf_alone - APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE - ) TARGET_NAMING (h5perf_alone ${LIB_TYPE}) - TARGET_C_PROPERTIES (h5perf_alone " " " ") + TARGET_C_PROPERTIES (h5perf_alone ${LIB_TYPE} " " " ") target_link_libraries (h5perf_alone ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (h5perf_alone PROPERTIES FOLDER perform) + set_property (TARGET h5perf_alone + APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE + ) endif (HDF5_BUILD_PERFORM_STANDALONE) endif (H5_HAVE_PARALLEL AND BUILD_TESTING) |