summaryrefslogtreecommitdiffstats
path: root/hl/examples
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 /hl/examples
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 'hl/examples')
-rw-r--r--hl/examples/CMakeTests.cmake16
1 files changed, 5 insertions, 11 deletions
diff --git a/hl/examples/CMakeTests.cmake b/hl/examples/CMakeTests.cmake
index 8cf74d9..6384aa5 100644
--- a/hl/examples/CMakeTests.cmake
+++ b/hl/examples/CMakeTests.cmake
@@ -11,21 +11,15 @@ set (HDF5_TEST_FILES
)
foreach (h5_file ${HDF5_TEST_FILES})
- set (dest "${PROJECT_BINARY_DIR}/${h5_file}")
- #message (STATUS " Copying ${h5_file}")
- add_custom_command (
- TARGET hl_ex_ex_ds1
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/${h5_file} ${dest}
- )
+ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/${h5_file}" "${PROJECT_BINARY_DIR}/${h5_file}" "hl_ex_ex_ds1_files")
endforeach (h5_file ${HDF5_TEST_FILES})
+add_custom_target(hl_ex_ex_ds1_files ALL COMMENT "Copying files needed by hl_ex_ex_ds1 tests" DEPENDS ${hl_ex_ex_ds1_files_list})
# Remove any output file left over from previous test run
add_test (
NAME HL_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
ex_lite1.h5
ex_lite2.h5
ex_lite3.h5
@@ -48,13 +42,13 @@ endforeach (h5_file ${HDF5_TEST_FILES})
)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (HL_ex-clear-objects PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "HL_ex-clear-objects")
foreach (example ${examples})
add_test (NAME HL_ex_${example} COMMAND $<TARGET_FILE:hl_ex_${example}>)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (HL_ex_${example} PROPERTIES DEPENDS ${last_test})
- endif (NOT "${last_test}" STREQUAL "")
+ endif ()
set (last_test "HL_ex_${example}")
endforeach (example ${examples})