diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2016-08-01 17:35:00 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2016-08-01 17:35:00 (GMT) |
commit | e55844b7523676c381eb22f638369a794021d798 (patch) | |
tree | 9121dc5ee07215bc6389dc8bcf61e96b4040e69f /tools/h5dump/CMakeTestsVDS.cmake | |
parent | 1494413413932f1e640815d109fd1e8386bab3f9 (diff) | |
download | hdf5-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/h5dump/CMakeTestsVDS.cmake')
-rw-r--r-- | tools/h5dump/CMakeTestsVDS.cmake | 36 |
1 files changed, 8 insertions, 28 deletions
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 |