diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-12-03 22:26:37 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-12-03 22:26:37 (GMT) |
commit | 449373deb3dba60b52964cbd86ebe0021d019cfb (patch) | |
tree | a842dfed3fc72db374feeab57d3e3040ecb833cf /examples | |
parent | 109294e6e20afd46e3a1bdc722d900cec839716d (diff) | |
download | hdf5-449373deb3dba60b52964cbd86ebe0021d019cfb.zip hdf5-449373deb3dba60b52964cbd86ebe0021d019cfb.tar.gz hdf5-449373deb3dba60b52964cbd86ebe0021d019cfb.tar.bz2 |
[svn-r19870] Add tests for examples.
Tested: local linux
Diffstat (limited to 'examples')
-rw-r--r-- | examples/CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 71eaa34..4ea3f86 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -27,11 +27,23 @@ FOREACH (example ${examples}) H5_NAMING (${example}) TARGET_WIN_PROPERTIES (${example}) TARGET_LINK_LIBRARIES (${example} ${HDF5_LIB_TARGET}) + + IF (BUILD_TESTING) + ADD_TEST (NAME ${example} COMMAND $<TARGET_FILE:${example}>) + ENDIF (BUILD_TESTING) ENDFOREACH (example ${examples}) +IF (BUILD_TESTING) + FILE (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/red ${PROJECT_BINARY_DIR}/blue ${PROJECT_BINARY_DIR}/u2w) +ENDIF (BUILD_TESTING) + IF (H5_HAVE_PARALLEL) ADD_EXECUTABLE (ph5example ${HDF5_EXAMPLES_SOURCE_DIR}/ph5example.c) H5_NAMING (ph5example) TARGET_WIN_PROPERTIES (ph5example) TARGET_LINK_LIBRARIES (ph5example ${HDF5_LIB_TARGET}) + + IF (BUILD_TESTING) + ADD_TEST (NAME ph5example COMMAND $<TARGET_FILE:ph5example>) + ENDIF (BUILD_TESTING) ENDIF (H5_HAVE_PARALLEL) |