summaryrefslogtreecommitdiffstats
path: root/hl/examples/CMakeTests.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2013-08-19 21:49:44 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2013-08-19 21:49:44 (GMT)
commitc502d81a8c87dd2bce47a5476e3331b04fc69322 (patch)
tree2549ab26136222cdfae89d4279707051cbb716b0 /hl/examples/CMakeTests.cmake
parentfcb21bb3dde491209881dc99eb0adc9198f21452 (diff)
downloadhdf5-c502d81a8c87dd2bce47a5476e3331b04fc69322.zip
hdf5-c502d81a8c87dd2bce47a5476e3331b04fc69322.tar.gz
hdf5-c502d81a8c87dd2bce47a5476e3331b04fc69322.tar.bz2
[svn-r24029] Move TESTS to seperate file to allow easier editing by all developers.
Tested: local linux
Diffstat (limited to 'hl/examples/CMakeTests.cmake')
-rw-r--r--hl/examples/CMakeTests.cmake28
1 files changed, 28 insertions, 0 deletions
diff --git a/hl/examples/CMakeTests.cmake b/hl/examples/CMakeTests.cmake
new file mode 100644
index 0000000..e1ccba0
--- /dev/null
+++ b/hl/examples/CMakeTests.cmake
@@ -0,0 +1,28 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+SET (HDF5_TEST_FILES
+ image24pixel.txt
+ image8.txt
+)
+
+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}
+ )
+ENDFOREACH (h5_file ${HDF5_TEST_FILES})
+
+FOREACH (example ${examples})
+ ADD_TEST (NAME hl_ex_${example} COMMAND $<TARGET_FILE:hl_ex_${example}>)
+ENDFOREACH (example ${examples})
+
+SET_TESTS_PROPERTIES (hl_ex_ex_lite2 PROPERTIES DEPENDS hl_ex_ex_lite1)