summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/CMakeLists.txt6
-rw-r--r--tools/h5copy/CMakeLists.txt26
-rw-r--r--tools/h5copy/CMakeTests.cmake134
-rw-r--r--tools/h5diff/CMakeLists.txt42
-rw-r--r--tools/h5diff/CMakeTests.cmake170
-rw-r--r--tools/h5dump/CMakeLists.txt30
-rw-r--r--tools/h5dump/CMakeTests.cmake220
-rw-r--r--tools/h5dump/CMakeTestsPBITS.cmake60
-rw-r--r--tools/h5dump/CMakeTestsXML.cmake66
-rw-r--r--tools/h5import/CMakeLists.txt24
-rw-r--r--tools/h5import/CMakeTests.cmake90
-rw-r--r--tools/h5jam/CMakeLists.txt44
-rw-r--r--tools/h5jam/CMakeTests.cmake112
-rw-r--r--tools/h5ls/CMakeLists.txt16
-rw-r--r--tools/h5ls/CMakeTests.cmake56
-rw-r--r--tools/h5repack/CMakeLists.txt48
-rw-r--r--tools/h5repack/CMakeTests.cmake632
-rw-r--r--tools/h5stat/CMakeLists.txt26
-rw-r--r--tools/h5stat/CMakeTests.cmake48
-rw-r--r--tools/lib/CMakeLists.txt38
-rw-r--r--tools/misc/CMakeLists.txt48
-rw-r--r--tools/misc/CMakeTests.cmake64
22 files changed, 1000 insertions, 1000 deletions
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 3bb4a1f..0dfe7c9 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -4,7 +4,7 @@ PROJECT (HDF5_TOOLS)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF5_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Setup include Directories
@@ -14,9 +14,9 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SOURCE_DIR}/lib)
# --------------------------------------------------------------------
# If testing was NOT enabled, then we need to build the tools library
# --------------------------------------------------------------------
-IF (NOT BUILD_TESTING)
+if (NOT BUILD_TESTING)
ADD_SUBDIRECTORY (${HDF5_TOOLS_SOURCE_DIR}/lib)
-ENDIF (NOT BUILD_TESTING)
+endif (NOT BUILD_TESTING)
#-- 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 6faf332..79deec9 100644
--- a/tools/h5copy/CMakeLists.txt
+++ b/tools/h5copy/CMakeLists.txt
@@ -9,27 +9,27 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5copy and test executables
# --------------------------------------------------------------------
-ADD_EXECUTABLE (h5copy ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copy.c)
+add_executable (h5copy ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copy.c)
TARGET_NAMING (h5copy ${LIB_TYPE})
TARGET_C_PROPERTIES (h5copy " " " ")
-TARGET_LINK_LIBRARIES (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5copy PROPERTIES FOLDER tools)
+target_link_libraries (h5copy ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5copy PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES h5copy)
+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)
+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_LINK_LIBRARIES (h5copygentest ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5copygentest PROPERTIES FOLDER generator/tools)
+ target_link_libraries (h5copygentest ${HDF5_LIB_TARGET})
+ set_target_properties (h5copygentest PROPERTIES FOLDER generator/tools)
#ADD_TEST (NAME h5copygentest COMMAND $<TARGET_FILE:h5copygentest>)
- ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- INCLUDE (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+ include (CMakeTests.cmake)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -43,7 +43,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5copy ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5copy
RUNTIME DESTINATION
diff --git a/tools/h5copy/CMakeTests.cmake b/tools/h5copy/CMakeTests.cmake
index a4cce03..0d8f121 100644
--- a/tools/h5copy/CMakeTests.cmake
+++ b/tools/h5copy/CMakeTests.cmake
@@ -8,30 +8,30 @@
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
- SET (LIST_HDF5_TEST_FILES
+ set (LIST_HDF5_TEST_FILES
${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_extlinks_src.h5
${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_extlinks_trg.h5
${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_ref.h5
${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copytst.h5
)
- SET (LIST_OTHER_TEST_FILES
+ set (LIST_OTHER_TEST_FILES
${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_misc1.out
)
FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- FOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${listfiles}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
- #MESSAGE (STATUS " Copying ${listfiles}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #message (STATUS " Copying ${listfiles}")
+ add_custom_command (
TARGET h5copy
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${listfiles} ${dest}
)
- ENDFOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ endforeach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
##############################################################################
##############################################################################
@@ -43,7 +43,7 @@
# Perform h5copy according to passing parmeters
#
MACRO (ADD_H5_F_TEST testname resultcode infile fparam vparam sparam srcname dparam dstname)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
ADD_TEST (
NAME H5COPY_F-${testname}-clear-objects
@@ -51,35 +51,35 @@
-E remove
./testfiles/${testname}.out.h5
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5COPY_F-${testname}
COMMAND $<TARGET_FILE:h5copy> -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
+ 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 (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
SET_TESTS_PROPERTIES (H5COPY_F-${testname} PROPERTIES DEPENDS H5COPY_F-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# resultcode=2 will cause the test to skip the diff test
- IF (NOT ${resultcode} STREQUAL "2")
+ if (NOT ${resultcode} STREQUAL "2")
ADD_TEST (
NAME H5COPY_F-${testname}-DIFF
COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
SET_TESTS_PROPERTIES(H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname})
- IF (${resultcode} STREQUAL "1")
+ if (${resultcode} STREQUAL "1")
SET_TESTS_PROPERTIES (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- ENDIF (NOT ${resultcode} STREQUAL "2")
+ endif (${resultcode} STREQUAL "1")
+ endif (NOT ${resultcode} STREQUAL "2")
ENDMACRO (ADD_H5_F_TEST)
MACRO (ADD_H5_TEST testname resultcode infile vparam sparam srcname dparam dstname)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
ADD_TEST (
NAME H5COPY-${testname}-clear-objects
@@ -87,35 +87,35 @@
-E remove
./testfiles/${testname}.out.h5
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5COPY-${testname}
COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
+ 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 (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# resultcode=2 will cause the test to skip the diff test
- IF (NOT ${resultcode} STREQUAL "2")
+ if (NOT ${resultcode} STREQUAL "2")
ADD_TEST (
NAME H5COPY-${testname}-DIFF
COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
- IF (${resultcode} STREQUAL "1")
+ if (${resultcode} STREQUAL "1")
SET_TESTS_PROPERTIES (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- ENDIF (NOT ${resultcode} STREQUAL "2")
+ endif (${resultcode} STREQUAL "1")
+ endif (NOT ${resultcode} STREQUAL "2")
ENDMACRO (ADD_H5_TEST)
MACRO (ADD_H5_TEST2 testname resultcode infile psparam pdparam vparam sparam srcname dparam dstname)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
ADD_TEST (
NAME H5COPY-${testname}-clear-objects
@@ -123,19 +123,19 @@
-E remove
./testfiles/${testname}.out.h5
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5COPY-${testname}-prefill
COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
+ 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 (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
SET_TESTS_PROPERTIES (H5COPY-${testname}-prefill PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5COPY-${testname}
@@ -143,20 +143,20 @@
)
SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-prefill)
# resultcode=2 will cause the test to skip the diff test
- IF (NOT ${resultcode} STREQUAL "2")
+ if (NOT ${resultcode} STREQUAL "2")
ADD_TEST (
NAME H5COPY-${testname}-DIFF
COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
- IF (${resultcode} STREQUAL "1")
+ if (${resultcode} STREQUAL "1")
SET_TESTS_PROPERTIES (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- ENDIF (NOT ${resultcode} STREQUAL "2")
+ endif (${resultcode} STREQUAL "1")
+ endif (NOT ${resultcode} STREQUAL "2")
ENDMACRO (ADD_H5_TEST2)
MACRO (ADD_H5_TEST_SAME testname resultcode pfile psparam pdparam vparam sparam srcname dparam dstname)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
ADD_TEST (
NAME H5COPY_SAME-${testname}-clear-objects
@@ -164,19 +164,19 @@
-E remove
./testfiles/${testname}.out.h5
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5COPY_SAME-${testname}-prefill
COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${pfile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
+ 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 (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS H5COPY_SAME-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5COPY_SAME-${testname}
@@ -184,16 +184,16 @@
)
SET_TESTS_PROPERTIES (H5COPY_SAME-${testname} PROPERTIES DEPENDS H5COPY_SAME-${testname}-prefill)
# resultcode=2 will cause the test to skip the diff test
- IF (NOT ${resultcode} STREQUAL "2")
+ if (NOT ${resultcode} STREQUAL "2")
ADD_TEST (
NAME H5COPY_SAME-${testname}-DIFF
COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
SET_TESTS_PROPERTIES(H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname})
- IF (${resultcode} STREQUAL "1")
+ if (${resultcode} STREQUAL "1")
SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- ENDIF (NOT ${resultcode} STREQUAL "2")
+ endif (${resultcode} STREQUAL "1")
+ endif (NOT ${resultcode} STREQUAL "2")
ENDMACRO (ADD_H5_TEST_SAME)
#
@@ -202,15 +202,15 @@
#
MACRO (ADD_H5_CMP_TEST testname resultcode infile vparam sparam srcname dparam dstname)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
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")
+ if (${resultcode} STREQUAL "1")
SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- IF (NOT "${last_test}" STREQUAL "")
+ endif (${resultcode} STREQUAL "1")
+ 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 (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
ADD_TEST (
NAME H5COPY-CMP-${testname}-clear-objects
@@ -233,7 +233,7 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES DEPENDS H5COPY-CMP-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_CMP_TEST)
##############################################################################
@@ -245,12 +245,12 @@
# --------------------------------------------------------------------
# test file names
# --------------------------------------------------------------------
- SET (HDF_FILE1 h5copytst)
- SET (HDF_FILE2 h5copy_ref)
- SET (HDF_EXT_SRC_FILE h5copy_extlinks_src)
- SET (HDF_EXT_TRG_FILE h5copy_extlinks_trg)
+ set (HDF_FILE1 h5copytst)
+ set (HDF_FILE2 h5copy_ref)
+ set (HDF_EXT_SRC_FILE h5copy_extlinks_src)
+ set (HDF_EXT_TRG_FILE h5copy_extlinks_trg)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
ADD_TEST (
NAME H5COPY-clearall-objects
@@ -292,11 +292,11 @@
h5copy_misc1.out.out.err
)
SET_TESTS_PROPERTIES (H5COPY-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5COPY-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5COPY-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5COPY-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# "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 d79c290..3ef108b 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -9,45 +9,45 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5diff executables
# --------------------------------------------------------------------
-ADD_EXECUTABLE (h5diff
+add_executable (h5diff
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_common.c
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_main.c
)
TARGET_NAMING (h5diff ${LIB_TYPE})
TARGET_C_PROPERTIES (h5diff " " " ")
-TARGET_LINK_LIBRARIES (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5diff PROPERTIES FOLDER tools)
+target_link_libraries (h5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5diff PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES h5diff)
+set (H5_DEP_EXECUTABLES h5diff)
-IF (H5_HAVE_PARALLEL)
- ADD_EXECUTABLE (ph5diff
+if (H5_HAVE_PARALLEL)
+ add_executable (ph5diff
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diff_common.c
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/ph5diff_main.c
)
TARGET_NAMING (ph5diff ${LIB_TYPE})
TARGET_C_PROPERTIES (ph5diff " " " ")
- TARGET_LINK_LIBRARIES (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (ph5diff PROPERTIES FOLDER tools)
-ENDIF (H5_HAVE_PARALLEL)
+ target_link_libraries (ph5diff ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+ set_target_properties (ph5diff PROPERTIES FOLDER tools)
+endif (H5_HAVE_PARALLEL)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5diff and test executables
# --------------------------------------------------------------------
- IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (h5diffgentest ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/h5diffgentest.c)
+ 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_LINK_LIBRARIES (h5diffgentest ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5diffgentest PROPERTIES FOLDER generator/tools)
+ target_link_libraries (h5diffgentest ${HDF5_LIB_TARGET})
+ set_target_properties (h5diffgentest PROPERTIES FOLDER generator/tools)
#ADD_TEST (NAME h5diffgentest COMMAND $<TARGET_FILE:h5diffgentest>)
- ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- INCLUDE (CMakeTests.cmake)
+ include (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -61,7 +61,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5diff ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5diff
RUNTIME DESTINATION
@@ -70,11 +70,11 @@ INSTALL (
toolsapplications
)
-IF (H5_HAVE_PARALLEL)
+if (H5_HAVE_PARALLEL)
#INSTALL_PROGRAM_PDB (ph5diff ${HDF5_INSTALL_BIN_DIR} toolsapplications)
- INSTALL (
+ install (
TARGETS
ph5diff
RUNTIME DESTINATION
@@ -82,4 +82,4 @@ IF (H5_HAVE_PARALLEL)
COMPONENT
toolsapplications
)
-ENDIF (H5_HAVE_PARALLEL)
+endif (H5_HAVE_PARALLEL)
diff --git a/tools/h5diff/CMakeTests.cmake b/tools/h5diff/CMakeTests.cmake
index cac4f84..f13f689 100644
--- a/tools/h5diff/CMakeTests.cmake
+++ b/tools/h5diff/CMakeTests.cmake
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
- SET (LIST_HDF5_TEST_FILES
+ set (LIST_HDF5_TEST_FILES
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_basic1.h5
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_basic2.h5
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_types.h5
@@ -52,7 +52,7 @@
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/non_comparables2.h5
)
- SET (LIST_OTHER_TEST_FILES
+ set (LIST_OTHER_TEST_FILES
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_10.txt
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_100.txt
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_101.txt
@@ -239,50 +239,50 @@
#
# copy test files from source to build dir
#
- FOREACH (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ foreach (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${h5_tstfiles}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
- #MESSAGE (STATUS " Copying ${fname}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #message (STATUS " Copying ${fname}")
+ add_custom_command (
TARGET h5diff
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${h5_tstfiles} ${dest}
)
- ENDFOREACH (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ endforeach (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
#
# Overwrite system dependent files (Windows)
#
- IF (WIN32 AND NOT CYGWIN)
- ADD_CUSTOM_COMMAND (
+ if (WIN32 AND NOT CYGWIN)
+ add_custom_command (
TARGET h5diff
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_101w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_101.txt
)
- ADD_CUSTOM_COMMAND (
+ add_custom_command (
TARGET h5diff
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_102.txt
)
- ADD_CUSTOM_COMMAND (
+ add_custom_command (
TARGET h5diff
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_103w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_103.txt
)
- ADD_CUSTOM_COMMAND (
+ add_custom_command (
TARGET h5diff
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_104.txt
)
- ENDIF (WIN32 AND NOT CYGWIN)
+ endif (WIN32 AND NOT CYGWIN)
##############################################################################
##############################################################################
@@ -292,16 +292,16 @@
MACRO (ADD_H5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DIFF-${resultfile} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT ${resultcode} STREQUAL "0")
+ if (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DIFF-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -320,24 +320,24 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS "H5DIFF-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (H5_HAVE_PARALLEL)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
+ if (H5_HAVE_PARALLEL)
ADD_PH5_TEST (${resultfile} ${resultcode} ${ARGN})
- ENDIF (H5_HAVE_PARALLEL)
+ endif (H5_HAVE_PARALLEL)
ENDMACRO (ADD_H5_TEST file)
MACRO (ADD_PH5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME PH5DIFF-${resultfile} COMMAND $<TARGET_FILE:ph5diff> ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} ${ARGN})
SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT ${resultcode} STREQUAL "0")
+ if (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME PH5DIFF-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -358,7 +358,7 @@
-P "${HDF5_RESOURCES_DIR}/prunTest.cmake"
)
SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS "PH5DIFF-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_PH5_TEST file)
# ADD_H5_NO_OUTPUT_TEST
@@ -366,30 +366,30 @@
# Don't use this if possible; this may be removed.
MACRO (ADD_H5_NO_OUTPUT_TEST testname resultcode)
# If using memchecker add tests without using scripts
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DIFF-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove ./testfiles/${testname}.out ./testfiles/${testname}.out.err
)
# if there was a previous test
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DIFF-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DIFF-${testname} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
- IF (NOT ${resultcode} STREQUAL "0")
+ if (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
+ endif (NOT ${resultcode} STREQUAL "0")
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES DEPENDS H5DIFF-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_NO_OUTPUT_TEST)
##############################################################################
@@ -401,54 +401,54 @@
# --------------------------------------------------------------------
# test file names
# --------------------------------------------------------------------
- SET (FILE1 h5diff_basic1.h5)
- SET (FILE2 h5diff_basic2.h5)
- SET (FILE3 h5diff_types.h5)
- SET (FILE4 h5diff_dtypes.h5)
- SET (FILE5 h5diff_attr1.h5)
- SET (FILE6 h5diff_attr2.h5)
- SET (FILE7 h5diff_dset1.h5)
- SET (FILE8 h5diff_dset2.h5)
- SET (FILE9 h5diff_hyper1.h5)
- SET (FILE10 h5diff_hyper2.h5)
- SET (FILE11 h5diff_empty.h5)
- SET (FILE12 h5diff_links.h5)
- SET (FILE13 h5diff_softlinks.h5)
- SET (FILE14 h5diff_linked_softlink.h5)
- SET (FILE15 h5diff_extlink_src.h5)
- SET (FILE16 h5diff_extlink_trg.h5)
- SET (FILE17 h5diff_ext2softlink_src.h5)
- SET (FILE18 h5diff_ext2softlink_trg.h5)
- SET (FILE19 h5diff_dset_zero_dim_size1.h5)
- SET (FILE20 h5diff_dset_zero_dim_size2.h5)
- SET (DANGLE_LINK_FILE1 h5diff_danglelinks1.h5)
- SET (DANGLE_LINK_FILE2 h5diff_danglelinks2.h5)
- SET (GRP_RECURSE_FILE1 h5diff_grp_recurse1.h5)
- SET (GRP_RECURSE_FILE2 h5diff_grp_recurse2.h5)
+ set (FILE1 h5diff_basic1.h5)
+ set (FILE2 h5diff_basic2.h5)
+ set (FILE3 h5diff_types.h5)
+ set (FILE4 h5diff_dtypes.h5)
+ set (FILE5 h5diff_attr1.h5)
+ set (FILE6 h5diff_attr2.h5)
+ set (FILE7 h5diff_dset1.h5)
+ set (FILE8 h5diff_dset2.h5)
+ set (FILE9 h5diff_hyper1.h5)
+ set (FILE10 h5diff_hyper2.h5)
+ set (FILE11 h5diff_empty.h5)
+ set (FILE12 h5diff_links.h5)
+ set (FILE13 h5diff_softlinks.h5)
+ set (FILE14 h5diff_linked_softlink.h5)
+ set (FILE15 h5diff_extlink_src.h5)
+ set (FILE16 h5diff_extlink_trg.h5)
+ set (FILE17 h5diff_ext2softlink_src.h5)
+ set (FILE18 h5diff_ext2softlink_trg.h5)
+ set (FILE19 h5diff_dset_zero_dim_size1.h5)
+ set (FILE20 h5diff_dset_zero_dim_size2.h5)
+ set (DANGLE_LINK_FILE1 h5diff_danglelinks1.h5)
+ set (DANGLE_LINK_FILE2 h5diff_danglelinks2.h5)
+ set (GRP_RECURSE_FILE1 h5diff_grp_recurse1.h5)
+ set (GRP_RECURSE_FILE2 h5diff_grp_recurse2.h5)
# group recursive - same structure via external links through files
- SET (GRP_RECURSE1_EXT h5diff_grp_recurse_ext1.h5)
- SET (GRP_RECURSE2_EXT1 h5diff_grp_recurse_ext2-1.h5)
- SET (GRP_RECURSE2_EXT2 h5diff_grp_recurse_ext2-2.h5)
- SET (GRP_RECURSE2_EXT3 h5diff_grp_recurse_ext2-3.h5)
+ set (GRP_RECURSE1_EXT h5diff_grp_recurse_ext1.h5)
+ set (GRP_RECURSE2_EXT1 h5diff_grp_recurse_ext2-1.h5)
+ set (GRP_RECURSE2_EXT2 h5diff_grp_recurse_ext2-2.h5)
+ set (GRP_RECURSE2_EXT3 h5diff_grp_recurse_ext2-3.h5)
# same structure, same obj name with different value
- SET (EXCLUDE_FILE1_1 h5diff_exclude1-1.h5)
- SET (EXCLUDE_FILE1_2 h5diff_exclude1-2.h5)
+ set (EXCLUDE_FILE1_1 h5diff_exclude1-1.h5)
+ set (EXCLUDE_FILE1_2 h5diff_exclude1-2.h5)
# different structure and obj names
- SET (EXCLUDE_FILE2_1 h5diff_exclude2-1.h5)
- SET (EXCLUDE_FILE2_2 h5diff_exclude2-2.h5)
+ set (EXCLUDE_FILE2_1 h5diff_exclude2-1.h5)
+ set (EXCLUDE_FILE2_2 h5diff_exclude2-2.h5)
# Only one file contains unique objs. Common objs are same.
- SET (EXCLUDE_FILE3_1 h5diff_exclude3-1.h5)
- SET (EXCLUDE_FILE3_2 h5diff_exclude3-2.h5)
+ set (EXCLUDE_FILE3_1 h5diff_exclude3-1.h5)
+ set (EXCLUDE_FILE3_2 h5diff_exclude3-2.h5)
# compound type with multiple vlen string types
- SET (COMP_VL_STRS_FILE h5diff_comp_vl_strs.h5)
+ set (COMP_VL_STRS_FILE h5diff_comp_vl_strs.h5)
# container types (array,vlen) with multiple nested compound types
- SET (COMPS_ARRAY_VLEN_FILE1 compounds_array_vlen1.h5)
- SET (COMPS_ARRAY_VLEN_FILE2 compounds_array_vlen2.h5)
+ set (COMPS_ARRAY_VLEN_FILE1 compounds_array_vlen1.h5)
+ set (COMPS_ARRAY_VLEN_FILE2 compounds_array_vlen2.h5)
# attrs with verbose option level
- SET (ATTR_VERBOSE_LEVEL_FILE1 h5diff_attr_v_level1.h5)
- SET (ATTR_VERBOSE_LEVEL_FILE2 h5diff_attr_v_level2.h5)
+ set (ATTR_VERBOSE_LEVEL_FILE1 h5diff_attr_v_level1.h5)
+ set (ATTR_VERBOSE_LEVEL_FILE2 h5diff_attr_v_level2.h5)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
ADD_TEST (
NAME H5DIFF-clearall-objects
@@ -802,11 +802,11 @@
h5diff_90.out.err
)
SET_TESTS_PROPERTIES (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DIFF-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DIFF-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5DIFF-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# ############################################################################
# # Common usage
@@ -1074,7 +1074,7 @@ ADD_H5_TEST (h5diff_90 0 -v ${FILE2} ${FILE2})
# 10. read by hyperslab, print indexes
#if test -n "$pmode" -a "$mydomainname" = hdfgroup.uiuc.edu; then
# # skip this test which sometimes hangs in some THG machines
-# MESSAGE (STATUS "SKIP -v ${FILE9} ${FILE10})
+# message (STATUS "SKIP -v ${FILE9} ${FILE10})
#else
# ADD_H5_TEST (h5diff_100 1 -v ${FILE9} ${FILE10})
#fi
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index 30ff215..ce162ad 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -9,38 +9,38 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5dump executables
# --------------------------------------------------------------------
-ADD_EXECUTABLE (h5dump
+add_executable (h5dump
${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 ${LIB_TYPE})
TARGET_C_PROPERTIES (h5dump " " " ")
-TARGET_LINK_LIBRARIES (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5dump PROPERTIES FOLDER tools)
+target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5dump PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES h5dump)
+set (H5_DEP_EXECUTABLES h5dump)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5dump test executable
# --------------------------------------------------------------------
- IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (h5dumpgentest ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dumpgentest.c)
+ 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_LINK_LIBRARIES (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5dumpgentest PROPERTIES FOLDER generator/tools)
+ target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools)
#ADD_TEST (NAME h5dumpgentest COMMAND $<TARGET_FILE:h5dumpgentest>)
- ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- INCLUDE (CMakeTests.cmake)
+ include (CMakeTests.cmake)
- INCLUDE (CMakeTestsPBITS.cmake)
+ include (CMakeTestsPBITS.cmake)
- INCLUDE (CMakeTestsXML.cmake)
-ENDIF (BUILD_TESTING)
+ include (CMakeTestsXML.cmake)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -54,7 +54,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5dump ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5dump
RUNTIME DESTINATION
diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake
index 13c3d41..486b21c 100644
--- a/tools/h5dump/CMakeTests.cmake
+++ b/tools/h5dump/CMakeTests.cmake
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
- SET (HDF5_REFERENCE_FILES
+ set (HDF5_REFERENCE_FILES
${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/file_space.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/filter_fail.ddl
@@ -173,7 +173,7 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/out3.h5import
${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.ddl
)
- SET (HDF5_REFERENCE_EXP_FILES
+ set (HDF5_REFERENCE_EXP_FILES
tall-6.exp
tnoddlfile.exp
trawdatafile.exp
@@ -183,7 +183,7 @@
twithddl.exp
twithddlfile.exp
)
- SET (HDF5_REFERENCE_TEST_FILES
+ set (HDF5_REFERENCE_TEST_FILES
${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/file_space.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/filter_fail.h5
@@ -280,7 +280,7 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.h5
)
- SET (HDF5_ERROR_REFERENCE_TEST_FILES
+ set (HDF5_ERROR_REFERENCE_TEST_FILES
${PROJECT_SOURCE_DIR}/errfiles/filter_fail.err
${PROJECT_SOURCE_DIR}/errfiles/tall-1.err
${PROJECT_SOURCE_DIR}/errfiles/tall-2A.err
@@ -312,77 +312,77 @@
#
# copy test files from source dir to test dir
#
- FOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
+ foreach (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${tst_h5_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
- #MESSAGE (STATUS " Copying ${tst_h5_file}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
+ #message (STATUS " Copying ${tst_h5_file}")
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${tst_h5_file} ${dest}
)
- ENDFOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
+ endforeach (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
- FOREACH (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
- IF (WIN32 AND NOT CYGWIN)
+ foreach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
+ if (WIN32 AND NOT CYGWIN)
FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} TEST_STREAM)
FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}")
- ELSE (WIN32 AND NOT CYGWIN)
- ADD_CUSTOM_COMMAND (
+ else (WIN32 AND NOT CYGWIN)
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file}
)
- ENDIF (WIN32 AND NOT CYGWIN)
- ENDFOREACH (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
+ endif (WIN32 AND NOT CYGWIN)
+ endforeach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
- FOREACH (tst_other_file ${HDF5_REFERENCE_FILES})
+ foreach (tst_other_file ${HDF5_REFERENCE_FILES})
GET_FILENAME_COMPONENT(fname "${tst_other_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
- #MESSAGE (STATUS " Copying ${tst_other_file}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
+ #message (STATUS " Copying ${tst_other_file}")
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${tst_other_file} ${dest}
)
- ENDFOREACH (tst_other_file ${HDF5_REFERENCE_FILES})
+ endforeach (tst_other_file ${HDF5_REFERENCE_FILES})
- FOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
+ foreach (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${tst_error_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
- #MESSAGE (STATUS " Copying ${tst_error_file}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
+ #message (STATUS " Copying ${tst_error_file}")
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${tst_error_file} ${dest}
)
- ENDFOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
+ endforeach (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
# --------------------------------------------------------------------
# Special file handling
# --------------------------------------------------------------------
- ADD_CUSTOM_COMMAND (
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl
)
- IF (WIN32 AND NOT CYGWIN)
+ if (WIN32 AND NOT CYGWIN)
FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM)
FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}")
- ELSE (WIN32 AND NOT CYGWIN)
- ADD_CUSTOM_COMMAND (
+ else (WIN32 AND NOT CYGWIN)
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp
)
- ENDIF (WIN32 AND NOT CYGWIN)
+ endif (WIN32 AND NOT CYGWIN)
##############################################################################
##############################################################################
@@ -392,14 +392,14 @@
MACRO (ADD_HELP_TEST testname resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DUMP-${testname} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP-${testname}")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5DUMP-${testname}")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-h5dump-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -418,34 +418,34 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5DUMP-h5dump-${testname} PROPERTIES DEPENDS "H5DUMP-h5dump-${testname}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_HELP_TEST)
MACRO (ADD_SKIP_H5_TEST skipresultfile skipresultcode testtype)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (${testtype} STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-${skipresultfile}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${skipresultfile} ${ARGN}"
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ELSE (${testtype} STREQUAL "SKIP")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ else (${testtype} STREQUAL "SKIP")
ADD_H5_TEST (${skipresultfile} ${skipresultcode} ${ARGN})
- ENDIF (${testtype} STREQUAL "SKIP")
+ endif (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_SKIP_H5_TEST)
MACRO (ADD_H5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT ${resultcode} STREQUAL "0")
+ if (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -464,21 +464,21 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST file)
MACRO (ADD_H5_TEST_N resultfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DUMP-N-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT ${resultcode} STREQUAL "0")
+ if (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-N-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -497,21 +497,21 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES DEPENDS "H5DUMP-N-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST_N file)
MACRO (ADD_H5_TEST_EXPORT resultfile targetfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${resultfile}.txt ${targetfile})
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT ${resultcode} STREQUAL "0")
+ if (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -537,21 +537,21 @@
)
SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST_EXPORT file)
MACRO (ADD_H5_TEST_EXPORT_DDL resultfile targetfile resultcode ddlfile)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile})
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT ${resultcode} STREQUAL "0")
+ if (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -584,11 +584,11 @@
)
SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST_EXPORT_DDL file)
MACRO (ADD_H5_EXPORT_TEST resultfile targetfile resultcode)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-output-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -608,11 +608,11 @@
)
SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile})
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_EXPORT_TEST file)
MACRO (ADD_H5_MASK_TEST resultfile resultcode)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -632,11 +632,11 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_MASK_TEST file)
MACRO (ADD_H5ERR_MASK_TEST resultfile resultcode)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -657,11 +657,11 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5ERR_MASK_TEST file)
MACRO (ADD_H5ERR_MASK_ENV_TEST resultfile resultcode envvar envval)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -684,12 +684,12 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5ERR_MASK_ENV_TEST)
MACRO (ADD_H5_TEST_IMPORT conffile resultfile testfile resultcode)
# If using memchecker add tests without using scripts
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-IMPORT-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -714,7 +714,7 @@
ADD_TEST (NAME H5DUMP-IMPORT-h5diff-${resultfile} COMMAND h5diff ${testfile} ${resultfile}.h5 /integer /integer)
SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-h5import-${resultfile})
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST_IMPORT file)
##############################################################################
@@ -723,7 +723,7 @@
##############################################################################
##############################################################################
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
ADD_TEST (
NAME H5DUMP-clearall-objects
@@ -1053,11 +1053,11 @@
zerodim.out.err
)
SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5DUMP-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ADD_HELP_TEST(help 0 -h)
@@ -1326,38 +1326,38 @@
# filters are defined.
# detect whether the encoder is present.
- IF (H5_HAVE_FILTER_DEFLATE)
- SET (USE_FILTER_DEFLATE "true")
- ENDIF (H5_HAVE_FILTER_DEFLATE)
+ if (H5_HAVE_FILTER_DEFLATE)
+ set (USE_FILTER_DEFLATE "true")
+ endif (H5_HAVE_FILTER_DEFLATE)
- IF (H5_HAVE_FILTER_SZIP)
- SET (USE_FILTER_SZIP "true")
- ENDIF (H5_HAVE_FILTER_SZIP)
+ if (H5_HAVE_FILTER_SZIP)
+ 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_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_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_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 (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 AND USE_FILTER_SHUFFLE AND USE_FILTER_FLETCHER32 AND USE_FILTER_NBIT AND USE_FILTER_SCALEOFFSET)
# 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)
+ 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 (HDF5_ENABLE_SZIP_SUPPORT)
+ endif (USE_FILTER_DEFLATE AND USE_FILTER_SHUFFLE AND USE_FILTER_FLETCHER32 AND USE_FILTER_NBIT AND USE_FILTER_SCALEOFFSET)
# test for displaying objects with very long names
ADD_H5_TEST (tlonglinks 0 --enable-error-stack tlonglinks.h5)
@@ -1390,16 +1390,16 @@
# NATIVE default. the NATIVE test can be validated with h5import/h5diff
ADD_H5_TEST_IMPORT (tbin1 out1D tbinary.h5 0 --enable-error-stack -d integer -b)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_H5_TEST (tbin2 0 --enable-error-stack -b BE -d float -o tbin2.bin tbinary.h5)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
# the NATIVE test can be validated with h5import/h5diff
ADD_H5_TEST_IMPORT (tbin3 out3D tbinary.h5 0 --enable-error-stack -d integer -b NATIVE)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_H5_TEST (tbin4 0 --enable-error-stack -d double -b FILE -o tbin4.bin tbinary.h5)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
# test for dataset region references
ADD_H5_TEST (tdatareg 0 --enable-error-stack tdatareg.h5)
diff --git a/tools/h5dump/CMakeTestsPBITS.cmake b/tools/h5dump/CMakeTestsPBITS.cmake
index baa1705..3a279b5 100644
--- a/tools/h5dump/CMakeTestsPBITS.cmake
+++ b/tools/h5dump/CMakeTestsPBITS.cmake
@@ -9,7 +9,7 @@
# Packed Bits
# --------------------------------------------------------------------
#-- Copy all the HDF5 files from the test directory into the source directory
- SET (HDF5_REFERENCE_PBITS
+ set (HDF5_REFERENCE_PBITS
${HDF5_TOOLS_SRC_DIR}/testfiles/tnofilename-with-packed-bits.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsArray.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCompound.ddl
@@ -64,12 +64,12 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong16.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong16.ddl
)
- SET (HDF5_REFERENCE_TEST_PBITS
+ set (HDF5_REFERENCE_TEST_PBITS
${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5
)
- SET (HDF5_ERROR_REFERENCE_PBITS
+ set (HDF5_ERROR_REFERENCE_PBITS
${PROJECT_SOURCE_DIR}/errfiles/tnofilename-with-packed-bits.err
${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharLengthExceeded.err
${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharOffsetExceeded.err
@@ -85,42 +85,42 @@
${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetNegative.err
)
- FOREACH (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
+ foreach (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
GET_FILENAME_COMPONENT(fname "${pbits_h5_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
- #MESSAGE (STATUS " Copying ${pbits_h5_file}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
+ #message (STATUS " Copying ${pbits_h5_file}")
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${pbits_h5_file} ${dest}
)
- ENDFOREACH (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
+ endforeach (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
- FOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
+ foreach (ddl_pbits ${HDF5_REFERENCE_PBITS})
GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
- SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
- #MESSAGE (STATUS " Copying ${ddl_pbits}")
- ADD_CUSTOM_COMMAND (
+ set (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
+ #message (STATUS " Copying ${ddl_pbits}")
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${ddl_pbits} ${ddldest}
)
- ENDFOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
+ endforeach (ddl_pbits ${HDF5_REFERENCE_PBITS})
- FOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
+ foreach (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
- SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
- #MESSAGE (STATUS " Copying ${ddl_pbits}")
- ADD_CUSTOM_COMMAND (
+ set (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
+ #message (STATUS " Copying ${ddl_pbits}")
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${ddl_pbits} ${ddldest}
)
- ENDFOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
+ endforeach (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
##############################################################################
##############################################################################
@@ -130,16 +130,16 @@
MACRO (ADD_H5_PBITS_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
- IF (NOT ${resultcode} STREQUAL "0")
+ if (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_pbits_test}" STREQUAL "")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_pbits_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test})
- ENDIF (NOT "${last_pbits_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_pbits_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -158,7 +158,7 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_PBITS_TEST file)
##############################################################################
@@ -167,7 +167,7 @@
##############################################################################
##############################################################################
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
ADD_TEST (
NAME H5DUMP_PACKED_BITS-clearall-objects
@@ -281,11 +281,11 @@
tpbitsUnsignedLongLong16.out.err
)
SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
- IF (NOT "${last_pbits_test}" STREQUAL "")
+ if (NOT "${last_pbits_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_pbits_test})
- ENDIF (NOT "${last_pbits_test}" STREQUAL "")
- SET (last_pbits_test "H5DUMP_PACKED_BITS-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_pbits_test}" STREQUAL "")
+ set (last_pbits_test "H5DUMP_PACKED_BITS-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# test failure handling
# Missing file name
diff --git a/tools/h5dump/CMakeTestsXML.cmake b/tools/h5dump/CMakeTestsXML.cmake
index 6c9cae1..ce7fdf7 100644
--- a/tools/h5dump/CMakeTestsXML.cmake
+++ b/tools/h5dump/CMakeTestsXML.cmake
@@ -8,7 +8,7 @@
#
# copy XML test files from source dir to test dir
#
- SET (HDF5_XML_REFERENCE_TEST_FILES
+ set (HDF5_XML_REFERENCE_TEST_FILES
${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5
@@ -61,7 +61,7 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5
)
- SET (HDF5_XML_REFERENCE_FILES
+ set (HDF5_XML_REFERENCE_FILES
${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5.xml
${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.h5.xml
${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5.xml
@@ -127,29 +127,29 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5.xml
)
- FOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
+ foreach (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${tst_xml_h5_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
- #MESSAGE (STATUS " Copying ${tst_xml_h5_file}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
+ #message (STATUS " Copying ${tst_xml_h5_file}")
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${tst_xml_h5_file} ${dest}
)
- ENDFOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
+ endforeach (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
- FOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
+ foreach (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
GET_FILENAME_COMPONENT(fname "${tst_xml_other_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
- #MESSAGE (STATUS " Copying ${tst_xml_other_file}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
+ #message (STATUS " Copying ${tst_xml_other_file}")
+ add_custom_command (
TARGET h5dump
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${tst_xml_other_file} ${dest}
)
- ENDFOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
+ endforeach (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
##############################################################################
##############################################################################
@@ -158,29 +158,29 @@
##############################################################################
MACRO (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (${testtype} STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-XML-${skipresultfile}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${skipresultfile}.xml --xml ${ARGN}"
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ELSE (${testtype} STREQUAL "SKIP")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ else (${testtype} STREQUAL "SKIP")
ADD_XML_H5_TEST (${skipresultfile} ${skipresultcode} ${ARGN})
- ENDIF (${testtype} STREQUAL "SKIP")
+ endif (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_XML_SKIP_H5_TEST)
MACRO (ADD_XML_H5_TEST resultfile resultcode)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5DUMP-XML-${resultfile} COMMAND $<TARGET_FILE:h5dump> --xml ${ARGN})
SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
- IF (NOT ${resultcode} STREQUAL "0")
+ if (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_xml_test}" STREQUAL "")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_xml_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test})
- ENDIF (NOT "${last_xml_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_xml_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5DUMP-XML-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -199,7 +199,7 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS "H5DUMP-XML-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_XML_H5_TEST file)
##############################################################################
@@ -208,7 +208,7 @@
##############################################################################
##############################################################################
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
ADD_TEST (
NAME H5DUMP-XML-clearall-objects
@@ -344,11 +344,11 @@
tvlstr.h5.out.err
)
SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
- IF (NOT "${last_xml_test}" STREQUAL "")
+ if (NOT "${last_xml_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES DEPENDS ${last_xml_test})
- ENDIF (NOT "${last_xml_test}" STREQUAL "")
- SET (last_test "H5DUMP-XML-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_xml_test}" STREQUAL "")
+ set (last_test "H5DUMP-XML-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
########## test XML
ADD_XML_H5_TEST (tall.h5 0 tall.h5)
@@ -413,10 +413,10 @@
# The lone colon here confuses some systems (Cray X1). Skip
# it if configure detects that this is a problem.
- SET (TESTTYPE "TEST")
- IF (NOT "H5_LONE_COLON")
- SET (TESTTYPE "SKIP")
- ENDIF (NOT "H5_LONE_COLON")
+ set (TESTTYPE "TEST")
+ if (NOT "H5_LONE_COLON")
+ set (TESTTYPE "SKIP")
+ endif (NOT "H5_LONE_COLON")
ADD_XML_SKIP_H5_TEST (tempty-nons.h5 0 ${TESTTYPE} -X : tempty.h5)
ADD_XML_H5_TEST (tempty-nons-2.h5 0 --xml-ns=: tempty.h5)
diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt
index 7caf44a..32dff55 100644
--- a/tools/h5import/CMakeLists.txt
+++ b/tools/h5import/CMakeLists.txt
@@ -9,28 +9,28 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5import executables
# --------------------------------------------------------------------
-ADD_EXECUTABLE (h5import ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c)
+add_executable (h5import ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5import.c)
TARGET_NAMING (h5import ${LIB_TYPE})
TARGET_C_PROPERTIES (h5import " " " ")
-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)
+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)
-SET (H5_DEP_EXECUTABLES h5import)
+set (H5_DEP_EXECUTABLES h5import)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5import executables
# --------------------------------------------------------------------
- ADD_EXECUTABLE (h5importtest ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5importtest.c)
+ add_executable (h5importtest ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/h5importtest.c)
TARGET_NAMING (h5importtest ${LIB_TYPE})
TARGET_C_PROPERTIES (h5importtest " " " ")
- TARGET_LINK_LIBRARIES (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5importtest PROPERTIES FOLDER tools)
+ target_link_libraries (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (h5importtest PROPERTIES FOLDER tools)
- INCLUDE (CMakeTests.cmake)
+ include (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -44,7 +44,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5import ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5import
RUNTIME DESTINATION
diff --git a/tools/h5import/CMakeTests.cmake b/tools/h5import/CMakeTests.cmake
index 96cca87..3250910 100644
--- a/tools/h5import/CMakeTests.cmake
+++ b/tools/h5import/CMakeTests.cmake
@@ -5,7 +5,7 @@
##############################################################################
##############################################################################
- SET (HDF5_REFERENCE_CONF_FILES
+ set (HDF5_REFERENCE_CONF_FILES
binfp64.conf
binin8.conf
binin8w.conf
@@ -23,7 +23,7 @@
textpfe.conf
txtstr.conf
)
- SET (HDF5_REFERENCE_TXT_FILES
+ set (HDF5_REFERENCE_TXT_FILES
txtfp32.txt
txtfp64.txt
txtuin16.txt
@@ -42,7 +42,7 @@
dbinuin32.h5.txt
dtxtstr.h5.txt
)
- SET (HDF5_REFERENCE_TEST_FILES
+ set (HDF5_REFERENCE_TEST_FILES
binfp64.h5
binin8.h5
binin8w.h5
@@ -62,38 +62,38 @@
)
FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- FOREACH (conf_file ${HDF5_REFERENCE_CONF_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${conf_file}")
- #MESSAGE (STATUS " Copying ${conf_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (conf_file ${HDF5_REFERENCE_CONF_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${conf_file}")
+ #message (STATUS " Copying ${conf_file}")
+ add_custom_command (
TARGET h5import
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${conf_file} ${dest}
)
- ENDFOREACH (conf_file ${HDF5_REFERENCE_CONF_FILES})
+ endforeach (conf_file ${HDF5_REFERENCE_CONF_FILES})
- FOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}")
- #MESSAGE (STATUS " Copying ${txt_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (txt_file ${HDF5_REFERENCE_TXT_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}")
+ #message (STATUS " Copying ${txt_file}")
+ add_custom_command (
TARGET h5import
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${txt_file} ${dest}
)
- ENDFOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES})
+ endforeach (txt_file ${HDF5_REFERENCE_TXT_FILES})
- FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
+ #message (STATUS " Copying ${h5_file}")
+ add_custom_command (
TARGET h5import
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${h5_file} ${dest}
)
- ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
##############################################################################
##############################################################################
@@ -102,12 +102,12 @@
##############################################################################
MACRO (ADD_H5_TEST testname importfile conffile testfile)
# If using memchecker skip macro based tests
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-h5importtest)
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5IMPORT-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -149,12 +149,12 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5IMPORT-${testname}-H5DMP_CMP PROPERTIES DEPENDS H5IMPORT-${testname}-H5DMP)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST testname importfile conffile testfile)
MACRO (ADD_H5_DUMPTEST testname datasetname testfile)
# If using memchecker skip tests
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5IMPORT-DUMP-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -170,7 +170,7 @@
)
SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-clear-objects PROPERTIES DEPENDS H5IMPORT-h5importtest)
- IF ("${ARGN}" STREQUAL "BINARY")
+ if ("${ARGN}" STREQUAL "BINARY")
ADD_TEST (
NAME H5IMPORT-DUMP-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
@@ -182,7 +182,7 @@
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- ELSE ("${ARGN}" STREQUAL "BINARY")
+ else ("${ARGN}" STREQUAL "BINARY")
ADD_TEST (
NAME H5IMPORT-DUMP-${testname}-H5DMP
COMMAND "${CMAKE_COMMAND}"
@@ -194,7 +194,7 @@
-D "TEST_SKIP_COMPARE=TRUE"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- ENDIF ("${ARGN}" STREQUAL "BINARY")
+ endif ("${ARGN}" STREQUAL "BINARY")
SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DMP PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-clear-objects")
ADD_TEST (
@@ -223,24 +223,24 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DFF PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_DUMPTEST testname datasetname testfile)
MACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5IMPORT-DUMP-${testname}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${testname} ${datasetname} ${testfile} --- DEFLATE filter not available"
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile)
# --------------------------------------------------------------------
# Determine if filter is available for h5diff
# --------------------------------------------------------------------
- IF (H5_HAVE_FILTER_DEFLATE)
- SET (USE_FILTER_DEFLATE "true")
- ENDIF (H5_HAVE_FILTER_DEFLATE)
+ if (H5_HAVE_FILTER_DEFLATE)
+ set (USE_FILTER_DEFLATE "true")
+ endif (H5_HAVE_FILTER_DEFLATE)
##############################################################################
##############################################################################
@@ -248,7 +248,7 @@
##############################################################################
##############################################################################
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
ADD_TEST (
NAME H5IMPORT-clear-objects
@@ -406,8 +406,8 @@
dtxtstr.h5.dff
dtxtstr.h5.dff.err
)
- SET (last_test "H5IMPORT-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ set (last_test "H5IMPORT-clear-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5IMPORT-h5importtest-clear-objects
@@ -421,10 +421,10 @@
binuin16.bin
binuin32.bin
)
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5IMPORT-h5importtest-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5IMPORT-clear-objects")
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5IMPORT-clear-objects")
ADD_TEST (NAME H5IMPORT-h5importtest COMMAND $<TARGET_FILE:h5importtest>)
SET_TESTS_PROPERTIES (H5IMPORT-h5importtest PROPERTIES DEPENDS H5IMPORT-h5importtest-clear-objects)
@@ -452,19 +452,19 @@
# ----- 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)
+ if (NOT USE_FILTER_DEFLATE)
ADD_H5_SKIP_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY)
- ELSE (NOT USE_FILTER_DEFLATE)
+ else (NOT USE_FILTER_DEFLATE)
ADD_H5_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY)
- ENDIF (NOT USE_FILTER_DEFLATE)
+ endif (NOT USE_FILTER_DEFLATE)
# ----- TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed "
ADD_H5_TEST (BINARY_I8 binin8.bin testfiles/binin8.conf binin8.h5)
- IF (NOT USE_FILTER_DEFLATE)
+ if (NOT USE_FILTER_DEFLATE)
ADD_H5_SKIP_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY)
- ELSE (NOT USE_FILTER_DEFLATE)
+ else (NOT USE_FILTER_DEFLATE)
ADD_H5_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY)
- ENDIF (NOT USE_FILTER_DEFLATE)
+ endif (NOT USE_FILTER_DEFLATE)
# ----- TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended "
ADD_H5_TEST (BINARY_I16 binin16.bin testfiles/binin16.conf binin16.h5)
diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt
index 49d1b0c..a17bf45 100644
--- a/tools/h5jam/CMakeLists.txt
+++ b/tools/h5jam/CMakeLists.txt
@@ -9,54 +9,54 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5jam executables
# --------------------------------------------------------------------
-ADD_EXECUTABLE (h5jam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jam.c)
+add_executable (h5jam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jam.c)
TARGET_NAMING (h5jam ${LIB_TYPE})
TARGET_C_PROPERTIES (h5jam " " " ")
-TARGET_LINK_LIBRARIES (h5jam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5jam PROPERTIES FOLDER tools)
+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)
+add_executable (getub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/getub.c)
TARGET_NAMING (getub ${LIB_TYPE})
TARGET_C_PROPERTIES (getub " " " ")
-TARGET_LINK_LIBRARIES (getub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (getub PROPERTIES FOLDER tools)
+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)
+add_executable (tellub ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/tellub.c)
TARGET_NAMING (tellub ${LIB_TYPE})
TARGET_C_PROPERTIES (tellub " " " ")
-TARGET_LINK_LIBRARIES (tellub ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (tellub PROPERTIES FOLDER tools)
+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)
+add_executable (h5unjam ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5unjam.c)
TARGET_NAMING (h5unjam ${LIB_TYPE})
TARGET_C_PROPERTIES (h5unjam " " " ")
-TARGET_LINK_LIBRARIES (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5unjam PROPERTIES FOLDER tools)
+target_link_libraries (h5unjam ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5unjam PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES
+set (H5_DEP_EXECUTABLES
h5jam
getub
tellub
h5unjam
)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5jam test executables
# --------------------------------------------------------------------
- IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (h5jamgentest ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/h5jamgentest.c)
+ 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_LINK_LIBRARIES (h5jamgentest ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5jamgentest PROPERTIES FOLDER generator/tools)
+ target_link_libraries (h5jamgentest ${HDF5_LIB_TARGET})
+ set_target_properties (h5jamgentest PROPERTIES FOLDER generator/tools)
#ADD_TEST (NAME h5jamgentest COMMAND $<TARGET_FILE:h5jamgentest>)
- ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- INCLUDE (CMakeTests.cmake)
+ include (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -70,7 +70,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5jam ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5jam h5unjam
RUNTIME DESTINATION
diff --git a/tools/h5jam/CMakeTests.cmake b/tools/h5jam/CMakeTests.cmake
index 3816e85..123c26f 100644
--- a/tools/h5jam/CMakeTests.cmake
+++ b/tools/h5jam/CMakeTests.cmake
@@ -5,7 +5,7 @@
##############################################################################
##############################################################################
- SET (HDF5_REFERENCE_TXT_FILES
+ set (HDF5_REFERENCE_TXT_FILES
u10.txt
u511.txt
u512.txt
@@ -14,34 +14,34 @@
h5unjam-help.txt
h5jam-ub-nohdf5.txt
)
- SET (HDF5_REFERENCE_TEST_FILES
+ set (HDF5_REFERENCE_TEST_FILES
tall.h5
twithub.h5
twithub513.h5
)
FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
+ #message (STATUS " Copying ${h5_file}")
+ add_custom_command (
TARGET h5jam
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${h5_file} ${dest}
)
- ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- FOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}")
- #MESSAGE (STATUS " Copying ${txt_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (txt_file ${HDF5_REFERENCE_TXT_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}")
+ #message (STATUS " Copying ${txt_file}")
+ add_custom_command (
TARGET h5jam
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${txt_file} ${dest}
)
- ENDFOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES})
+ endforeach (txt_file ${HDF5_REFERENCE_TXT_FILES})
##############################################################################
##############################################################################
@@ -55,12 +55,12 @@
#
MACRO (TEST_H5JAM_OUTPUT expectfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5JAM-${expectfile} COMMAND $<TARGET_FILE:h5jam> ${ARGN})
- IF (NOT "${resultcode}" STREQUAL "0")
+ 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 (NOT "${resultcode}" STREQUAL "0")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5JAM-${expectfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -80,7 +80,7 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5JAM-${expectfile} PROPERTIES DEPENDS H5JAM-${expectfile}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (TEST_H5JAM_OUTPUT)
# ============================================================
@@ -89,12 +89,12 @@
#
MACRO (TEST_H5UNJAM_OUTPUT expectfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5JAM-UNJAM-${expectfile} COMMAND $<TARGET_FILE:h5unjam> ${ARGN})
- IF (NOT "${resultcode}" STREQUAL "0")
+ 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 (NOT "${resultcode}" STREQUAL "0")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5JAM-UNJAM-${expectfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -114,12 +114,12 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5JAM-UNJAM-${expectfile} PROPERTIES DEPENDS H5JAM-UNJAM-${expectfile}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (TEST_H5UNJAM_OUTPUT)
MACRO (CHECKFILE testname testdepends expected actual)
# If using memchecker add tests without using scripts
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5JAM-${testname}-CHECKFILE-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -156,11 +156,11 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-H5DMP_CMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-H5DMP)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO(CHECKFILE testname testdepends expected actual)
MACRO (UNJAMTEST testname setfile infile ufile chkfile outfile)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5JAM-${testname}-UNJAM-SETUP-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove ${infile}
@@ -175,7 +175,7 @@
COMMAND ${CMAKE_COMMAND} -E remove ${outfile}
)
SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP)
- IF (NOT "${ufile}" STREQUAL "NONE")
+ if (NOT "${ufile}" STREQUAL "NONE")
ADD_TEST (
NAME H5JAM-${testname}-UNJAM_D-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove ${ufile}
@@ -183,9 +183,9 @@
SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
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")
- IF (NOT "${ARGN}" STREQUAL "--delete")
+ set (compare_test ${ufile})
+ else (NOT "${ufile}" STREQUAL "NONE")
+ if (NOT "${ARGN}" STREQUAL "--delete")
ADD_TEST (
NAME H5JAM-${testname}-UNJAM_D-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove ${outfile}.ufile.txt ${outfile}.ufile.txt.err
@@ -203,14 +203,14 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
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")
+ set (compare_test "${outfile}.ufile.txt")
+ else (NOT "${ARGN}" STREQUAL "--delete")
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")
- IF (NOT "${compare_test}" STREQUAL "")
+ set (compare_test "")
+ endif (NOT "${ARGN}" STREQUAL "--delete")
+ endif (NOT "${ufile}" STREQUAL "NONE")
+ if (NOT "${compare_test}" STREQUAL "")
ADD_TEST (
NAME H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -234,7 +234,7 @@
-P "${HDF5_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 (NOT "${compare_test}" STREQUAL "")
ADD_TEST (
NAME H5JAM-${testname}-UNJAM-CHECK_NOUB
@@ -249,31 +249,31 @@
-D "TEST_OFILE=NULL"
-P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
)
- IF (NOT "${compare_test}" STREQUAL "")
+ 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 (NOT "${compare_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM)
- ENDIF (NOT "${compare_test}" STREQUAL "")
+ endif (NOT "${compare_test}" STREQUAL "")
CHECKFILE (${testname} "H5JAM-${testname}-UNJAM-CHECK_NOUB" ${chkfile} ${outfile})
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO(UNJAMTEST testname infile ufile outfile)
MACRO (JAMTEST testname jamfile infile chkfile outfile)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5JAM-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove ${outfile} ${infile}.cpy.h5
)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5JAM-${testname} COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i testfiles/${infile} -o ${outfile} ${ARGN})
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
SET_TESTS_PROPERTIES (H5JAM-${testname} PROPERTIES DEPENDS H5JAM-${testname}-clear-objects)
- SET (compare_test ${outfile})
- SET (compare_orig testfiles/${infile})
- IF ("${ARGN}" STREQUAL "--clobber")
- SET (compare_orig "")
- ENDIF ("${ARGN}" STREQUAL "--clobber")
+ set (compare_test ${outfile})
+ set (compare_orig testfiles/${infile})
+ if ("${ARGN}" STREQUAL "--clobber")
+ set (compare_orig "")
+ endif ("${ARGN}" STREQUAL "--clobber")
ADD_TEST (
NAME H5JAM-${testname}-CHECK_UB_1-clear-objects
@@ -299,11 +299,11 @@
)
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)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (JAMTEST testname jamfile infile outfile)
MACRO (JAMTEST_NONE testname jamfile infile setfile chkfile)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5JAM-${testname}_NONE-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove
@@ -324,11 +324,11 @@
ADD_TEST (NAME H5JAM-${testname}_NONE COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i ${chkfile} ${ARGN})
SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE PROPERTIES DEPENDS H5JAM-${testname}_NONE_COPY)
- SET (compare_test ${chkfile})
- SET (compare_orig ${chkfile}.cpy.h5)
- IF ("${ARGN}" STREQUAL "--clobber")
- SET (compare_orig "")
- ENDIF ("${ARGN}" STREQUAL "--clobber")
+ set (compare_test ${chkfile})
+ set (compare_orig ${chkfile}.cpy.h5)
+ if ("${ARGN}" STREQUAL "--clobber")
+ set (compare_orig "")
+ endif ("${ARGN}" STREQUAL "--clobber")
ADD_TEST (
NAME H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects
@@ -354,7 +354,7 @@
)
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)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (JAMTEST_NONE testname jamfile infile setfile chkfile)
##############################################################################
diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt
index eeaf1ea..b351268 100644
--- a/tools/h5ls/CMakeLists.txt
+++ b/tools/h5ls/CMakeLists.txt
@@ -9,21 +9,21 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
#-----------------------------------------------------------------------------
# Add the h5ls executable
#-----------------------------------------------------------------------------
-ADD_EXECUTABLE (h5ls ${HDF5_TOOLS_H5LS_SOURCE_DIR}/h5ls.c)
+add_executable (h5ls ${HDF5_TOOLS_H5LS_SOURCE_DIR}/h5ls.c)
TARGET_NAMING (h5ls ${LIB_TYPE})
TARGET_C_PROPERTIES (h5ls " " " ")
-TARGET_LINK_LIBRARIES (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5ls PROPERTIES FOLDER tools)
+target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5ls PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES
+set (H5_DEP_EXECUTABLES
h5ls
)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
- INCLUDE (CMakeTests.cmake)
+ include (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -37,7 +37,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5ls ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5ls
RUNTIME DESTINATION
diff --git a/tools/h5ls/CMakeTests.cmake b/tools/h5ls/CMakeTests.cmake
index 09f375d..b2d039f 100644
--- a/tools/h5ls/CMakeTests.cmake
+++ b/tools/h5ls/CMakeTests.cmake
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------
# Copy all the test files from source directory to test directory
# --------------------------------------------------------------------
- SET (LIST_HDF5_TEST_FILES
+ set (LIST_HDF5_TEST_FILES
${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.h5
@@ -33,7 +33,7 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5
)
- SET (LIST_OTHER_TEST_FILES
+ set (LIST_OTHER_TEST_FILES
${HDF5_TOOLS_SRC_DIR}/testfiles/help-1.ls
${HDF5_TOOLS_SRC_DIR}/testfiles/help-2.ls
${HDF5_TOOLS_SRC_DIR}/testfiles/help-3.ls
@@ -95,17 +95,17 @@
FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
# copy the list of test files
- FOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${listfiles}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
- #MESSAGE (STATUS " Copying ${listfiles} to ${dest}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #message (STATUS " Copying ${listfiles} to ${dest}")
+ add_custom_command (
TARGET h5ls
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${listfiles} ${dest}
)
- ENDFOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ endforeach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
##############################################################################
@@ -116,16 +116,16 @@
MACRO (ADD_H5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN})
SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (${resultcode} STREQUAL "1")
+ if (${resultcode} STREQUAL "1")
SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- IF (NOT "${last_test}" STREQUAL "")
+ endif (${resultcode} STREQUAL "1")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5LS-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -143,7 +143,7 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS "H5LS-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST file)
##############################################################################
@@ -152,7 +152,7 @@
##############################################################################
##############################################################################
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
ADD_TEST (
NAME H5LS-clearall-objects
@@ -265,11 +265,11 @@
tvldtypes2be.out
tvldtypes2be.out.err
)
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5LS-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5LS-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5LS-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# test the help syntax
ADD_H5_TEST (help-1 0 -w80 -h)
@@ -378,25 +378,25 @@
# test for attribute with region references wo verbose mode
# ( HDFFV-7838, )
- IF (H5_WORDS_BIGENDIAN)
+ if (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tattrreg_be 0 -w80 -v -d tattrreg.h5)
- ELSE (H5_WORDS_BIGENDIAN)
+ else (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tattrreg_le 0 -w80 -v -d tattrreg.h5)
- ENDIF (H5_WORDS_BIGENDIAN)
+ endif (H5_WORDS_BIGENDIAN)
# test for non-existing file
ADD_H5_TEST (nosuchfile 1 nosuchfile.h5)
# test for variable length data types in verbose mode
- IF (H5_WORDS_BIGENDIAN)
+ if (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tvldtypes2be 0 -v tvldtypes1.h5)
- ELSE (H5_WORDS_BIGENDIAN)
+ else (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tvldtypes2le 0 -v tvldtypes1.h5)
- ENDIF (H5_WORDS_BIGENDIAN)
+ endif (H5_WORDS_BIGENDIAN)
# test for dataset region references data types in verbose mode
- IF (H5_WORDS_BIGENDIAN)
+ if (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tdataregbe 0 -v tdatareg.h5)
- ELSE (H5_WORDS_BIGENDIAN)
+ else (H5_WORDS_BIGENDIAN)
ADD_H5_TEST (tdataregle 0 -v tdatareg.h5)
- ENDIF (H5_WORDS_BIGENDIAN)
+ endif (H5_WORDS_BIGENDIAN)
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index 176fc2b..4625607 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -10,7 +10,7 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
# --------------------------------------------------------------------
# Add h5Repack executables
# --------------------------------------------------------------------
-SET (REPACK_COMMON_SRCS
+set (REPACK_COMMON_SRCS
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_copy.c
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_filters.c
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_opttable.c
@@ -20,43 +20,43 @@ SET (REPACK_COMMON_SRCS
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack.c
)
-ADD_EXECUTABLE (h5repack ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c)
+add_executable (h5repack ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repack_main.c)
TARGET_NAMING (h5repack ${LIB_TYPE})
TARGET_C_PROPERTIES (h5repack " " " ")
-TARGET_LINK_LIBRARIES (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5repack PROPERTIES FOLDER tools)
+target_link_libraries (h5repack ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5repack PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES h5repack)
+set (H5_DEP_EXECUTABLES h5repack)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add h5Repack test executables
# --------------------------------------------------------------------
- ADD_EXECUTABLE (testh5repack_detect_szip ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testh5repack_detect_szip.c)
+ 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_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)
+ 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)
+ add_executable (h5repacktest ${REPACK_COMMON_SRCS} ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/h5repacktst.c)
TARGET_NAMING (h5repacktest ${LIB_TYPE})
TARGET_C_PROPERTIES (h5repacktest " " " ")
- TARGET_LINK_LIBRARIES (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5repacktest PROPERTIES FOLDER tools)
+ target_link_libraries (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ set_target_properties (h5repacktest PROPERTIES FOLDER tools)
#-----------------------------------------------------------------------------
# If plugin library tests can be tested
#-----------------------------------------------------------------------------
- IF (BUILD_SHARED_LIBS)
- SET (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd")
- SET (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
- SET (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
- ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+ if (BUILD_SHARED_LIBS)
+ set (HDF5_TOOL_PLUGIN_LIB_CORENAME "dynlibadd")
+ set (HDF5_TOOL_PLUGIN_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOL_PLUGIN_LIB_CORENAME}")
+ set (HDF5_TOOL_PLUGIN_LIB_TARGET ${HDF5_TOOL_PLUGIN_LIB_CORENAME})
+ add_definitions (${HDF5_EXTRA_C_FLAGS})
INCLUDE_DIRECTORIES (${HDF5_SRC_DIR})
- ADD_LIBRARY (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SRC_DIR}/dynlib1.c)
+ add_library (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${LIB_TYPE} ${HDF5_TEST_SRC_DIR}/dynlib1.c)
TARGET_C_PROPERTIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} " " " ")
- TARGET_LINK_LIBRARIES (${HDF5_TOOL_PLUGIN_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ 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}
@@ -69,7 +69,7 @@ IF (BUILD_TESTING)
#-----------------------------------------------------------------------------
# Copy plugin library to a plugins folder
#-----------------------------------------------------------------------------
- ADD_CUSTOM_COMMAND (
+ add_custom_command (
TARGET ${HDF5_TOOL_PLUGIN_LIB_TARGET}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
@@ -77,11 +77,11 @@ IF (BUILD_TESTING)
"$<TARGET_FILE:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
"${CMAKE_BINARY_DIR}/plugins/$<TARGET_FILE_NAME:${HDF5_TOOL_PLUGIN_LIB_TARGET}>"
)
- ENDIF (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS)
- INCLUDE (CMakeTests.cmake)
+ include (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -95,7 +95,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5repack ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5repack
RUNTIME DESTINATION
diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake
index 3252c30..6483a97 100644
--- a/tools/h5repack/CMakeTests.cmake
+++ b/tools/h5repack/CMakeTests.cmake
@@ -5,8 +5,8 @@
##############################################################################
##############################################################################
- IF (HDF5_TEST_VFD)
- SET (VFD_LIST
+ if (HDF5_TEST_VFD)
+ set (VFD_LIST
sec2
stdio
core
@@ -15,9 +15,9 @@
family
)
- IF (DIRECT_VFD)
- SET (VFD_LIST ${VFD_LIST} direct)
- ENDIF (DIRECT_VFD)
+ if (DIRECT_VFD)
+ set (VFD_LIST ${VFD_LIST} direct)
+ endif (DIRECT_VFD)
MACRO (ADD_VFD_TEST vfdname resultcode)
ADD_TEST (
@@ -31,17 +31,17 @@
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
)
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK-VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5REPACK-VFD-${vfdname}-h5repacktest")
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5REPACK-VFD-${vfdname}-h5repacktest")
ENDMACRO (ADD_VFD_TEST)
- ENDIF (HDF5_TEST_VFD)
+ endif (HDF5_TEST_VFD)
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
- SET (LIST_HDF5_TEST_FILES
+ set (LIST_HDF5_TEST_FILES
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr.h5
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr_refs.h5
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_deflate.h5
@@ -79,7 +79,7 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00010.h5
)
- SET (LIST_OTHER_TEST_FILES
+ set (LIST_OTHER_TEST_FILES
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack-help.txt
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_ext.bin
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/ublock.bin
@@ -93,17 +93,17 @@
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/plugin_none.h5repack_layout.UD.h5.tst
)
- FOREACH (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ foreach (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
GET_FILENAME_COMPONENT(fname "${h5_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #message (STATUS " Copying ${h5_file}")
+ add_custom_command (
TARGET h5repack
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${h5_file} ${dest}
)
- ENDFOREACH (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ endforeach (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
##############################################################################
##############################################################################
@@ -113,14 +113,14 @@
MACRO (ADD_HELP_TEST testname resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5REPACK-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN})
SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5REPACK-${testname}")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5REPACK-${testname}")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5REPACK-h5repack-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -139,72 +139,72 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5REPACK-h5repack-${testname} PROPERTIES DEPENDS "H5REPACK-h5repack-${testname}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_HELP_TEST)
MACRO (ADD_H5_TEST_OLD testname testtype testfile)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (${testtype} STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
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 (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ else (${testtype} STREQUAL "SKIP")
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}
)
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK_OLD-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
+ endif (NOT "${last_test}" STREQUAL "")
ADD_TEST (
NAME H5REPACK_OLD-${testname}_DFF
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")
+ endif (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_TEST_OLD)
MACRO (ADD_H5_TEST testname testtype testfile)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (${testtype} STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
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 (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ else (${testtype} STREQUAL "SKIP")
ADD_TEST (
NAME H5REPACK-${testname}
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
+ endif (NOT "${last_test}" STREQUAL "")
ADD_TEST (
NAME H5REPACK-${testname}_DFF
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")
+ endif (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_TEST)
MACRO (ADD_H5_CMP_TEST testname testfilter testtype resultcode resultfile)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (${testtype} STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
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 (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ else (${testtype} STREQUAL "SKIP")
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ 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 (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5REPACK_CMP-${testname}
COMMAND "${CMAKE_COMMAND}"
@@ -217,30 +217,30 @@
-D "TEST_REFERENCE=${resultfile}.tst"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ENDIF (${testtype} STREQUAL "SKIP")
+ endif (NOT "${last_test}" STREQUAL "")
+ endif (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_CMP_TEST)
MACRO (ADD_H5_DMP_TEST testname testtype resultcode resultfile)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (${testtype} STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
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 (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ else (${testtype} STREQUAL "SKIP")
# If using memchecker add tests without using scripts
ADD_TEST (
NAME H5REPACK_DMP-${testname}
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile})
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK_DMP-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5REPACK_DMP-h5dump-${testname}
COMMAND "${CMAKE_COMMAND}"
@@ -253,33 +253,33 @@
-P "${HDF5_RESOURCES_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")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_DMP_TEST)
MACRO (ADD_H5_VERIFY_TEST testname testtype resultcode testfile testdset testfilter)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (${testtype} STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
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")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ else (${testtype} STREQUAL "SKIP")
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5REPACK_VERIFY_LAYOUT-${testname}
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
+ endif (NOT "${last_test}" STREQUAL "")
ADD_TEST (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DFF PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname})
- IF (${resultcode} STREQUAL "0")
+ if (${resultcode} STREQUAL "0")
ADD_TEST (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
@@ -293,16 +293,16 @@
-P "${HDF5_RESOURCES_DIR}/grepTest.cmake"
)
SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
- ELSE (${resultcode} STREQUAL "0")
- IF (${testfilter} STREQUAL "CHUNKED")
- SET (nottestfilter "(CONTIGUOUS|COMPACT)")
- ENDIF (${testfilter} STREQUAL "CHUNKED")
- IF (${testfilter} STREQUAL "CONTIGUOUS")
- SET (nottestfilter "(CHUNK|COMPACT)")
- ENDIF (${testfilter} STREQUAL "CONTIGUOUS")
- IF (${testfilter} STREQUAL "COMPACT")
- SET (nottestfilter "(CONTIGUOUS|CHUNK)")
- ENDIF (${testfilter} STREQUAL "COMPACT")
+ else (${resultcode} STREQUAL "0")
+ if (${testfilter} STREQUAL "CHUNKED")
+ set (nottestfilter "(CONTIGUOUS|COMPACT)")
+ endif (${testfilter} STREQUAL "CHUNKED")
+ if (${testfilter} STREQUAL "CONTIGUOUS")
+ set (nottestfilter "(CHUNK|COMPACT)")
+ endif (${testfilter} STREQUAL "CONTIGUOUS")
+ if (${testfilter} STREQUAL "COMPACT")
+ set (nottestfilter "(CONTIGUOUS|CHUNK)")
+ endif (${testfilter} STREQUAL "COMPACT")
ADD_TEST (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
@@ -316,9 +316,9 @@
-P "${HDF5_RESOURCES_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")
+ endif (${resultcode} STREQUAL "0")
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_VERIFY_TEST)
MACRO (ADD_H5_TEST_META testname testfile)
@@ -326,9 +326,9 @@
NAME H5REPACK_META-${testname}_N
COMMAND $<TARGET_FILE:h5repack> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5
)
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK_META-${testname}_N PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
+ endif (NOT "${last_test}" STREQUAL "")
ADD_TEST (
NAME H5REPACK_META-${testname}_M
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5
@@ -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 (HDF5_BUILD_TOOLS AND 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 "${HDF5_RESOURCES_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 (HDF5_BUILD_TOOLS AND NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_UD_TEST)
##############################################################################
@@ -394,27 +394,27 @@
# --------------------------------------------------------------------
# test file names
# --------------------------------------------------------------------
- SET (INFO_FILE testfiles/h5repack.info)
-
- SET (FILE0 h5repack_fill.h5)
- SET (FILE1 h5repack_objs.h5)
- SET (FILE2 h5repack_attr.h5)
- SET (FILE3 h5repack_hlink.h5)
- SET (FILE4 h5repack_layout.h5)
- SET (FILE5 h5repack_early.h5)
- SET (FILE7 h5repack_szip.h5)
- SET (FILE8 h5repack_deflate.h5)
- SET (FILE9 h5repack_shuffle.h5)
- SET (FILE10 h5repack_fletcher.h5)
- SET (FILE11 h5repack_filters.h5)
- SET (FILE12 h5repack_nbit.h5)
- SET (FILE13 h5repack_soffset.h5)
- SET (FILE14 h5repack_layouto.h5 ) # A file with an older version of the layout message (copy of test/tlayouto.h5)
- SET (FILE15 h5repack_named_dtypes.h5)
- SET (FILE16 tfamily%05d.h5) # located in common testfiles folder
- SET (FILE18 h5repack_layout2.h5)
- SET (FILE_REF h5repack_refs.h5)
- SET (FILE_ATTR_REF h5repack_attr_refs.h5)
+ set (INFO_FILE testfiles/h5repack.info)
+
+ set (FILE0 h5repack_fill.h5)
+ set (FILE1 h5repack_objs.h5)
+ set (FILE2 h5repack_attr.h5)
+ set (FILE3 h5repack_hlink.h5)
+ set (FILE4 h5repack_layout.h5)
+ set (FILE5 h5repack_early.h5)
+ set (FILE7 h5repack_szip.h5)
+ set (FILE8 h5repack_deflate.h5)
+ set (FILE9 h5repack_shuffle.h5)
+ set (FILE10 h5repack_fletcher.h5)
+ set (FILE11 h5repack_filters.h5)
+ set (FILE12 h5repack_nbit.h5)
+ set (FILE13 h5repack_soffset.h5)
+ set (FILE14 h5repack_layouto.h5 ) # A file with an older version of the layout message (copy of test/tlayouto.h5)
+ set (FILE15 h5repack_named_dtypes.h5)
+ set (FILE16 tfamily%05d.h5) # located in common testfiles folder
+ set (FILE18 h5repack_layout2.h5)
+ set (FILE_REF h5repack_refs.h5)
+ set (FILE_ATTR_REF h5repack_attr_refs.h5)
# Remove any output file left over from previous test run
ADD_TEST (
@@ -597,30 +597,30 @@
h5repack_ext.bin
ublock.bin
)
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
+ endif (NOT "${last_test}" STREQUAL "")
ADD_HELP_TEST(help 0 -h)
ADD_TEST (NAME H5REPACK-testh5repack_detect_szip COMMAND $<TARGET_FILE:testh5repack_detect_szip>)
- IF (HDF5_ENABLE_SZIP_SUPPORT)
- IF (HDF5_ENABLE_SZIP_ENCODING)
- SET (passRegex "yes")
+ if (HDF5_ENABLE_SZIP_SUPPORT)
+ 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)
- SET (passRegex "no")
+ else (HDF5_ENABLE_SZIP_ENCODING)
+ 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)
- SET (passRegex "no")
+ endif (HDF5_ENABLE_SZIP_ENCODING)
+ else (HDF5_ENABLE_SZIP_SUPPORT)
+ set (passRegex "no")
SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no")
- ENDIF (HDF5_ENABLE_SZIP_SUPPORT)
+ endif (HDF5_ENABLE_SZIP_SUPPORT)
SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS H5REPACK-clearall-objects)
ADD_TEST (NAME H5REPACK-h5repacktest COMMAND $<TARGET_FILE:h5repacktest>)
SET_TESTS_PROPERTIES (H5REPACK-h5repacktest PROPERTIES DEPENDS H5REPACK-testh5repack_detect_szip)
- SET (last_test "H5REPACK-h5repacktest")
+ set (last_test "H5REPACK-h5repacktest")
#
# The tests
@@ -636,34 +636,34 @@
# filters are defined.
# detect whether the encoder is present.
- SET (USE_FILTER_SZIP_ENCODER "no")
- IF (HDF5_ENABLE_SZIP_ENCODING)
- SET (USE_FILTER_SZIP_ENCODER ${testh5repack_detect_szip})
- ENDIF (HDF5_ENABLE_SZIP_ENCODING)
-
- IF (H5_HAVE_FILTER_DEFLATE)
- SET (USE_FILTER_DEFLATE "true")
- ENDIF (H5_HAVE_FILTER_DEFLATE)
-
- IF (H5_HAVE_FILTER_SZIP)
- 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)
+ set (USE_FILTER_SZIP_ENCODER "no")
+ if (HDF5_ENABLE_SZIP_ENCODING)
+ set (USE_FILTER_SZIP_ENCODER ${testh5repack_detect_szip})
+ endif (HDF5_ENABLE_SZIP_ENCODING)
+
+ if (H5_HAVE_FILTER_DEFLATE)
+ set (USE_FILTER_DEFLATE "true")
+ endif (H5_HAVE_FILTER_DEFLATE)
+
+ if (H5_HAVE_FILTER_SZIP)
+ 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})
@@ -676,83 +676,83 @@
# use $FILE4 to write some filters (this file has no filters)
# gzip with individual object
- SET (arg ${FILE4} -f dset1:GZIP=1 -l dset1:CHUNK=20x10)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE4} -f dset1:GZIP=1 -l dset1:CHUNK=20x10)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (gzip_individual ${TESTTYPE} ${arg})
# gzip for all
- SET (arg ${FILE4} -f GZIP=1)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE4} -f GZIP=1)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (gzip_all ${TESTTYPE} ${arg})
# szip with individual object
- SET (arg ${FILE4} -f dset2:SZIP=8,EC -l dset2:CHUNK=20x10)
- 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)
+ set (arg ${FILE4} -f dset2:SZIP=8,EC -l dset2:CHUNK=20x10)
+ 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)
ADD_H5_TEST (szip_individual ${TESTTYPE} ${arg})
# szip for all
- SET (arg ${FILE4} -f SZIP=8,NN)
- 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)
+ set (arg ${FILE4} -f SZIP=8,NN)
+ 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)
ADD_H5_TEST (szip_all ${TESTTYPE} ${arg})
# 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)
+ 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})
# shuffle for all
- SET (arg ${FILE4} -f SHUF)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SHUFFLE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SHUFFLE)
+ 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})
# 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)
+ 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})
# fletcher32 for all
- SET (arg ${FILE4} -f FLET)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_FLETCHER32)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_FLETCHER32)
+ 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})
# 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)
- 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)
+ 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)
+ 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)
ADD_H5_TEST (all_filters ${TESTTYPE} ${arg})
# verbose gzip with individual object
- SET (arg ${FILE11} -v -f /dset_deflate:GZIP=9)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE11} -v -f /dset_deflate:GZIP=9)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_CMP_TEST (gzip_verbose_filters "O?...ing file[^\n]+\n" ${TESTTYPE} 0 ${arg})
###########################################################
@@ -760,154 +760,154 @@
###########################################################
# szip copy
- SET (arg ${FILE7})
- 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)
+ set (arg ${FILE7})
+ 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)
ADD_H5_TEST (szip_copy ${TESTTYPE} ${arg})
# szip remove
- SET (arg ${FILE7} --filter=dset_szip:NONE)
- 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)
+ set (arg ${FILE7} --filter=dset_szip:NONE)
+ 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)
ADD_H5_TEST (szip_remove ${TESTTYPE} ${arg})
# deflate copy
- SET (arg ${FILE8})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE8})
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (deflate_copy ${TESTTYPE} ${arg})
# deflate remove
- SET (arg ${FILE8} -f dset_deflate:NONE)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE8} -f dset_deflate:NONE)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (deflate_remove ${TESTTYPE} ${arg})
# shuffle copy
- SET (arg ${FILE9})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SHUFFLE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SHUFFLE)
+ 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})
# 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)
+ 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})
# fletcher32 copy
- SET (arg ${FILE10})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_FLETCHER32)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_FLETCHER32)
+ 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})
# 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)
+ 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})
# nbit copy
- SET (arg ${FILE12})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_NBIT)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_NBIT)
+ 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})
# 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)
+ 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})
# 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)
+ 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})
# scaleoffset copy
- SET (arg ${FILE13})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SCALEOFFSET)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SCALEOFFSET)
+ 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})
# 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)
+ 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})
# 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)
+ 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})
# 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)
- 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)
+ 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)
+ 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)
ADD_H5_TEST (remove_all ${TESTTYPE} ${arg})
#filter conversions
- SET (arg ${FILE8} -f dset_deflate:SZIP=8,NN)
- 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)
+ set (arg ${FILE8} -f dset_deflate:SZIP=8,NN)
+ 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)
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)
+ 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)
ADD_H5_TEST (szip_convert ${TESTTYPE} ${arg})
#limit
- SET (arg ${FILE4} -f GZIP=1 -m 1024)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE4} -f GZIP=1 -m 1024)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_DMP_TEST (deflate_limit ${TESTTYPE} 0 ${arg})
#file
- SET (arg ${FILE4} -e ${INFO_FILE})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE4} -e ${INFO_FILE})
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg})
#########################################################
@@ -990,44 +990,44 @@ ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CO
ADD_H5_TEST (native_attr "TEST" ${FILE2} -n)
# latest file format with long switches. use FILE4=h5repack_layout.h5 (no filters)
- SET (arg --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype])
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype])
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
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)
- SET (arg -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype])
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype])
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_VERIFY_TEST (layout_short_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg})
# several global filters
- SET (arg ${FILE4} --filter GZIP=1 --filter SHUF)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE)
+ set (arg ${FILE4} --filter GZIP=1 --filter SHUF)
+ set (TESTTYPE "TEST")
+ if (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE)
ADD_H5_TEST (global_filters ${TESTTYPE} ${arg})
# syntax of -i infile -o outfile
# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters)
- SET (arg ${FILE4} -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype])
- SET (TESTTYPE "LEGACY")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
+ set (arg ${FILE4} -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype])
+ set (TESTTYPE "LEGACY")
+ if (NOT USE_FILTER_DEFLATE)
+ set (TESTTYPE "SKIP")
+ endif (NOT USE_FILTER_DEFLATE)
ADD_H5_TEST_OLD (old_style_layout_short_switches ${TESTTYPE} ${arg})
# add a userblock to file
- SET (arg ${FILE1} -u ${PROJECT_BINARY_DIR}/testfiles/ublock.bin -b 2048)
+ set (arg ${FILE1} -u ${PROJECT_BINARY_DIR}/testfiles/ublock.bin -b 2048)
ADD_H5_TEST (add_userblock "TEST" ${arg})
# add alignment
- SET (arg ${FILE1} -t 1 -a 1)
+ set (arg ${FILE1} -t 1 -a 1)
ADD_H5_TEST (add_alignment "TEST" ${arg})
# Check repacking file with old version of layout message (should get upgraded
@@ -1064,20 +1064,20 @@ ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CO
##############################################################################
### P L U G I N T E S T S
##############################################################################
-IF (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS)
ADD_H5_UD_TEST (plugin_test 0 h5repack_layout.h5 -v -f UD=257,1,9)
ADD_H5_UD_TEST (plugin_none 0 h5repack_layout.UD.h5 -v -f NONE)
-ELSE (BUILD_SHARED_LIBS)
- MESSAGE (STATUS " **** Plugins libraries must be built as shared libraries **** ")
+else (BUILD_SHARED_LIBS)
+ message (STATUS " **** Plugins libraries must be built as shared libraries **** ")
ADD_TEST (
NAME H5REPACK-plugin
COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING"
)
-ENDIF (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS)
- IF (HDF5_TEST_VFD)
+ if (HDF5_TEST_VFD)
# Run test with different Virtual File Driver
- FOREACH (vfd ${VFD_LIST})
+ foreach (vfd ${VFD_LIST})
ADD_VFD_TEST (${vfd} 0)
- ENDFOREACH (vfd ${VFD_LIST})
- ENDIF (HDF5_TEST_VFD)
+ endforeach (vfd ${VFD_LIST})
+ endif (HDF5_TEST_VFD)
diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt
index 6086fc2..a97be07 100644
--- a/tools/h5stat/CMakeLists.txt
+++ b/tools/h5stat/CMakeLists.txt
@@ -9,30 +9,30 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# --------------------------------------------------------------------
# Add the h5stat executables
# --------------------------------------------------------------------
-ADD_EXECUTABLE (h5stat ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c)
+add_executable (h5stat ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat.c)
TARGET_NAMING (h5stat ${LIB_TYPE})
TARGET_C_PROPERTIES (h5stat " " " ")
-TARGET_LINK_LIBRARIES (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5stat PROPERTIES FOLDER tools)
+target_link_libraries (h5stat ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5stat PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES h5stat)
+set (H5_DEP_EXECUTABLES h5stat)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5stat test executables
# --------------------------------------------------------------------
- IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (h5stat_gentest ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/h5stat_gentest.c)
+ 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_LINK_LIBRARIES (h5stat_gentest ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5stat_gentest PROPERTIES FOLDER generator/tools)
+ target_link_libraries (h5stat_gentest ${HDF5_LIB_TARGET})
+ set_target_properties (h5stat_gentest PROPERTIES FOLDER generator/tools)
#ADD_TEST (NAME h5stat_gentest COMMAND $<TARGET_FILE:h5stat_gentest>)
- ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- INCLUDE (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+ include (CMakeTests.cmake)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -46,7 +46,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5stat ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5stat
RUNTIME DESTINATION
diff --git a/tools/h5stat/CMakeTests.cmake b/tools/h5stat/CMakeTests.cmake
index 81ddf82..4ae9ff7 100644
--- a/tools/h5stat/CMakeTests.cmake
+++ b/tools/h5stat/CMakeTests.cmake
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
- SET (HDF5_REFERENCE_FILES
+ set (HDF5_REFERENCE_FILES
h5stat_help1.ddl
h5stat_help2.ddl
h5stat_notexist.ddl
@@ -41,34 +41,34 @@
h5stat_numattrs3.ddl
h5stat_numattrs4.ddl
)
- SET (HDF5_REFERENCE_TEST_FILES
+ set (HDF5_REFERENCE_TEST_FILES
h5stat_filters.h5
h5stat_tsohm.h5
h5stat_newgrat.h5
h5stat_threshold.h5
)
- FOREACH (ddl_file ${HDF5_REFERENCE_FILES})
- SET (ddldest "${PROJECT_BINARY_DIR}/${ddl_file}")
- #MESSAGE (STATUS " Translating ${ddl_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (ddl_file ${HDF5_REFERENCE_FILES})
+ set (ddldest "${PROJECT_BINARY_DIR}/${ddl_file}")
+ #message (STATUS " Translating ${ddl_file}")
+ add_custom_command (
TARGET h5stat
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${ddl_file} ${ddldest}
)
- ENDFOREACH (ddl_file ${HDF5_REFERENCE_FILES})
+ endforeach (ddl_file ${HDF5_REFERENCE_FILES})
- FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/${h5_file}")
+ #message (STATUS " Copying ${h5_file}")
+ add_custom_command (
TARGET h5stat
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${h5_file} ${dest}
)
- ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
##############################################################################
##############################################################################
@@ -78,15 +78,15 @@
MACRO (ADD_H5_TEST resultfile resultcode)
# If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5STAT-${resultfile} COMMAND $<TARGET_FILE:h5stat> ${ARGN})
- IF (NOT ${resultcode} STREQUAL "0")
+ if (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
+ endif (NOT ${resultcode} STREQUAL "0")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5STAT-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -104,7 +104,7 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS "H5STAT-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST file)
##############################################################################
@@ -113,7 +113,7 @@
##############################################################################
##############################################################################
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
ADD_TEST (
NAME H5STAT-clearall-objects
@@ -182,11 +182,11 @@
h5stat_numattrs4.out
h5stat_numattrs4.out.err
)
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5STAT-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5STAT-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5STAT-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# Test for help flag
ADD_H5_TEST (h5stat_help1 0 -h)
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index 43ef6ba..5569b6f 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -4,13 +4,13 @@ PROJECT (HDF5_TOOLS_LIB)
#-----------------------------------------------------------------------------
# Apply Definitions to compiler in this directory and below
#-----------------------------------------------------------------------------
-ADD_DEFINITIONS (${HDF5_EXTRA_C_FLAGS})
+add_definitions (${HDF5_EXTRA_C_FLAGS})
#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
-SET (H5_TOOLS_LIB_SRCS
+set (H5_TOOLS_LIB_SRCS
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff.c
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff_array.c
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff_attr.c
@@ -26,7 +26,7 @@ SET (H5_TOOLS_LIB_SRCS
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5trav.c
)
-SET (H5_TOOLS_LIB_HDRS
+set (H5_TOOLS_LIB_HDRS
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5trav.h
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools.h
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5tools_dump.h
@@ -36,18 +36,18 @@ SET (H5_TOOLS_LIB_HDRS
${HDF5_TOOLS_LIB_SOURCE_DIR}/h5diff.h
)
-ADD_LIBRARY (${HDF5_TOOLS_LIB_TARGET} ${LIB_TYPE} ${H5_TOOLS_LIB_SRCS} ${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_LINK_LIBRARIES (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}")
+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
)
-#SET_TARGET_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} PROPERTIES COMPILE_DEFINITIONS H5DIFF_DEBUG)
-SET_TARGET_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} PROPERTIES FOLDER libraries/tools)
+#set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES COMPILE_DEFINITIONS H5DIFF_DEBUG)
+set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES FOLDER libraries/tools)
##############################################################################
##############################################################################
@@ -58,7 +58,7 @@ SET_TARGET_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} PROPERTIES FOLDER libraries/tool
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
#-----------------------------------------------------------------------------
-INSTALL (
+install (
FILES
${H5_TOOLS_LIB_HDRS}
DESTINATION
@@ -71,26 +71,26 @@ INSTALL (
# Because tools are installed into bin/tools we need to make sure the hdf5tools
# library will be installed into the proper location.
#-----------------------------------------------------------------------------
-IF (APPLE)
- OPTION (HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF)
- IF (HDF5_BUILD_WITH_INSTALL_NAME)
+if (APPLE)
+ option (HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF)
+ if (HDF5_BUILD_WITH_INSTALL_NAME)
SET_TARGET_PROPERTIES(${HDF5_TOOLS_LIB_TARGET} PROPERTIES
LINK_FLAGS "-current_version ${HDF5_PACKAGE_VERSION} -compatibility_version ${HDF5_PACKAGE_VERSION}"
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
BUILD_WITH_INSTALL_RPATH ${HDF5_BUILD_WITH_INSTALL_NAME}
)
- ENDIF (HDF5_BUILD_WITH_INSTALL_NAME)
-ENDIF (APPLE)
+ endif (HDF5_BUILD_WITH_INSTALL_NAME)
+endif (APPLE)
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
-IF (HDF5_EXPORTED_TARGETS)
- IF (BUILD_SHARED_LIBS)
+if (HDF5_EXPORTED_TARGETS)
+ if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_TOOLS_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} toolslibraries)
- ENDIF (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS)
- INSTALL (
+ install (
TARGETS
${HDF5_TOOLS_LIB_TARGET}
EXPORT
@@ -99,4 +99,4 @@ IF (HDF5_EXPORTED_TARGETS)
ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT toolslibraries
RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolslibraries
)
-ENDIF (HDF5_EXPORTED_TARGETS)
+endif (HDF5_EXPORTED_TARGETS)
diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt
index 8e1003e..c1f7454 100644
--- a/tools/misc/CMakeLists.txt
+++ b/tools/misc/CMakeLists.txt
@@ -10,25 +10,25 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_SRC_DIR}/lib)
# Add the misc executables
# --------------------------------------------------------------------
#-- Misc Executables
-ADD_EXECUTABLE (h5debug ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5debug.c)
+add_executable (h5debug ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5debug.c)
TARGET_NAMING (h5debug ${LIB_TYPE})
TARGET_C_PROPERTIES (h5debug " " " ")
-TARGET_LINK_LIBRARIES (h5debug ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5debug PROPERTIES FOLDER tools)
+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)
+add_executable (h5repart ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart.c)
TARGET_NAMING (h5repart ${LIB_TYPE})
TARGET_C_PROPERTIES (h5repart " " " ")
-TARGET_LINK_LIBRARIES (h5repart ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5repart PROPERTIES FOLDER tools)
+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)
+add_executable (h5mkgrp ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5mkgrp.c)
TARGET_NAMING (h5mkgrp ${LIB_TYPE})
TARGET_C_PROPERTIES (h5mkgrp " " " ")
-TARGET_LINK_LIBRARIES (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (h5mkgrp PROPERTIES FOLDER tools)
+target_link_libraries (h5mkgrp ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+set_target_properties (h5mkgrp PROPERTIES FOLDER tools)
-SET (H5_DEP_EXECUTABLES
+set (H5_DEP_EXECUTABLES
h5debug
h5repart
h5mkgrp
@@ -37,31 +37,31 @@ SET (H5_DEP_EXECUTABLES
#-----------------------------------------------------------------------------
# Generate the h5cc file containing settings needed to compile programs
#-----------------------------------------------------------------------------
-#IF (NOT WIN32)
+#if (NOT WIN32)
# CONFIGURE_FILE (${HDF5_TOOLS_MISC_SOURCE_DIR}/h5cc.in ${HDF5_BINARY_DIR}/h5cc @ONLY)
-#ENDIF (NOT WIN32)
+#endif (NOT WIN32)
-IF (BUILD_TESTING)
+if (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the misc test executables
# --------------------------------------------------------------------
- IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (h5repart_gentest ${HDF5_TOOLS_MISC_SOURCE_DIR}/h5repart_gentest.c)
+ 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_LINK_LIBRARIES (h5repart_gentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5repart_gentest PROPERTIES FOLDER generator/tools)
+ 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 AND NOT BUILD_SHARED_LIBS)
+ endif (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (h5repart_test ${HDF5_TOOLS_MISC_SOURCE_DIR}/repart_test.c)
+ add_executable (h5repart_test ${HDF5_TOOLS_MISC_SOURCE_DIR}/repart_test.c)
TARGET_NAMING (h5repart_test ${LIB_TYPE})
TARGET_C_PROPERTIES (h5repart_test " " " ")
- TARGET_LINK_LIBRARIES (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
- SET_TARGET_PROPERTIES (h5repart_test PROPERTIES FOLDER tools)
+ target_link_libraries (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
+ set_target_properties (h5repart_test PROPERTIES FOLDER tools)
- INCLUDE (CMakeTests.cmake)
-ENDIF (BUILD_TESTING)
+ include (CMakeTests.cmake)
+endif (BUILD_TESTING)
##############################################################################
##############################################################################
@@ -77,7 +77,7 @@ ENDIF (BUILD_TESTING)
#INSTALL_PROGRAM_PDB (h5repart ${HDF5_INSTALL_BIN_DIR} toolsapplications)
#INSTALL_PROGRAM_PDB (h5mkgrp ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-INSTALL (
+install (
TARGETS
h5debug h5repart h5mkgrp
RUNTIME DESTINATION
diff --git a/tools/misc/CMakeTests.cmake b/tools/misc/CMakeTests.cmake
index cc9c5e2..d55e9de 100644
--- a/tools/misc/CMakeTests.cmake
+++ b/tools/misc/CMakeTests.cmake
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
- SET (HDF5_REFERENCE_TEST_FILES
+ set (HDF5_REFERENCE_TEST_FILES
family_file00000.h5
family_file00001.h5
family_file00002.h5
@@ -29,18 +29,18 @@
family_file00017.h5
)
- FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/${h5_file}")
+ #message (STATUS " Copying ${h5_file}")
+ add_custom_command (
TARGET h5repart
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_file} ${dest}
)
- ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (HDF5_MKGRP_TEST_FILES
+ set (HDF5_MKGRP_TEST_FILES
#h5mkgrp_help.txt
#h5mkgrp_version
h5mkgrp_single.ls
@@ -60,18 +60,18 @@
# make test dir
FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- FOREACH (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}")
- #MESSAGE (STATUS " Copying ${h5_mkgrp_file}")
- ADD_CUSTOM_COMMAND (
+ foreach (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
+ set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}")
+ #message (STATUS " Copying ${h5_mkgrp_file}")
+ add_custom_command (
TARGET h5mkgrp
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_mkgrp_file} ${dest}
)
- ENDFOREACH (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
+ endforeach (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
- ADD_CUSTOM_COMMAND (
+ add_custom_command (
TARGET h5mkgrp
POST_BUILD
COMMAND ${CMAKE_COMMAND}
@@ -86,7 +86,7 @@
##############################################################################
MACRO (ADD_H5_TEST resultfile resultcode resultoption)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5MKGRP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -96,18 +96,18 @@
${resultfile}.out.err
)
SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5MKGRP-${resultfile}
COMMAND $<TARGET_FILE:h5mkgrp> ${resultoption} ${resultfile}.h5 ${ARGN}
)
SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
+ 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 (NOT "${last_test}" STREQUAL "")
+ else (HDF5_ENABLE_USING_MEMCHECKER)
SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-${resultfile}-clear-objects)
ADD_TEST (
NAME H5MKGRP-${resultfile}-h5ls
@@ -122,13 +122,13 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}-h5ls PROPERTIES DEPENDS H5MKGRP-${resultfile})
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_TEST resultfile resultcode resultoption)
MACRO (ADD_H5_CMP resultfile resultcode)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5MKGRP_CMP-${resultfile} COMMAND $<TARGET_FILE:h5mkgrp> ${ARGN})
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ else (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5MKGRP_CMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -150,7 +150,7 @@
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
SET_TESTS_PROPERTIES (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-${resultfile}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_CMP resultfile resultcode)
##############################################################################
@@ -171,10 +171,10 @@
scd_family00003.h5
family_to_sec2.h5
)
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5REPART-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5REPART-clearall-objects")
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5REPART-clearall-objects")
# repartition family member size to 20,000 bytes.
ADD_TEST (NAME H5REPART-h5repart_20K COMMAND $<TARGET_FILE:h5repart> -m 20000 family_file%05d.h5 fst_family%05d.h5)
@@ -192,11 +192,11 @@
ADD_TEST (NAME H5REPART-h5repart_test COMMAND $<TARGET_FILE:h5repart_test>)
SET_TESTS_PROPERTIES (H5REPART-h5repart_test PROPERTIES DEPENDS H5REPART-clearall-objects DEPENDS H5REPART-h5repart_20K DEPENDS H5REPART-h5repart_5K DEPENDS H5REPART-h5repart_sec2)
- SET (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES}
+ set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES}
h5repart_test
)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
+ if (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5MKGRP-clearall-objects
COMMAND ${CMAKE_COMMAND}
@@ -243,11 +243,11 @@
h5mkgrp_nested_mult_lp.out.err
)
SET_TESTS_PROPERTIES (H5MKGRP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT "${last_test}" STREQUAL "")
+ if (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5MKGRP-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5MKGRP-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ endif (NOT "${last_test}" STREQUAL "")
+ set (last_test "H5MKGRP-clearall-objects")
+ endif (HDF5_ENABLE_USING_MEMCHECKER)
# Check that help & version is displayed properly
ADD_H5_CMP (h5mkgrp_help 0 "-h")