summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2016-08-01 17:35:00 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2016-08-01 17:35:00 (GMT)
commite55844b7523676c381eb22f638369a794021d798 (patch)
tree9121dc5ee07215bc6389dc8bcf61e96b4040e69f /tools
parent1494413413932f1e640815d109fd1e8386bab3f9 (diff)
downloadhdf5-e55844b7523676c381eb22f638369a794021d798.zip
hdf5-e55844b7523676c381eb22f638369a794021d798.tar.gz
hdf5-e55844b7523676c381eb22f638369a794021d798.tar.bz2
[svn-r30237] HDFFV-9939: Change cmake commands to reduce POST_BUILD custom commands. Fixes possible overruns on windows command lines.
Diffstat (limited to 'tools')
-rw-r--r--tools/h5copy/CMakeLists.txt2
-rw-r--r--tools/h5copy/CMakeTests.cmake10
-rw-r--r--tools/h5diff/CMakeTests.cmake76
-rw-r--r--tools/h5dump/CMakeTests.cmake49
-rw-r--r--tools/h5dump/CMakeTestsPBITS.cmake32
-rw-r--r--tools/h5dump/CMakeTestsVDS.cmake36
-rw-r--r--tools/h5dump/CMakeTestsXML.cmake23
-rw-r--r--tools/h5format_convert/CMakeTests.cmake19
-rw-r--r--tools/h5import/CMakeTests.cmake30
-rw-r--r--tools/h5jam/CMakeTests.cmake19
-rw-r--r--tools/h5ls/CMakeTests.cmake17
-rw-r--r--tools/h5ls/CMakeTestsVDS.cmake15
-rw-r--r--tools/h5repack/CMakeTests.cmake34
-rw-r--r--tools/h5stat/CMakeTests.cmake19
-rw-r--r--tools/misc/CMakeTests.cmake28
-rw-r--r--tools/perform/CMakeTests.cmake10
16 files changed, 103 insertions, 316 deletions
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt
index 4c44ac2..219106f 100644
--- a/tools/h5copy/CMakeLists.txt
+++ b/tools/h5copy/CMakeLists.txt
@@ -42,7 +42,7 @@ endif (BUILD_TESTING)
#-----------------------------------------------------------------------------
#INSTALL_PROGRAM_PDB (h5copy ${HDF5_INSTALL_BIN_DIR} toolsapplications)
-
+
install (
TARGETS
h5copy
diff --git a/tools/h5copy/CMakeTests.cmake b/tools/h5copy/CMakeTests.cmake
index 275461f..96dc92b 100644
--- a/tools/h5copy/CMakeTests.cmake
+++ b/tools/h5copy/CMakeTests.cmake
@@ -23,15 +23,9 @@
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 (
- TARGET h5copy
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${listfiles} ${dest}
- )
+ HDFTEST_COPY_FILE("${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5copy_files")
endforeach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ add_custom_target(h5copy_files ALL COMMENT "Copying files needed by h5copy tests" DEPENDS ${h5copy_files_list})
##############################################################################
##############################################################################
diff --git a/tools/h5diff/CMakeTests.cmake b/tools/h5diff/CMakeTests.cmake
index 7698cc1..a649b78 100644
--- a/tools/h5diff/CMakeTests.cmake
+++ b/tools/h5diff/CMakeTests.cmake
@@ -79,10 +79,6 @@
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
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_103.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104.txt
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_11.txt
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_12.txt
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_13.txt
@@ -260,6 +256,13 @@
${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_v3.txt
)
+ set (LIST_WIN_TEST_FILES
+ h5diff_101
+ h5diff_102
+ h5diff_103
+ h5diff_104
+ )
+
# Make testfiles dir under build dir
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
@@ -268,48 +271,25 @@
#
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 (
- 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})
+ HDFTEST_COPY_FILE("${h5_tstfiles}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5diff_files")
+ endforeach ()
#
# Overwrite system dependent files (Windows) and not VS2015
#
if (WIN32 AND MSVC_VERSION LESS 1900)
- 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 (
- 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 (
- 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 (
- 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 MSVC_VERSION LESS 1900)
+ foreach (h5_tstfiles ${LIST_WIN_TEST_FILES})
+ get_filename_component(fname "${h5_tstfiles}" NAME)
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/${h5_tstfiles}w.txt" "${PROJECT_BINARY_DIR}/testfiles/${fname}.txt" "h5diff_files")
+ endforeach ()
+ else ()
+ foreach (h5_tstfiles ${LIST_WIN_TEST_FILES})
+ get_filename_component(fname "${h5_tstfiles}" NAME)
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/${h5_tstfiles}.txt" "${PROJECT_BINARY_DIR}/testfiles/${fname}.txt" "h5diff_files")
+ endforeach ()
+ endif ()
+ add_custom_target(h5diff_files ALL COMMENT "Copying files needed by h5diff tests" DEPENDS ${h5diff_files_list})
##############################################################################
##############################################################################
@@ -324,10 +304,10 @@
set_tests_properties (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (NOT ${resultcode} STREQUAL "0")
set_tests_properties (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
- endif (NOT ${resultcode} STREQUAL "0")
+ endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5DIFF-${resultfile}-clear-objects
@@ -350,7 +330,7 @@
endif (HDF5_ENABLE_USING_MEMCHECKER)
if (H5_HAVE_PARALLEL)
ADD_PH5_TEST (${resultfile} ${resultcode} ${ARGN})
- endif (H5_HAVE_PARALLEL)
+ endif ()
ENDMACRO (ADD_H5_TEST file)
MACRO (ADD_PH5_TEST resultfile resultcode)
@@ -360,10 +340,10 @@
set_tests_properties (PH5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (NOT ${resultcode} STREQUAL "0")
set_tests_properties (PH5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
- endif (NOT ${resultcode} STREQUAL "0")
+ endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (PH5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME PH5DIFF-${resultfile}-clear-objects
@@ -402,18 +382,18 @@
# if there was a previous test
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5DIFF-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DIFF-${testname} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
if (NOT ${resultcode} STREQUAL "0")
set_tests_properties (H5DIFF-${testname} PROPERTIES WILL_FAIL "true")
- endif (NOT ${resultcode} STREQUAL "0")
+ endif ()
if (HDF5_ENABLE_USING_MEMCHECKER)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5DIFF-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
set_tests_properties (H5DIFF-${testname} PROPERTIES DEPENDS H5DIFF-${testname}-clear-objects)
endif (HDF5_ENABLE_USING_MEMCHECKER)
diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake
index a5de05e..e376b50 100644
--- a/tools/h5dump/CMakeTests.cmake
+++ b/tools/h5dump/CMakeTests.cmake
@@ -329,14 +329,7 @@
#
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 (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${tst_h5_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${tst_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files")
endforeach (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
foreach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
@@ -344,60 +337,32 @@
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)
- 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}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file}" "h5dump_std_files")
endif (WIN32)
endforeach (tst_exp_file ${HDF5_REFERENCE_EXP_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 (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${tst_other_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${tst_other_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files")
endforeach (tst_other_file ${HDF5_REFERENCE_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 (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${tst_error_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${tst_error_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files")
endforeach (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
# --------------------------------------------------------------------
# Special file handling
# --------------------------------------------------------------------
- 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
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl" "h5dump_std_files")
if (WIN32)
file (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM)
file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}")
else (WIN32)
- 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
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp" "${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp" "h5dump_std_files")
endif (WIN32)
+ add_custom_target(h5dump_std_files ALL COMMENT "Copying files needed by h5dump_std tests" DEPENDS ${h5dump_std_files_list})
##############################################################################
##############################################################################
diff --git a/tools/h5dump/CMakeTestsPBITS.cmake b/tools/h5dump/CMakeTestsPBITS.cmake
index 14f282a..28514fb 100644
--- a/tools/h5dump/CMakeTestsPBITS.cmake
+++ b/tools/h5dump/CMakeTestsPBITS.cmake
@@ -87,40 +87,20 @@
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 (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${pbits_h5_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${pbits_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}" "h5dump_pbits_files")
endforeach (pbits_h5_file ${HDF5_REFERENCE_TEST_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 (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/pbits/${ddl_pbits} ${ddldest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/pbits/${ddl_pbits}" "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}" "h5dump_pbits_files")
endforeach (ddl_pbits ${HDF5_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 (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/errfiles/${ddl_pbits} ${ddldest}
- )
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/errfiles/${ddl_pbits}" "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}" "h5dump_pbits_files")
endforeach (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
+ add_custom_target(h5dump_pbits_files ALL COMMENT "Copying files needed by h5dump_pbits tests" DEPENDS ${h5dump_pbits_files_list})
##############################################################################
##############################################################################
@@ -135,10 +115,10 @@
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
if (NOT ${resultcode} STREQUAL "0")
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
- endif (NOT ${resultcode} STREQUAL "0")
+ endif ()
if (NOT "${last_pbits_test}" STREQUAL "")
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test})
- endif (NOT "${last_pbits_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5DUMP-${resultfile}-clear-objects
diff --git a/tools/h5dump/CMakeTestsVDS.cmake b/tools/h5dump/CMakeTestsVDS.cmake
index dcb90e0..68a62e8 100644
--- a/tools/h5dump/CMakeTestsVDS.cmake
+++ b/tools/h5dump/CMakeTestsVDS.cmake
@@ -66,40 +66,20 @@
foreach (vds_h5_file ${HDF5_REFERENCE_TEST_VDS})
get_filename_component(fname "${vds_h5_file}" NAME)
- set (dest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}")
- #message (STATUS " Copying ${vds_h5_file}")
- add_custom_command (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/${vds_h5_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/vds/${vds_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}" "h5dump_vds_files")
endforeach (vds_h5_file ${HDF5_REFERENCE_TEST_VDS})
foreach (ddl_vds ${HDF5_REFERENCE_VDS})
get_filename_component(fname "${ddl_vds}" NAME)
- set (ddldest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}")
- #message (STATUS " Copying ${ddl_vds}")
- add_custom_command (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/${ddl_vds} ${ddldest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/vds/${ddl_vds}" "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}" "h5dump_vds_files")
endforeach (ddl_vds ${HDF5_REFERENCE_VDS})
foreach (ddl_vds ${HDF5_ERROR_REFERENCE_VDS})
get_filename_component(fname "${ddl_vds}" NAME)
- set (ddldest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}")
- #message (STATUS " Copying ${ddl_vds}")
- add_custom_command (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/errfiles/${ddl_vds} ${ddldest}
- )
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/errfiles/${ddl_vds}" "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}" "h5dump_vds_files")
endforeach (ddl_vds ${HDF5_ERROR_REFERENCE_VDS})
+ add_custom_target(h5dump_vds_files ALL COMMENT "Copying files needed by h5dump_vds tests" DEPENDS ${h5dump_vds_files_list})
##############################################################################
##############################################################################
@@ -114,10 +94,10 @@
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
if (NOT ${resultcode} STREQUAL "0")
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
- endif (NOT ${resultcode} STREQUAL "0")
+ endif ()
if (NOT "${last_vds_test}" STREQUAL "")
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_VDS_test})
- endif (NOT "${last_vds_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5DUMP-${resultfile}-clear-objects
@@ -147,10 +127,10 @@
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
if (NOT ${resultcode} STREQUAL "0")
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
- endif (NOT ${resultcode} STREQUAL "0")
+ endif ()
if (NOT "${last_vds_test}" STREQUAL "")
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_VDS_test})
- endif (NOT "${last_vds_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5DUMP-${resultfile}-clear-objects
diff --git a/tools/h5dump/CMakeTestsXML.cmake b/tools/h5dump/CMakeTestsXML.cmake
index afb1df6..6e8dd15 100644
--- a/tools/h5dump/CMakeTestsXML.cmake
+++ b/tools/h5dump/CMakeTestsXML.cmake
@@ -129,27 +129,14 @@
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 (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${tst_xml_h5_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${tst_xml_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}" "h5dump_xml_files")
endforeach (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_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 (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${tst_xml_other_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${tst_xml_other_file}" "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}" "h5dump_xml_files")
endforeach (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
+ add_custom_target(h5dump_xml_files ALL COMMENT "Copying files needed by h5dump_xml tests" DEPENDS ${h5dump_xml_files_list})
##############################################################################
##############################################################################
@@ -176,10 +163,10 @@
set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
if (NOT ${resultcode} STREQUAL "0")
set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true")
- endif (NOT ${resultcode} STREQUAL "0")
+ endif ()
if (NOT "${last_xml_test}" STREQUAL "")
set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test})
- endif (NOT "${last_xml_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5DUMP-XML-${resultfile}-clear-objects
diff --git a/tools/h5format_convert/CMakeTests.cmake b/tools/h5format_convert/CMakeTests.cmake
index 0621b30..37ee824 100644
--- a/tools/h5format_convert/CMakeTests.cmake
+++ b/tools/h5format_convert/CMakeTests.cmake
@@ -63,26 +63,13 @@
add_custom_target(h5fc-files ALL COMMENT "Copying files needed by h5fc tests")
foreach (ddl_file ${HDF5_REFERENCE_FILES})
- set (ddldest "${PROJECT_BINARY_DIR}/testfiles/${ddl_file}")
- #message (STATUS " Translating ${ddl_file}")
- add_custom_command (
- TARGET h5fc-files
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5FC_SOURCE_DIR}/testfiles/${ddl_file} ${ddldest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5FC_SOURCE_DIR}/testfiles/${ddl_file}" "${PROJECT_BINARY_DIR}/testfiles/${ddl_file}" "h5fc_files")
endforeach (ddl_file ${HDF5_REFERENCE_FILES})
foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
- set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
- #message (STATUS " Copying ${h5_file}")
- add_custom_command (
- TARGET h5fc-files
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5FC_SOURCE_DIR}/testfiles/${h5_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5FC_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5fc_files")
endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ add_custom_target(h5fc_files ALL COMMENT "Copying files needed by h5fc tests" DEPENDS ${h5fc_files_list})
##############################################################################
##############################################################################
diff --git a/tools/h5import/CMakeTests.cmake b/tools/h5import/CMakeTests.cmake
index d03b233..ef029e9 100644
--- a/tools/h5import/CMakeTests.cmake
+++ b/tools/h5import/CMakeTests.cmake
@@ -63,37 +63,17 @@
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 (
- TARGET h5import
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${conf_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${conf_file}" "${PROJECT_BINARY_DIR}/testfiles/${conf_file}" "h5import_files")
endforeach (conf_file ${HDF5_REFERENCE_CONF_FILES})
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}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${txt_file}" "${PROJECT_BINARY_DIR}/testfiles/${txt_file}" "h5import_files")
endforeach (txt_file ${HDF5_REFERENCE_TXT_FILES})
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}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5import_files")
endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ add_custom_target(h5import_files ALL COMMENT "Copying files needed by h5import tests" DEPENDS ${h5import_files_list})
##############################################################################
##############################################################################
@@ -106,7 +86,7 @@
add_test (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-h5importtest)
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5IMPORT-${testname}-clear-objects
diff --git a/tools/h5jam/CMakeTests.cmake b/tools/h5jam/CMakeTests.cmake
index 4459a12..6752c9a 100644
--- a/tools/h5jam/CMakeTests.cmake
+++ b/tools/h5jam/CMakeTests.cmake
@@ -22,26 +22,13 @@
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 (
- TARGET h5jam
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${h5_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}" "h5jam_files")
endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
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}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${txt_file}" "${PROJECT_BINARY_DIR}/testfiles/${txt_file}" "h5jam_files")
endforeach (txt_file ${HDF5_REFERENCE_TXT_FILES})
+ add_custom_target(h5jam_files ALL COMMENT "Copying files needed by h5jam tests" DEPENDS ${h5jam_files_list})
##############################################################################
##############################################################################
diff --git a/tools/h5ls/CMakeTests.cmake b/tools/h5ls/CMakeTests.cmake
index d704ffb..009ea79 100644
--- a/tools/h5ls/CMakeTests.cmake
+++ b/tools/h5ls/CMakeTests.cmake
@@ -97,16 +97,9 @@
# copy the list of 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 (
- TARGET h5ls
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${listfiles} ${dest}
- )
+ HDFTEST_COPY_FILE("${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5ls_files")
endforeach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
-
+ add_custom_target(h5ls_files ALL COMMENT "Copying files needed by h5ls tests" DEPENDS ${h5ls_files_list})
##############################################################################
##############################################################################
@@ -121,10 +114,10 @@
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (${resultcode} STREQUAL "1")
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
- endif (${resultcode} STREQUAL "1")
+ endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5LS-${resultfile}-clear-objects
@@ -323,7 +316,7 @@
ADD_H5_TEST (textlinksrc-6-old 0 -w80 -E textlinksrc.h5)
ADD_H5_TEST (textlinksrc-7-old 0 -w80 -E textlinksrc.h5/ext_link1)
- # tests for no-dangling-links
+ # tests for no-dangling-links
# if this option is given on dangling link, h5ls should return exit code 1
# when used alone , expect to print out help and return exit code 1
ADD_H5_TEST (textlinksrc-nodangle-1 1 -w80 --no-dangling-links textlinksrc.h5)
diff --git a/tools/h5ls/CMakeTestsVDS.cmake b/tools/h5ls/CMakeTestsVDS.cmake
index 3e85803..0d08774 100644
--- a/tools/h5ls/CMakeTestsVDS.cmake
+++ b/tools/h5ls/CMakeTestsVDS.cmake
@@ -48,16 +48,9 @@
# copy the list of test files
foreach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
get_filename_component(fname "${listfiles}" NAME)
- set (dest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}")
- #message (STATUS " Copying ${listfiles} to ${dest}")
- add_custom_command (
- TARGET h5ls
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/${listfiles} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/vds/${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}" "h5ls_vds_files")
endforeach (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
-
+ add_custom_target(h5ls_vds_files ALL COMMENT "Copying files needed by h5ls_vds tests" DEPENDS ${h5ls_vds_files_list})
##############################################################################
##############################################################################
@@ -72,10 +65,10 @@
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
if (${resultcode} STREQUAL "1")
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
- endif (${resultcode} STREQUAL "1")
+ endif ()
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5LS-${resultfile}-clear-objects
diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake
index d5379a4..a93fe76 100644
--- a/tools/h5repack/CMakeTests.cmake
+++ b/tools/h5repack/CMakeTests.cmake
@@ -125,15 +125,9 @@
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 (
- TARGET h5repack
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${h5_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${fname}" "h5repack_files")
endforeach (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ add_custom_target(h5repack_files ALL COMMENT "Copying files needed by h5repack tests" DEPENDS ${h5repack_files_list})
##############################################################################
##############################################################################
@@ -148,7 +142,7 @@
set_tests_properties (H5REPACK-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "H5REPACK-${testname}")
else (HDF5_ENABLE_USING_MEMCHECKER)
add_test (
@@ -187,7 +181,7 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK_OLD-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
add_test (
NAME H5REPACK_OLD-${testname}_DFF
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
@@ -211,7 +205,7 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
add_test (
NAME H5REPACK-${testname}_DFF
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
@@ -250,7 +244,7 @@
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 ()
endif ("${testtype}" STREQUAL "SKIP")
ENDMACRO (ADD_H5_CMP_TEST)
@@ -284,7 +278,7 @@
endif (HDF5_ENABLE_USING_MEMCHECKER)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
endif ("${testtype}" STREQUAL "SKIP")
ENDMACRO (ADD_H5_MASK_TEST)
@@ -303,7 +297,7 @@
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile})
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK_DMP-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5REPACK_DMP-h5dump-${testname}
@@ -337,7 +331,7 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
@@ -360,13 +354,13 @@
else ("${resultcode}" STREQUAL "0")
if ("${testfilter}" STREQUAL "CHUNKED")
set (nottestfilter "(CONTIGUOUS|COMPACT)")
- endif ("${testfilter}" STREQUAL "CHUNKED")
+ endif ()
if ("${testfilter}" STREQUAL "CONTIGUOUS")
set (nottestfilter "(CHUNK|COMPACT)")
- endif ("${testfilter}" STREQUAL "CONTIGUOUS")
+ endif ()
if ("${testfilter}" STREQUAL "COMPACT")
set (nottestfilter "(CONTIGUOUS|CHUNK)")
- endif ("${testfilter}" STREQUAL "COMPACT")
+ endif ()
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
@@ -402,7 +396,7 @@
set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
add_test (
NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
@@ -427,7 +421,7 @@
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (H5REPACK_META-${testname}_N PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
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
diff --git a/tools/h5stat/CMakeTests.cmake b/tools/h5stat/CMakeTests.cmake
index bb8c248..a371b81 100644
--- a/tools/h5stat/CMakeTests.cmake
+++ b/tools/h5stat/CMakeTests.cmake
@@ -49,26 +49,13 @@
)
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}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${ddl_file}" "${PROJECT_BINARY_DIR}/${ddl_file}" "h5stat_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 (
- TARGET h5stat
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${h5_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "h5stat_files")
endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ add_custom_target(h5stat_files ALL COMMENT "Copying files needed by h5stat tests" DEPENDS ${h5stat_files_list})
##############################################################################
##############################################################################
diff --git a/tools/misc/CMakeTests.cmake b/tools/misc/CMakeTests.cmake
index b3e2f0b..6822be5 100644
--- a/tools/misc/CMakeTests.cmake
+++ b/tools/misc/CMakeTests.cmake
@@ -30,15 +30,9 @@
)
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}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "h5repart_files")
endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ add_custom_target(h5repart_files ALL COMMENT "Copying files needed by h5repart tests" DEPENDS ${h5repart_files_list})
set (HDF5_MKGRP_TEST_FILES
#h5mkgrp_help.txt
@@ -61,22 +55,12 @@
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 (
- TARGET h5mkgrp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_mkgrp_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_mkgrp_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}" "h5mkgrp_files")
endforeach (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
- add_custom_command (
- TARGET h5mkgrp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_help.txt ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_help.txt
- )
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_help.txt" "${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_help.txt" "h5mkgrp_files")
+ add_custom_target(h5mkgrp_files ALL COMMENT "Copying files needed by h5mkgrp tests" DEPENDS ${h5mkgrp_files_list})
+
configure_file (${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_version.txt.in ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_version.txt @ONLY)
##############################################################################
diff --git a/tools/perform/CMakeTests.cmake b/tools/perform/CMakeTests.cmake
index 63aa07b..0ea40a3 100644
--- a/tools/perform/CMakeTests.cmake
+++ b/tools/perform/CMakeTests.cmake
@@ -5,12 +5,8 @@
##############################################################################
##############################################################################
-add_custom_command (
- TARGET zip_perf
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_DIR}/testfiles/tfilters.h5 ${PROJECT_BINARY_DIR}/tfilters.h5
-)
+HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/tfilters.h5" "${PROJECT_BINARY_DIR}/tfilters.h5" "zip_perf_files")
+add_custom_target(zip_perf_files ALL COMMENT "Copying files needed by zip_perf tests" DEPENDS ${zip_perf_list})
#-----------------------------------------------------------------------------
# Add Tests
@@ -20,7 +16,7 @@ add_custom_command (
add_test (
NAME PERFORM_h5perform-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
chunk.h5
iopipe.h5
iopipe.raw