summaryrefslogtreecommitdiffstats
path: root/hl/examples
diff options
context:
space:
mode:
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})