diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-08-19 21:49:44 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-08-19 21:49:44 (GMT) |
commit | c502d81a8c87dd2bce47a5476e3331b04fc69322 (patch) | |
tree | 2549ab26136222cdfae89d4279707051cbb716b0 /hl/examples | |
parent | fcb21bb3dde491209881dc99eb0adc9198f21452 (diff) | |
download | hdf5-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')
-rw-r--r-- | hl/examples/CMakeLists.txt | 36 | ||||
-rw-r--r-- | hl/examples/CMakeTests.cmake | 28 |
2 files changed, 29 insertions, 35 deletions
diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt index b702754..36c799d 100644 --- a/hl/examples/CMakeLists.txt +++ b/hl/examples/CMakeLists.txt @@ -1,20 +1,6 @@ cmake_minimum_required (VERSION 2.8.10) PROJECT (HDF5_HL_EXAMPLES ) -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 h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/${h5_file} ${dest} - ) -ENDFOREACH (h5_file ${HDF5_TEST_FILES}) - #----------------------------------------------------------------------------- # Define Sources #----------------------------------------------------------------------------- @@ -46,30 +32,10 @@ FOREACH (example ${examples}) TARGET_C_PROPERTIES (hl_ex_${example} " " " ") TARGET_LINK_LIBRARIES (hl_ex_${example} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET}) SET_TARGET_PROPERTIES (hl_ex_${example} PROPERTIES FOLDER examples/hl) - - IF (BUILD_TESTING) - ADD_TEST (NAME hl_ex_${example} COMMAND $<TARGET_FILE:hl_ex_${example}>) - ENDIF (BUILD_TESTING) ENDFOREACH (example ${examples}) IF (BUILD_TESTING) - SET_TESTS_PROPERTIES (hl_ex_ex_lite2 PROPERTIES DEPENDS hl_ex_ex_lite1) -ENDIF (BUILD_TESTING) -IF (BUILD_TESTING) - SET (HDF5_TEST_FILES - image24pixel.txt - image8.txt - ) + INCLUDE (CMakeTests.cmake) - 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}) ENDIF (BUILD_TESTING) 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) |