summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/CMakeLists.txt2
-rw-r--r--tools/h5copy/CMakeLists.txt37
-rw-r--r--tools/h5copy/CMakeTests.cmake72
-rw-r--r--tools/h5diff/CMakeLists.txt53
-rw-r--r--tools/h5dump/CMakeLists.txt41
-rw-r--r--tools/h5dump/CMakeTestsPBITS.cmake2
-rw-r--r--tools/h5import/CMakeLists.txt23
-rw-r--r--tools/h5import/CMakeTests.cmake34
-rw-r--r--tools/h5jam/CMakeLists.txt23
-rw-r--r--tools/h5jam/CMakeTests.cmake56
-rw-r--r--tools/h5ls/CMakeLists.txt39
-rw-r--r--tools/h5ls/CMakeTests.cmake14
-rw-r--r--tools/h5repack/CMakeLists.txt37
-rw-r--r--tools/h5repack/CMakeTests.cmake130
-rw-r--r--tools/h5stat/CMakeLists.txt37
-rw-r--r--tools/h5stat/CMakeTests.cmake18
-rw-r--r--tools/lib/CMakeLists.txt7
-rw-r--r--tools/lib/h5diff_array.c4
-rw-r--r--tools/misc/CMakeLists.txt29
-rw-r--r--tools/misc/CMakeTests.cmake26
-rw-r--r--tools/perform/CMakeLists.txt12
-rw-r--r--tools/perform/CMakeTests.cmake6
22 files changed, 398 insertions, 304 deletions
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 841e979..c9cc21b 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -16,7 +16,7 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SOURCE_DIR}/lib)
# --------------------------------------------------------------------
if (NOT BUILD_TESTING)
add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/lib)
-endif (NOT BUILD_TESTING)
+endif ()
#-- Add the h5diff and test executables
add_subdirectory (${HDF5_TOOLS_SOURCE_DIR}/h5diff)
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt
index c59675d..406ca12 100644
--- a/tools/h5copy/CMakeLists.txt
+++ b/tools/h5copy/CMakeLists.txt
@@ -18,6 +18,17 @@ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5copy")
set (H5_DEP_EXECUTABLES h5copy)
+if (BUILD_SHARED_LIBS)
+ add_executable (h5copy-shared ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copy.c)
+ TARGET_NAMING (h5copy-shared SHARED)
+ TARGET_C_PROPERTIES (h5copy-shared SHARED " " " ")
+ target_link_libraries (h5copy-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (h5copy-shared PROPERTIES FOLDER tools)
+ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5copy-shared")
+
+ set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5copy-shared)
+endif ()
+
if (BUILD_TESTING)
if (HDF5_BUILD_GENERATORS)
add_executable (h5copygentest ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copygentest.c)
@@ -27,10 +38,10 @@ if (BUILD_TESTING)
set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools)
#add_test (NAME h5copygentest COMMAND $<TARGET_FILE:h5copygentest>)
- endif (HDF5_BUILD_GENERATORS)
+ endif ()
include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
##############################################################################
##############################################################################
@@ -41,13 +52,17 @@ endif (BUILD_TESTING)
#-----------------------------------------------------------------------------
# Rules for Installation of tools using make Install target
#-----------------------------------------------------------------------------
+if (HDF5_EXPORTED_TARGETS)
+ if (BUILD_SHARED_LIBS)
+ INSTALL_PROGRAM_PDB (h5copy-shared ${HDF5_INSTALL_BIN_DIR} toolsapplications)
+ endif ()
+ INSTALL_PROGRAM_PDB (h5copy ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-#INSTALL_PROGRAM_PDB (h5copy ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-
-install (
- TARGETS
- h5copy
- EXPORT
- ${HDF5_EXPORTED_TARGETS}
- RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
-)
+ install (
+ TARGETS
+ ${H5_DEP_EXECUTABLES}
+ EXPORT
+ ${HDF5_EXPORTED_TARGETS}
+ RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
+ )
+endif ()
diff --git a/tools/h5copy/CMakeTests.cmake b/tools/h5copy/CMakeTests.cmake
index 80b7d10..a2131d1 100644
--- a/tools/h5copy/CMakeTests.cmake
+++ b/tools/h5copy/CMakeTests.cmake
@@ -24,7 +24,7 @@
foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
get_filename_component(fname "${listfiles}" NAME)
HDFTEST_COPY_FILE("${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5copy_files")
- endforeach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ endforeach ()
add_custom_target(h5copy_files ALL COMMENT "Copying files needed by h5copy tests" DEPENDS ${h5copy_files_list})
##############################################################################
@@ -45,7 +45,7 @@
-E remove
./testfiles/${testname}.out.h5
)
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
add_test (
NAME H5COPY_F-${testname}
@@ -54,10 +54,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5COPY_F-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
- else (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
+ else ()
set_tests_properties (H5COPY_F-${testname} PROPERTIES DEPENDS H5COPY_F-${testname}-clear-objects)
- endif (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
# resultcode=2 will cause the test to skip the diff test
if (NOT ${resultcode} STREQUAL "2")
@@ -68,9 +68,9 @@
SET_TESTS_PROPERTIES(H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname})
if (${resultcode} STREQUAL "1")
set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- endif (${resultcode} STREQUAL "1")
- endif (NOT ${resultcode} STREQUAL "2")
- ENDMACRO (ADD_H5_F_TEST)
+ endif ()
+ endif ()
+ ENDMACRO ()
MACRO (ADD_H5_TEST testname resultcode infile vparam sparam srcname dparam dstname)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -81,7 +81,7 @@
-E remove
./testfiles/${testname}.out.h5
)
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
add_test (
NAME H5COPY-${testname}
@@ -90,10 +90,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
- else (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
+ else ()
set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
- endif (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
# resultcode=2 will cause the test to skip the diff test
if (NOT ${resultcode} STREQUAL "2")
@@ -104,9 +104,9 @@
SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
if (${resultcode} STREQUAL "1")
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- endif (${resultcode} STREQUAL "1")
- endif (NOT ${resultcode} STREQUAL "2")
- ENDMACRO (ADD_H5_TEST)
+ endif ()
+ endif ()
+ ENDMACRO ()
MACRO (ADD_H5_TEST2 testname resultcode infile psparam pdparam vparam sparam srcname dparam dstname)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -117,7 +117,7 @@
-E remove
./testfiles/${testname}.out.h5
)
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
add_test (
NAME H5COPY-${testname}-prefill
@@ -126,10 +126,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5COPY-${testname}-prefill PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
- else (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
+ else ()
set_tests_properties (H5COPY-${testname}-prefill PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
- endif (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
add_test (
NAME H5COPY-${testname}
@@ -145,9 +145,9 @@
SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
if (${resultcode} STREQUAL "1")
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- endif (${resultcode} STREQUAL "1")
- endif (NOT ${resultcode} STREQUAL "2")
- ENDMACRO (ADD_H5_TEST2)
+ endif ()
+ endif ()
+ ENDMACRO ()
MACRO (ADD_H5_TEST_SAME testname resultcode pfile psparam pdparam vparam sparam srcname dparam dstname)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -158,7 +158,7 @@
-E remove
./testfiles/${testname}.out.h5
)
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
add_test (
NAME H5COPY_SAME-${testname}-prefill
@@ -167,10 +167,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
- else (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
+ else ()
set_tests_properties (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS H5COPY_SAME-${testname}-clear-objects)
- endif (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
add_test (
NAME H5COPY_SAME-${testname}
@@ -186,9 +186,9 @@
SET_TESTS_PROPERTIES(H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname})
if (${resultcode} STREQUAL "1")
set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- endif (${resultcode} STREQUAL "1")
- endif (NOT ${resultcode} STREQUAL "2")
- ENDMACRO (ADD_H5_TEST_SAME)
+ endif ()
+ endif ()
+ ENDMACRO ()
#
# Similiar to ADD_H5_TEST macro. Compare to outputs from source & target
@@ -200,11 +200,11 @@
add_test (NAME H5COPY-CMP-${testname} COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
if (${resultcode} STREQUAL "1")
set_tests_properties (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true")
- endif (${resultcode} STREQUAL "1")
+ endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5COPY-CMP-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
- else (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
+ else ()
# Remove any output file left over from previous test run
add_test (
NAME H5COPY-CMP-${testname}-clear-objects
@@ -227,8 +227,8 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5COPY-CMP-${testname} PROPERTIES DEPENDS H5COPY-CMP-${testname}-clear-objects)
- endif (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_CMP_TEST)
+ endif ()
+ ENDMACRO ()
##############################################################################
##############################################################################
@@ -288,9 +288,9 @@
set_tests_properties (H5COPY-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5COPY-clearall-objects PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "H5COPY-clearall-objects")
- endif (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
# "Test copying various forms of datasets"
ADD_H5_TEST (simple 0 ${HDF_FILE1}.h5 -v -s simple -d simple)
diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt
index fcb1a30..41897da 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -21,6 +21,20 @@ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5diff")
set (H5_DEP_EXECUTABLES h5diff)
+if (BUILD_SHARED_LIBS)
+ add_executable (h5diff-shared
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_common.c
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_main.c
+ )
+ TARGET_NAMING (h5diff-shared SHARED)
+ TARGET_C_PROPERTIES (h5diff-shared SHARED " " " ")
+ target_link_libraries (h5diff-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (h5diff-shared PROPERTIES FOLDER tools)
+ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5diff-shared")
+
+ set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5diff-shared)
+endif ()
+
if (H5_HAVE_PARALLEL)
add_executable (ph5diff
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_common.c
@@ -31,7 +45,7 @@ if (H5_HAVE_PARALLEL)
target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (ph5diff PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};ph5diff")
-endif (H5_HAVE_PARALLEL)
+endif ()
if (BUILD_TESTING)
# --------------------------------------------------------------------
@@ -77,7 +91,7 @@ if (BUILD_TESTING)
include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
##############################################################################
##############################################################################
@@ -88,26 +102,29 @@ endif (BUILD_TESTING)
#-----------------------------------------------------------------------------
# Rules for Installation of tools using make Install target
#-----------------------------------------------------------------------------
-
-#INSTALL_PROGRAM_PDB (h5diff ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-
-install (
- TARGETS
- h5diff
- EXPORT
- ${HDF5_EXPORTED_TARGETS}
- RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
-)
-
-if (H5_HAVE_PARALLEL)
-
- #INSTALL_PROGRAM_PDB (ph5diff ${HDF5_INSTALL_BIN_DIR} toolsapplications)
+if (HDF5_EXPORTED_TARGETS)
+ if (BUILD_SHARED_LIBS)
+ INSTALL_PROGRAM_PDB (h5diff-shared ${HDF5_INSTALL_BIN_DIR} toolsapplications)
+ endif ()
+ INSTALL_PROGRAM_PDB (h5diff ${HDF5_INSTALL_BIN_DIR} toolsapplications)
install (
TARGETS
- ph5diff
+ ${H5_DEP_EXECUTABLES}
EXPORT
${HDF5_EXPORTED_TARGETS}
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
)
-endif (H5_HAVE_PARALLEL)
+
+ if (H5_HAVE_PARALLEL)
+ #INSTALL_PROGRAM_PDB (ph5diff ${HDF5_INSTALL_BIN_DIR} toolsapplications)
+
+ install (
+ TARGETS
+ ph5diff
+ EXPORT
+ ${HDF5_EXPORTED_TARGETS}
+ RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
+ )
+ endif ()
+endif ()
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index c81765c..3a91e54 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -22,6 +22,21 @@ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5dump")
set (H5_DEP_EXECUTABLES h5dump)
+if (BUILD_SHARED_LIBS)
+ add_executable (h5dump-shared
+ ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump.c
+ ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_ddl.c
+ ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_xml.c
+ )
+ TARGET_NAMING (h5dump-shared SHARED)
+ TARGET_C_PROPERTIES (h5dump-shared SHARED " " " ")
+ target_link_libraries (h5dump-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (h5dump-shared PROPERTIES FOLDER tools)
+ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5dump-shared")
+
+ set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5dump-shared)
+endif ()
+
if (BUILD_TESTING)
#-----------------------------------------------------------------------------
@@ -70,7 +85,7 @@ if (BUILD_TESTING)
include (CMakeTestsPBITS.cmake)
include (CMakeTestsXML.cmake)
-endif (BUILD_TESTING)
+endif ()
##############################################################################
##############################################################################
@@ -81,13 +96,17 @@ endif (BUILD_TESTING)
#-----------------------------------------------------------------------------
# Rules for Installation of tools using make Install target
#-----------------------------------------------------------------------------
-
-#INSTALL_PROGRAM_PDB (h5dump ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-
-install (
- TARGETS
- h5dump
- EXPORT
- ${HDF5_EXPORTED_TARGETS}
- RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
-)
+if (HDF5_EXPORTED_TARGETS)
+ if (BUILD_SHARED_LIBS)
+ INSTALL_PROGRAM_PDB (h5dump-shared ${HDF5_INSTALL_BIN_DIR} toolsapplications)
+ endif ()
+ INSTALL_PROGRAM_PDB (h5dump ${HDF5_INSTALL_BIN_DIR} toolsapplications)
+
+ install (
+ TARGETS
+ ${H5_DEP_EXECUTABLES}
+ EXPORT
+ ${HDF5_EXPORTED_TARGETS}
+ RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
+ )
+endif ()
diff --git a/tools/h5dump/CMakeTestsPBITS.cmake b/tools/h5dump/CMakeTestsPBITS.cmake
index e6265dc..c6bd78c 100644
--- a/tools/h5dump/CMakeTestsPBITS.cmake
+++ b/tools/h5dump/CMakeTestsPBITS.cmake
@@ -119,7 +119,7 @@
if (NOT "${last_pbits_test}" STREQUAL "")
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test})
endif ()
- else (HDF5_ENABLE_USING_MEMCHECKER)
+ else ()
add_test (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt
index 05cd226..4831d5c 100644
--- a/tools/h5import/CMakeLists.txt
+++ b/tools/h5import/CMakeLists.txt
@@ -31,7 +31,7 @@ if (BUILD_TESTING)
include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
##############################################################################
##############################################################################
@@ -42,13 +42,14 @@ endif (BUILD_TESTING)
#-----------------------------------------------------------------------------
# Rules for Installation of tools using make Install target
#-----------------------------------------------------------------------------
-
-#INSTALL_PROGRAM_PDB (h5import ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-
-install (
- TARGETS
- h5import
- EXPORT
- ${HDF5_EXPORTED_TARGETS}
- RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
-)
+if (HDF5_EXPORTED_TARGETS)
+ INSTALL_PROGRAM_PDB (h5import ${HDF5_INSTALL_BIN_DIR} toolsapplications)
+
+ install (
+ TARGETS
+ h5import
+ EXPORT
+ ${HDF5_EXPORTED_TARGETS}
+ RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
+ )
+endif ()
diff --git a/tools/h5import/CMakeTests.cmake b/tools/h5import/CMakeTests.cmake
index 39217be..d1f1681 100644
--- a/tools/h5import/CMakeTests.cmake
+++ b/tools/h5import/CMakeTests.cmake
@@ -64,15 +64,15 @@
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
foreach (conf_file ${HDF5_REFERENCE_CONF_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${conf_file}" "${PROJECT_BINARY_DIR}/testfiles/${conf_file}" "h5import_files")
- endforeach (conf_file ${HDF5_REFERENCE_CONF_FILES})
+ endforeach ()
foreach (txt_file ${HDF5_REFERENCE_TXT_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${txt_file}" "${PROJECT_BINARY_DIR}/testfiles/${txt_file}" "h5import_files")
- endforeach (txt_file ${HDF5_REFERENCE_TXT_FILES})
+ endforeach ()
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5import_files")
- endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ endforeach ()
add_custom_target(h5import_files ALL COMMENT "Copying files needed by h5import tests" DEPENDS ${h5import_files_list})
##############################################################################
@@ -87,7 +87,7 @@
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-h5importtest)
endif ()
- else (HDF5_ENABLE_USING_MEMCHECKER)
+ else ()
add_test (
NAME H5IMPORT-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -129,8 +129,8 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5IMPORT-${testname}-H5DMP_CMP PROPERTIES DEPENDS H5IMPORT-${testname}-H5DMP)
- endif (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_TEST testname importfile conffile testfile)
+ endif ()
+ ENDMACRO ()
MACRO (ADD_H5_DUMPTEST testname datasetname testfile)
# If using memchecker skip tests
@@ -162,7 +162,7 @@
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- else ("${ARGN}" STREQUAL "BINARY")
+ else ()
add_test (
NAME H5IMPORT-DUMP-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
@@ -174,7 +174,7 @@
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- endif ("${ARGN}" STREQUAL "BINARY")
+ endif ()
set_tests_properties (H5IMPORT-DUMP-${testname}-H5DMP PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-clear-objects")
add_test (
@@ -203,8 +203,8 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5IMPORT-DUMP-${testname}-H5DFF PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}")
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_DUMPTEST testname datasetname testfile)
+ endif ()
+ ENDMACRO ()
MACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -212,15 +212,15 @@
NAME H5IMPORT-DUMP-${testname}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${testname} ${datasetname} ${testfile} --- DEFLATE filter not available"
)
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile)
+ endif ()
+ ENDMACRO ()
# --------------------------------------------------------------------
# Determine if filter is available for h5diff
# --------------------------------------------------------------------
if (H5_HAVE_FILTER_DEFLATE)
set (USE_FILTER_DEFLATE "true")
- endif (H5_HAVE_FILTER_DEFLATE)
+ endif ()
##############################################################################
##############################################################################
@@ -387,7 +387,7 @@
dtxtstr.h5.dff.err
)
set (last_test "H5IMPORT-clear-objects")
- endif (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
add_test (
NAME H5IMPORT-h5importtest-clear-objects
@@ -403,7 +403,7 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5IMPORT-h5importtest-clear-objects PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "H5IMPORT-clear-objects")
add_test (NAME H5IMPORT-h5importtest COMMAND $<TARGET_FILE:h5importtest>)
@@ -430,7 +430,7 @@
# ----- TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed "
ADD_H5_TEST (ASCII_F64 testfiles/txtfp64.txt testfiles/txtfp64.conf txtfp64.h5)
- # ----- TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed "
+ # ----- TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed "
ADD_H5_TEST (BINARY_F64 binfp64.bin testfiles/binfp64.conf binfp64.h5)
if (NOT USE_FILTER_DEFLATE)
ADD_H5_SKIP_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY)
@@ -470,6 +470,6 @@
ADD_H5_TEST (BINARY_I8_EOF binin8w.bin testfiles/binin8w.conf binin8w.h5)
ADD_H5_DUMPTEST (BINARY_I8_EOF "/dataset0" binin8w.h5 BINARY)
- # ----- TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE "
+ # ----- TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE "
ADD_H5_TEST (ASCII_F64_R1 testfiles/textpfe64.txt testfiles/textpfe.conf textpfe.h5)
diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt
index c74f7a6..927a64c 100644
--- a/tools/h5jam/CMakeLists.txt
+++ b/tools/h5jam/CMakeLists.txt
@@ -54,11 +54,11 @@ if (BUILD_TESTING)
set_target_properties (h5jamgentest PROPERTIES FOLDER generator/tools)
#add_test (NAME h5jamgentest COMMAND $<TARGET_FILE:h5jamgentest>)
- endif (HDF5_BUILD_GENERATORS)
+ endif ()
include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
##############################################################################
##############################################################################
@@ -69,13 +69,14 @@ endif (BUILD_TESTING)
#-----------------------------------------------------------------------------
# Rules for Installation of tools using make Install target
#-----------------------------------------------------------------------------
+if (HDF5_EXPORTED_TARGETS)
+ INSTALL_PROGRAM_PDB (h5jam ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-#INSTALL_PROGRAM_PDB (h5jam ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-
-install (
- TARGETS
- h5jam h5unjam
- EXPORT
- ${HDF5_EXPORTED_TARGETS}
- RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
-)
+ install (
+ TARGETS
+ h5jam h5unjam
+ EXPORT
+ ${HDF5_EXPORTED_TARGETS}
+ RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
+ )
+endif ()
diff --git a/tools/h5jam/CMakeTests.cmake b/tools/h5jam/CMakeTests.cmake
index 6752c9a..3752e55 100644
--- a/tools/h5jam/CMakeTests.cmake
+++ b/tools/h5jam/CMakeTests.cmake
@@ -23,11 +23,11 @@
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5jam_files")
- endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ endforeach ()
foreach (txt_file ${HDF5_REFERENCE_TXT_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${txt_file}" "${PROJECT_BINARY_DIR}/testfiles/${txt_file}" "h5jam_files")
- endforeach (txt_file ${HDF5_REFERENCE_TXT_FILES})
+ endforeach ()
add_custom_target(h5jam_files ALL COMMENT "Copying files needed by h5jam tests" DEPENDS ${h5jam_files_list})
##############################################################################
@@ -46,8 +46,8 @@
add_test (NAME H5JAM-${expectfile} COMMAND $<TARGET_FILE:h5jam> ${ARGN})
if (NOT "${resultcode}" STREQUAL "0")
set_tests_properties (H5JAM-${expectfile} PROPERTIES WILL_FAIL "true")
- endif (NOT "${resultcode}" STREQUAL "0")
- else (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
+ else ()
add_test (
NAME H5JAM-${expectfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -67,8 +67,8 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5JAM-${expectfile} PROPERTIES DEPENDS H5JAM-${expectfile}-clear-objects)
- endif (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (TEST_H5JAM_OUTPUT)
+ endif ()
+ ENDMACRO ()
# ============================================================
# TEST_H5UNJAM_OUTPUT
@@ -80,8 +80,8 @@
add_test (NAME H5JAM-UNJAM-${expectfile} COMMAND $<TARGET_FILE:h5unjam> ${ARGN})
if (NOT "${resultcode}" STREQUAL "0")
set_tests_properties (H5JAM-UNJAM-${expectfile} PROPERTIES WILL_FAIL "true")
- endif (NOT "${resultcode}" STREQUAL "0")
- else (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
+ else ()
add_test (
NAME H5JAM-UNJAM-${expectfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -101,8 +101,8 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5JAM-UNJAM-${expectfile} PROPERTIES DEPENDS H5JAM-UNJAM-${expectfile}-clear-objects)
- endif (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (TEST_H5UNJAM_OUTPUT)
+ endif ()
+ ENDMACRO ()
MACRO (CHECKFILE testname testdepends expected actual)
# If using memchecker add tests without using scripts
@@ -143,8 +143,8 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5JAM-${testname}-CHECKFILE-H5DMP_CMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-H5DMP)
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO(CHECKFILE testname testdepends expected actual)
+ endif ()
+ ENDMACRO()
MACRO (UNJAMTEST testname setfile infile ufile chkfile outfile)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -171,7 +171,7 @@
add_test (NAME H5JAM-${testname}-UNJAM COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -u ${ufile} -o ${outfile})
set_tests_properties (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
set (compare_test ${ufile})
- else (NOT "${ufile}" STREQUAL "NONE")
+ else ()
if (NOT "${ARGN}" STREQUAL "--delete")
add_test (
NAME H5JAM-${testname}-UNJAM_D-clear-objects
@@ -191,12 +191,12 @@
)
set_tests_properties (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
set (compare_test "${outfile}.ufile.txt")
- else (NOT "${ARGN}" STREQUAL "--delete")
+ else ()
add_test (NAME H5JAM-${testname}-UNJAM COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -o ${outfile})
set_tests_properties (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
set (compare_test "")
- endif (NOT "${ARGN}" STREQUAL "--delete")
- endif (NOT "${ufile}" STREQUAL "NONE")
+ endif ()
+ endif ()
if (NOT "${compare_test}" STREQUAL "")
add_test (
NAME H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects
@@ -221,7 +221,7 @@
-P "${HDF_RESOURCES_DIR}/userblockTest.cmake"
)
set_tests_properties (H5JAM-${testname}-UNJAM-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects)
- endif (NOT "${compare_test}" STREQUAL "")
+ endif ()
add_test (
NAME H5JAM-${testname}-UNJAM-CHECK_NOUB
@@ -238,13 +238,13 @@
)
if (NOT "${compare_test}" STREQUAL "")
set_tests_properties (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1)
- else (NOT "${compare_test}" STREQUAL "")
+ else ()
set_tests_properties (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM)
- endif (NOT "${compare_test}" STREQUAL "")
+ endif ()
CHECKFILE (${testname} "H5JAM-${testname}-UNJAM-CHECK_NOUB" ${chkfile} ${outfile})
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO(UNJAMTEST testname infile ufile outfile)
+ endif ()
+ ENDMACRO()
MACRO (JAMTEST testname jamfile infile chkfile outfile)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -252,7 +252,7 @@
NAME H5JAM-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove ${outfile} ${infile}.cpy.h5
)
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
add_test (NAME H5JAM-${testname} COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i testfiles/${infile} -o ${outfile} ${ARGN})
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
set_tests_properties (H5JAM-${testname} PROPERTIES DEPENDS H5JAM-${testname}-clear-objects)
@@ -260,7 +260,7 @@
set (compare_orig testfiles/${infile})
if ("${ARGN}" STREQUAL "--clobber")
set (compare_orig "")
- endif ("${ARGN}" STREQUAL "--clobber")
+ endif ()
add_test (
NAME H5JAM-${testname}-CHECK_UB_1-clear-objects
@@ -286,8 +286,8 @@
)
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})
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (JAMTEST testname jamfile infile outfile)
+ endif ()
+ ENDMACRO ()
MACRO (JAMTEST_NONE testname jamfile infile setfile chkfile)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -315,7 +315,7 @@
set (compare_orig ${chkfile}.cpy.h5)
if ("${ARGN}" STREQUAL "--clobber")
set (compare_orig "")
- endif ("${ARGN}" STREQUAL "--clobber")
+ endif ()
add_test (
NAME H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects
@@ -341,8 +341,8 @@
)
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})
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (JAMTEST_NONE testname jamfile infile setfile chkfile)
+ endif ()
+ ENDMACRO ()
##############################################################################
##############################################################################
diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt
index 80bd2f7..0e49edb 100644
--- a/tools/h5ls/CMakeLists.txt
+++ b/tools/h5ls/CMakeLists.txt
@@ -16,9 +16,18 @@ target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5ls PROPERTIES FOLDER tools)
set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5ls")
-set (H5_DEP_EXECUTABLES
- h5ls
-)
+set (H5_DEP_EXECUTABLES h5ls)
+
+if (BUILD_SHARED_LIBS)
+ add_executable (h5ls-shared ${HDF5_TOOLS_H5LS_SOURCE_DIR}/h5ls.c)
+ TARGET_NAMING (h5ls-shared SHARED)
+ TARGET_C_PROPERTIES (h5ls-shared SHARED " " " ")
+ target_link_libraries (h5ls-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (h5ls-shared PROPERTIES FOLDER tools)
+ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5ls-shared")
+
+ set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5ls-shared)
+endif ()
if (BUILD_TESTING)
@@ -52,7 +61,7 @@ if (BUILD_TESTING)
include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
##############################################################################
##############################################################################
@@ -63,13 +72,17 @@ endif (BUILD_TESTING)
#-----------------------------------------------------------------------------
# Rules for Installation of tools using make Install target
#-----------------------------------------------------------------------------
+if (HDF5_EXPORTED_TARGETS)
+ if (BUILD_SHARED_LIBS)
+ INSTALL_PROGRAM_PDB (h5ls-shared ${HDF5_INSTALL_BIN_DIR} toolsapplications)
+ endif ()
+ INSTALL_PROGRAM_PDB (h5ls ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-#INSTALL_PROGRAM_PDB (h5ls ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-
-install (
- TARGETS
- h5ls
- EXPORT
- ${HDF5_EXPORTED_TARGETS}
- RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
-)
+ install (
+ TARGETS
+ ${H5_DEP_EXECUTABLES}
+ EXPORT
+ ${HDF5_EXPORTED_TARGETS}
+ RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
+ )
+endif ()
diff --git a/tools/h5ls/CMakeTests.cmake b/tools/h5ls/CMakeTests.cmake
index 1646fa9..f995c74 100644
--- a/tools/h5ls/CMakeTests.cmake
+++ b/tools/h5ls/CMakeTests.cmake
@@ -410,9 +410,9 @@
# ( HDFFV-7838, )
if (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tattrreg_be 0 -w80 -v -d tattrreg.h5)
- else (H5_WORDS_BIGENDIAN)
+ else ()
ADD_H5_TEST (tattrreg_le 0 -w80 -v -d tattrreg.h5)
- endif (H5_WORDS_BIGENDIAN)
+ endif ()
# test for non-existing file
ADD_H5_TEST (nosuchfile 1 nosuchfile.h5)
@@ -420,19 +420,19 @@
# test for variable length data types in verbose mode
if (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tvldtypes2be 0 -v tvldtypes1.h5)
- else (H5_WORDS_BIGENDIAN)
+ else ()
ADD_H5_TEST (tvldtypes2le 0 -v tvldtypes1.h5)
- endif (H5_WORDS_BIGENDIAN)
+ endif ()
# test for dataset region references data types in verbose mode
if (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tdataregbe 0 -v tdatareg.h5)
- else (H5_WORDS_BIGENDIAN)
+ else ()
ADD_H5_TEST (tdataregle 0 -v tdatareg.h5)
- endif (H5_WORDS_BIGENDIAN)
+ endif ()
##############################################################################
### P L U G I N T E S T S
##############################################################################
ADD_H5_UD_TEST (h5ls_plugin_test 0 tudfilter -w80 -d tudfilter.h5)
-
+
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index 54f918b..86611a9 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -29,6 +29,17 @@ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5repack")
set (H5_DEP_EXECUTABLES h5repack)
+if (BUILD_SHARED_LIBS)
+ add_executable (h5repack-shared ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c)
+ TARGET_NAMING (h5repack-shared SHARED)
+ TARGET_C_PROPERTIES (h5repack-shared SHARED " " " ")
+ target_link_libraries (h5repack-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (h5repack-shared PROPERTIES FOLDER tools)
+ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5repack-shared")
+
+ set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5repack-shared)
+endif ()
+
if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add h5Repack test executables
@@ -91,7 +102,7 @@ if (BUILD_TESTING)
include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
##############################################################################
##############################################################################
@@ -102,13 +113,17 @@ endif (BUILD_TESTING)
#-----------------------------------------------------------------------------
# Rules for Installation of tools using make Install target
#-----------------------------------------------------------------------------
-
-#INSTALL_PROGRAM_PDB (h5repack ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-
-install (
- TARGETS
- h5repack
- EXPORT
- ${HDF5_EXPORTED_TARGETS}
- RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
-)
+if (HDF5_EXPORTED_TARGETS)
+ if (BUILD_SHARED_LIBS)
+ INSTALL_PROGRAM_PDB (h5repack-shared ${HDF5_INSTALL_BIN_DIR} toolsapplications)
+ endif ()
+ INSTALL_PROGRAM_PDB (h5repack ${HDF5_INSTALL_BIN_DIR} toolsapplications)
+
+ install (
+ TARGETS
+ ${H5_DEP_EXECUTABLES}
+ EXPORT
+ ${HDF5_EXPORTED_TARGETS}
+ RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
+ )
+endif ()
diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake
index 08420ff..ebc2055 100644
--- a/tools/h5repack/CMakeTests.cmake
+++ b/tools/h5repack/CMakeTests.cmake
@@ -17,7 +17,7 @@
if (DIRECT_VFD)
set (VFD_LIST ${VFD_LIST} direct)
- endif (DIRECT_VFD)
+ endif ()
MACRO (ADD_VFD_TEST vfdname resultcode)
add_test (
@@ -33,10 +33,10 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK-VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "H5REPACK-VFD-${vfdname}-h5repacktest")
- ENDMACRO (ADD_VFD_TEST)
- endif (HDF5_TEST_VFD)
+ ENDMACRO ()
+ endif ()
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
@@ -100,7 +100,7 @@
foreach (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
get_filename_component(fname "${h5_file}" NAME)
HDFTEST_COPY_FILE("${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5repack_files")
- endforeach (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ endforeach ()
add_custom_target(h5repack_files ALL COMMENT "Copying files needed by h5repack tests" DEPENDS ${h5repack_files_list})
##############################################################################
@@ -118,7 +118,7 @@
set_tests_properties (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5REPACK-${testname}")
- else (HDF5_ENABLE_USING_MEMCHECKER)
+ else ()
add_test (
NAME H5REPACK-h5repack-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -137,8 +137,8 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES DEPENDS "H5REPACK-h5repack-${testname}-clear-objects")
- endif (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_HELP_TEST)
+ endif ()
+ ENDMACRO ()
MACRO (ADD_H5_TEST_OLD testname testtype testfile)
if ("${testtype}" STREQUAL "SKIP")
@@ -147,8 +147,8 @@
NAME H5REPACK_OLD-${testname}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}"
)
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- else ("${testtype}" STREQUAL "SKIP")
+ endif ()
+ else ()
add_test (
NAME H5REPACK_OLD-${testname}
COMMAND $<TARGET_FILE:h5repack> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
@@ -161,8 +161,8 @@
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK_OLD-${testname}_DFF PROPERTIES DEPENDS H5REPACK_OLD-${testname})
- endif ("${testtype}" STREQUAL "SKIP")
- ENDMACRO (ADD_H5_TEST_OLD)
+ endif ()
+ ENDMACRO ()
MACRO (ADD_H5_TEST testname testtype testfile)
if ("${testtype}" STREQUAL "SKIP")
@@ -171,8 +171,8 @@
NAME H5REPACK-${testname}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}"
)
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- else ("${testtype}" STREQUAL "SKIP")
+ endif ()
+ else ()
add_test (
NAME H5REPACK-${testname}
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
@@ -185,8 +185,8 @@
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK-${testname}_DFF PROPERTIES DEPENDS H5REPACK-${testname})
- endif ("${testtype}" STREQUAL "SKIP")
- ENDMACRO (ADD_H5_TEST)
+ endif ()
+ ENDMACRO ()
MACRO (ADD_H5_CMP_TEST testname testfilter testtype resultcode resultfile)
if ("${testtype}" STREQUAL "SKIP")
@@ -195,14 +195,14 @@
NAME H5REPACK_CMP-${testname}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}"
)
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- else ("${testtype}" STREQUAL "SKIP")
+ endif ()
+ else ()
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_CMP-${testname}
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile})
- else (HDF5_ENABLE_USING_MEMCHECKER)
+ else ()
add_test (
NAME H5REPACK_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
@@ -215,12 +215,12 @@
-D "TEST_REFERENCE=${resultfile}-${testname}.tst"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- endif (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test})
endif ()
- endif ("${testtype}" STREQUAL "SKIP")
- ENDMACRO (ADD_H5_CMP_TEST)
+ endif ()
+ ENDMACRO ()
MACRO (ADD_H5_DMP_TEST testname testtype resultcode resultfile)
if ("${testtype}" STREQUAL "SKIP")
@@ -229,8 +229,8 @@
NAME H5REPACK_DMP-${testname}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}"
)
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- else ("${testtype}" STREQUAL "SKIP")
+ endif ()
+ else ()
# If using memchecker add tests without using scripts
add_test (
NAME H5REPACK_DMP-${testname}
@@ -251,9 +251,9 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5REPACK_DMP-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_DMP-${testname}")
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- endif ("${testtype}" STREQUAL "SKIP")
- ENDMACRO (ADD_H5_DMP_TEST)
+ endif ()
+ endif ()
+ ENDMACRO ()
MACRO (ADD_H5_VERIFY_TEST testname testtype resultcode testfile testdset testfilter)
if ("${testtype}" STREQUAL "SKIP")
@@ -262,8 +262,8 @@
NAME H5REPACK_VERIFY_LAYOUT-${testname}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP -d ${testdset} -pH ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}"
)
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- else ("${testtype}" STREQUAL "SKIP")
+ endif ()
+ else ()
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}
@@ -291,7 +291,7 @@
-P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake"
)
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
- else ("${resultcode}" STREQUAL "0")
+ else ()
if ("${testfilter}" STREQUAL "CHUNKED")
set (nottestfilter "(CONTIGUOUS|COMPACT)")
endif ()
@@ -314,10 +314,10 @@
-P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake"
)
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
- endif ("${resultcode}" STREQUAL "0")
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- endif ("${testtype}" STREQUAL "SKIP")
- ENDMACRO (ADD_H5_VERIFY_TEST)
+ endif ()
+ endif ()
+ endif ()
+ ENDMACRO ()
MACRO (ADD_H5_TEST_META testname testfile)
add_test (
@@ -336,7 +336,7 @@
add_test (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5)
set_tests_properties (H5REPACK_META-${testname} PROPERTIES WILL_FAIL "true")
set_tests_properties (H5REPACK_META-${testname} PROPERTIES DEPENDS H5REPACK_META-${testname}_M)
- ENDMACRO (ADD_H5_TEST_META)
+ ENDMACRO ()
MACRO (ADD_H5_UD_TEST testname resultcode resultfile)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -380,8 +380,8 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5REPACK_UD-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_UD-${testname}")
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_UD_TEST)
+ endif ()
+ ENDMACRO ()
##############################################################################
##############################################################################
@@ -597,7 +597,7 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
ADD_HELP_TEST(help 0 -h)
@@ -606,14 +606,14 @@
if (HDF5_ENABLE_SZIP_ENCODING)
set (passRegex "yes")
set_tests_properties (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "yes")
- else (HDF5_ENABLE_SZIP_ENCODING)
+ else ()
set (passRegex "no")
set_tests_properties (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no")
- endif (HDF5_ENABLE_SZIP_ENCODING)
- else (HDF5_ENABLE_SZIP_SUPPORT)
+ endif ()
+ else ()
set (passRegex "no")
set_tests_properties (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no")
- endif (HDF5_ENABLE_SZIP_SUPPORT)
+ endif ()
set_tests_properties (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS H5REPACK-clearall-objects)
add_test (NAME H5REPACK-h5repacktest COMMAND $<TARGET_FILE:h5repacktest>)
@@ -637,15 +637,15 @@
set (USE_FILTER_SZIP_ENCODER "no")
if (HDF5_ENABLE_SZIP_ENCODING)
set (USE_FILTER_SZIP_ENCODER ${testh5repack_detect_szip})
- endif (HDF5_ENABLE_SZIP_ENCODING)
+ endif ()
if (H5_HAVE_FILTER_DEFLATE)
set (USE_FILTER_DEFLATE "true")
- endif (H5_HAVE_FILTER_DEFLATE)
+ endif ()
if (H5_HAVE_FILTER_SZIP)
set (USE_FILTER_SZIP "true")
- endif (H5_HAVE_FILTER_SZIP)
+ endif ()
# copy files (these files have no filters)
ADD_H5_TEST (fill "TEST" ${FILE0})
@@ -662,7 +662,7 @@
set (TESTTYPE "TEST")
if (NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_DEFLATE)
+ endif ()
ADD_H5_TEST (gzip_individual ${TESTTYPE} ${arg})
# gzip for all
@@ -670,7 +670,7 @@
set (TESTTYPE "TEST")
if (NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_DEFLATE)
+ endif ()
ADD_H5_TEST (gzip_all ${TESTTYPE} ${arg})
# szip with individual object
@@ -678,7 +678,7 @@
set (TESTTYPE "TEST")
if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ endif ()
ADD_H5_TEST (szip_individual ${TESTTYPE} ${arg})
# szip for all
@@ -686,7 +686,7 @@
set (TESTTYPE "TEST")
if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ endif ()
ADD_H5_TEST (szip_all ${TESTTYPE} ${arg})
# shuffle with individual object
@@ -710,7 +710,7 @@
set (TESTTYPE "TEST")
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_DEFLATE)
+ endif ()
ADD_H5_TEST (all_filters ${TESTTYPE} ${arg})
# verbose gzip with individual object
@@ -718,7 +718,7 @@
set (TESTTYPE "TEST")
if (NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_DEFLATE)
+ endif ()
ADD_H5_CMP_TEST (gzip_verbose_filters "O?...ing file[^\n]+\n" ${TESTTYPE} 0 ${arg})
###########################################################
@@ -730,7 +730,7 @@
set (TESTTYPE "TEST")
if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ endif ()
ADD_H5_TEST (szip_copy ${TESTTYPE} ${arg})
# szip remove
@@ -738,7 +738,7 @@
set (TESTTYPE "TEST")
if (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ endif ()
ADD_H5_TEST (szip_remove ${TESTTYPE} ${arg})
# deflate copy
@@ -746,7 +746,7 @@
set (TESTTYPE "TEST")
if (NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_DEFLATE)
+ endif ()
ADD_H5_TEST (deflate_copy ${TESTTYPE} ${arg})
# deflate remove
@@ -754,7 +754,7 @@
set (TESTTYPE "TEST")
if (NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_DEFLATE)
+ endif ()
ADD_H5_TEST (deflate_remove ${TESTTYPE} ${arg})
# shuffle copy
@@ -802,7 +802,7 @@
set (TESTTYPE "TEST")
if (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER)
+ endif ()
ADD_H5_TEST (remove_all ${TESTTYPE} ${arg})
#filter conversions
@@ -810,14 +810,14 @@
set (TESTTYPE "TEST")
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_DEFLATE)
+ endif ()
ADD_H5_TEST (deflate_convert ${TESTTYPE} ${arg})
set (arg ${FILE7} -f dset_szip:GZIP=1)
set (TESTTYPE "TEST")
if (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE)
+ endif ()
ADD_H5_TEST (szip_convert ${TESTTYPE} ${arg})
#limit
@@ -825,7 +825,7 @@
set (TESTTYPE "TEST")
if (NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_DEFLATE)
+ endif ()
ADD_H5_DMP_TEST (deflate_limit ${TESTTYPE} 0 ${arg})
#file
@@ -833,7 +833,7 @@
set (TESTTYPE "TEST")
if (NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_DEFLATE)
+ endif ()
ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg})
#########################################################
@@ -920,7 +920,7 @@
set (TESTTYPE "TEST")
if (NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_DEFLATE)
+ endif ()
ADD_H5_VERIFY_TEST (layout_long_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg})
# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters)
@@ -928,7 +928,7 @@
set (TESTTYPE "TEST")
if (NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_DEFLATE)
+ endif ()
ADD_H5_VERIFY_TEST (layout_short_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg})
# several global filters
@@ -936,7 +936,7 @@
set (TESTTYPE "TEST")
if (NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_DEFLATE)
+ endif ()
ADD_H5_TEST (global_filters ${TESTTYPE} ${arg})
# syntax of -i infile -o outfile
@@ -945,7 +945,7 @@
set (TESTTYPE "LEGACY")
if (NOT USE_FILTER_DEFLATE)
set (TESTTYPE "SKIP")
- endif (NOT USE_FILTER_DEFLATE)
+ endif ()
ADD_H5_TEST_OLD (old_style_layout_short_switches ${TESTTYPE} ${arg})
# add a userblock to file
@@ -1005,4 +1005,4 @@
foreach (vfd ${VFD_LIST})
ADD_VFD_TEST (${vfd} 0)
endforeach (vfd ${VFD_LIST})
- endif (HDF5_TEST_VFD)
+ endif ()
diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt
index 2bee88c..8c9ec64 100644
--- a/tools/h5stat/CMakeLists.txt
+++ b/tools/h5stat/CMakeLists.txt
@@ -18,6 +18,17 @@ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5stat")
set (H5_DEP_EXECUTABLES h5stat)
+if (BUILD_SHARED_LIBS)
+ add_executable (h5stat-shared ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c)
+ TARGET_NAMING (h5stat-shared SHARED)
+ TARGET_C_PROPERTIES (h5stat-shared SHARED " " " ")
+ target_link_libraries (h5stat-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ set_target_properties (h5stat-shared PROPERTIES FOLDER tools)
+ set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5stat-shared")
+
+ set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5stat-shared)
+endif ()
+
if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5stat test executables
@@ -30,10 +41,10 @@ if (BUILD_TESTING)
set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools)
#add_test (NAME h5stat_gentest COMMAND $<TARGET_FILE:h5stat_gentest>)
- endif (HDF5_BUILD_GENERATORS)
+ endif ()
include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
##############################################################################
##############################################################################
@@ -44,13 +55,17 @@ endif (BUILD_TESTING)
#-----------------------------------------------------------------------------
# Rules for Installation of tools using make Install target
#-----------------------------------------------------------------------------
+if (HDF5_EXPORTED_TARGETS)
+ if (BUILD_SHARED_LIBS)
+ INSTALL_PROGRAM_PDB (h5stat-shared ${HDF5_INSTALL_BIN_DIR} toolsapplications)
+ endif ()
+ INSTALL_PROGRAM_PDB (h5stat ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-#INSTALL_PROGRAM_PDB (h5stat ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-
-install (
- TARGETS
- h5stat
- EXPORT
- ${HDF5_EXPORTED_TARGETS}
- RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
-)
+ install (
+ TARGETS
+ ${H5_DEP_EXECUTABLES}
+ EXPORT
+ ${HDF5_EXPORTED_TARGETS}
+ RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
+ )
+endif ()
diff --git a/tools/h5stat/CMakeTests.cmake b/tools/h5stat/CMakeTests.cmake
index 48622c9..00ce250 100644
--- a/tools/h5stat/CMakeTests.cmake
+++ b/tools/h5stat/CMakeTests.cmake
@@ -50,11 +50,11 @@
foreach (ddl_file ${HDF5_REFERENCE_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${ddl_file}" "${PROJECT_BINARY_DIR}/${ddl_file}" "h5stat_files")
- endforeach (ddl_file ${HDF5_REFERENCE_FILES})
+ endforeach ()
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "h5stat_files")
- endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ endforeach ()
add_custom_target(h5stat_files ALL COMMENT "Copying files needed by h5stat tests" DEPENDS ${h5stat_files_list})
##############################################################################
@@ -69,10 +69,10 @@
add_test (NAME H5STAT-${resultfile} COMMAND $<TARGET_FILE:h5stat> ${ARGN})
if (NOT ${resultcode} STREQUAL "0")
set_tests_properties (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true")
- endif (NOT ${resultcode} STREQUAL "0")
+ endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5STAT-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5STAT-${resultfile}-clear-objects
@@ -91,8 +91,8 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5STAT-${resultfile} PROPERTIES DEPENDS "H5STAT-${resultfile}-clear-objects")
- endif (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_TEST file)
+ endif ()
+ ENDMACRO ()
##############################################################################
##############################################################################
@@ -171,9 +171,9 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5STAT-clearall-objects PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "H5STAT-clearall-objects")
- endif (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
# Test for help flag
ADD_H5_TEST (h5stat_help1 0 -h)
@@ -193,7 +193,7 @@
ADD_H5_TEST (h5stat_filters-dT 0 -dT h5stat_filters.h5)
ADD_H5_TEST (h5stat_filters-UD 0 -D h5stat_filters.h5)
ADD_H5_TEST (h5stat_filters-UT 0 -T h5stat_filters.h5)
-# h5stat_tsohm.h5 is a copy of ../../../test/tsohm.h5 generated by tsohm.c
+# h5stat_tsohm.h5 is a copy of ../../../test/tsohm.h5 generated by tsohm.c
# as of release 1.8.0-alpha4
ADD_H5_TEST (h5stat_tsohm 0 h5stat_tsohm.h5)
# h5stat_newgrat.h5 is generated by h5stat_gentest.c
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index caa81bf..4c145a4 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -63,7 +63,7 @@ if (BUILD_SHARED_LIBS)
)
#set_property (TARGET ${HDF5_TOOLS_LIBSH_TARGET} APPEND PROPERTY COMPILE_DEFINITIONS H5DIFF_DEBUG)
set (install_targets ${install_targets} ${HDF5_TOOLS_LIBSH_TARGET})
-endif (BUILD_SHARED_LIBS)
+endif ()
##############################################################################
##############################################################################
@@ -89,7 +89,8 @@ install (
if (HDF5_EXPORTED_TARGETS)
if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} toolslibraries)
- endif (BUILD_SHARED_LIBS)
+ endif ()
+ INSTALL_TARGET_PDB (${HDF5_TOOLS_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} toolslibraries)
install (
TARGETS
@@ -102,4 +103,4 @@ if (HDF5_EXPORTED_TARGETS)
FRAMEWORK DESTINATION ${HDF5_INSTALL_FWRK_DIR} COMPONENT toolslibraries
INCLUDES DESTINATION include
)
-endif (HDF5_EXPORTED_TARGETS)
+endif ()
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index 1ee9054..e4b166f 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -13,10 +13,6 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <math.h>
-#include <time.h>
-#include <sys/timeb.h>
-
#include "H5private.h"
#include "h5tools.h"
#include "h5tools_utils.h"
diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt
index 68f97d4..da1af42 100644
--- a/tools/misc/CMakeLists.txt
+++ b/tools/misc/CMakeLists.txt
@@ -42,7 +42,7 @@ set (H5_DEP_EXECUTABLES
#-----------------------------------------------------------------------------
#if (NOT WIN32)
# configure_file (${HDF5_TOOLS_MISC_SOURCE_DIR}/h5cc.in ${HDF5_BINARY_DIR}/h5cc @ONLY)
-#endif (NOT WIN32)
+#endif ()
if (BUILD_TESTING)
# --------------------------------------------------------------------
@@ -55,7 +55,7 @@ if (BUILD_TESTING)
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>)
- endif (HDF5_BUILD_GENERATORS)
+ endif ()
add_executable (h5repart_test ${HDF5_TOOLS_MISC_SOURCE_DIR}/repart_test.c)
TARGET_NAMING (h5repart_test STATIC)
@@ -64,7 +64,7 @@ if (BUILD_TESTING)
set_target_properties (h5repart_test PROPERTIES FOLDER tools)
include (CMakeTests.cmake)
-endif (BUILD_TESTING)
+endif ()
##############################################################################
##############################################################################
@@ -75,15 +75,16 @@ endif (BUILD_TESTING)
#-----------------------------------------------------------------------------
# Rules for Installation of tools using make Install target
#-----------------------------------------------------------------------------
+if (HDF5_EXPORTED_TARGETS)
+ INSTALL_PROGRAM_PDB (h5debug ${HDF5_INSTALL_BIN_DIR} toolsapplications)
+ INSTALL_PROGRAM_PDB (h5repart ${HDF5_INSTALL_BIN_DIR} toolsapplications)
+ INSTALL_PROGRAM_PDB (h5mkgrp ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-#INSTALL_PROGRAM_PDB (h5debug ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-#INSTALL_PROGRAM_PDB (h5repart ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-#INSTALL_PROGRAM_PDB (h5mkgrp ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-
-install (
- TARGETS
- h5debug h5repart h5mkgrp
- EXPORT
- ${HDF5_EXPORTED_TARGETS}
- RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
-)
+ install (
+ TARGETS
+ h5debug h5repart h5mkgrp
+ EXPORT
+ ${HDF5_EXPORTED_TARGETS}
+ RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications
+ )
+endif ()
diff --git a/tools/misc/CMakeTests.cmake b/tools/misc/CMakeTests.cmake
index 6822be5..d065b63 100644
--- a/tools/misc/CMakeTests.cmake
+++ b/tools/misc/CMakeTests.cmake
@@ -31,7 +31,7 @@
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "h5repart_files")
- endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ endforeach ()
add_custom_target(h5repart_files ALL COMMENT "Copying files needed by h5repart tests" DEPENDS ${h5repart_files_list})
set (HDF5_MKGRP_TEST_FILES
@@ -56,7 +56,7 @@
foreach (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_mkgrp_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}" "h5mkgrp_files")
- endforeach (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
+ endforeach ()
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_help.txt" "${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_help.txt" "h5mkgrp_files")
add_custom_target(h5mkgrp_files ALL COMMENT "Copying files needed by h5mkgrp tests" DEPENDS ${h5mkgrp_files_list})
@@ -80,7 +80,7 @@
${resultfile}.out.err
)
set_tests_properties (H5MKGRP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
add_test (
NAME H5MKGRP-${resultfile}
@@ -90,8 +90,8 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5MKGRP-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
- else (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
+ else ()
set_tests_properties (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-${resultfile}-clear-objects)
add_test (
NAME H5MKGRP-${resultfile}-h5ls
@@ -106,13 +106,13 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5MKGRP-${resultfile}-h5ls PROPERTIES DEPENDS H5MKGRP-${resultfile})
- endif (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_TEST resultfile resultcode resultoption)
+ endif ()
+ ENDMACRO ()
MACRO (ADD_H5_CMP resultfile resultcode)
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5MKGRP_CMP-${resultfile} COMMAND $<TARGET_FILE:h5mkgrp> ${ARGN})
- else (HDF5_ENABLE_USING_MEMCHECKER)
+ else ()
add_test (
NAME H5MKGRP_CMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -134,8 +134,8 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
set_tests_properties (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-${resultfile}-clear-objects)
- endif (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_CMP resultfile resultcode)
+ endif ()
+ ENDMACRO ()
##############################################################################
##############################################################################
@@ -158,7 +158,7 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPART-clearall-objects PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "H5REPART-clearall-objects")
# repartition family member size to 20,000 bytes.
@@ -230,9 +230,9 @@
set_tests_properties (H5MKGRP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5MKGRP-clearall-objects PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "H5MKGRP-clearall-objects")
- endif (HDF5_ENABLE_USING_MEMCHECKER)
+ endif ()
# Check that help & version is displayed properly
ADD_H5_CMP (h5mkgrp_help 0 "-h")
diff --git a/tools/perform/CMakeLists.txt b/tools/perform/CMakeLists.txt
index d80f4e4..a52b22b 100644
--- a/tools/perform/CMakeLists.txt
+++ b/tools/perform/CMakeLists.txt
@@ -37,10 +37,10 @@ if (HDF5_BUILD_PERFORM_STANDALONE)
TARGET_C_PROPERTIES (h5perf_serial_alone STATIC " " " ")
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
+ set_property (TARGET h5perf_serial_alone
APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE
)
-endif (HDF5_BUILD_PERFORM_STANDALONE)
+endif ()
#-- Adding test for chunk
set (chunk_SRCS
@@ -82,7 +82,7 @@ if (BUILD_TESTING)
TARGET_C_PROPERTIES (perf_meta STATIC " " " ")
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)
+endif ()
#-- Adding test for zip_perf
set (zip_perf_SRCS
@@ -117,10 +117,10 @@ if (H5_HAVE_PARALLEL AND BUILD_TESTING)
TARGET_C_PROPERTIES (h5perf_alone STATIC " " " ")
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
+ set_property (TARGET h5perf_alone
APPEND PROPERTY COMPILE_DEFINITIONS STANDALONE
)
- endif (HDF5_BUILD_PERFORM_STANDALONE)
-endif (H5_HAVE_PARALLEL AND BUILD_TESTING)
+ endif ()
+endif ()
include (CMakeTests.cmake)
diff --git a/tools/perform/CMakeTests.cmake b/tools/perform/CMakeTests.cmake
index 0ea40a3..137fb38 100644
--- a/tools/perform/CMakeTests.cmake
+++ b/tools/perform/CMakeTests.cmake
@@ -32,7 +32,7 @@ set_tests_properties (PERFORM_h5perf_serial PROPERTIES TIMEOUT 1800)
if (HDF5_BUILD_PERFORM_STANDALONE)
add_test (NAME PERFORM_h5perf_serial_alone COMMAND $<TARGET_FILE:h5perf_serial_alone>)
-endif (HDF5_BUILD_PERFORM_STANDALONE)
+endif ()
add_test (NAME PERFORM_chunk COMMAND $<TARGET_FILE:chunk>)
@@ -50,5 +50,5 @@ if (H5_HAVE_PARALLEL)
if (HDF5_BUILD_PERFORM_STANDALONE)
add_test (NAME PERFORM_h5perf_alone COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf_alone>)
- endif (HDF5_BUILD_PERFORM_STANDALONE)
-endif (H5_HAVE_PARALLEL)
+ endif ()
+endif ()