summaryrefslogtreecommitdiffstats
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2013-08-22 18:41:25 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2013-08-22 18:41:25 (GMT)
commit7e0bc290129ac8b90a43b563294db4e7eb359078 (patch)
treeac4e17d4e80cfcfcb626fc0a20e078b99c0ce797 /test/CMakeLists.txt
parentff00749dfc4655281ac8d5347f03234610058caf (diff)
downloadhdf5-7e0bc290129ac8b90a43b563294db4e7eb359078.zip
hdf5-7e0bc290129ac8b90a43b563294db4e7eb359078.tar.gz
hdf5-7e0bc290129ac8b90a43b563294db4e7eb359078.tar.bz2
[svn-r24056] Move make_executable commands back from tests file
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt155
1 files changed, 155 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index cd07d40..2704f0c 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -155,4 +155,159 @@ TARGET_C_PROPERTIES (testhdf5 " " " ")
TARGET_LINK_LIBRARIES (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
SET_TARGET_PROPERTIES (testhdf5 PROPERTIES FOLDER test)
+MACRO (ADD_H5_EXE file)
+ ADD_EXECUTABLE (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
+ TARGET_NAMING (${file} ${LIB_TYPE})
+ TARGET_C_PROPERTIES (${file} " " " ")
+ TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ SET_TARGET_PROPERTIES (${file} PROPERTIES FOLDER test)
+ENDMACRO (ADD_H5_EXE file)
+
+SET (H5_TESTS
+ accum
+ lheap
+ ohdr
+ stab
+ gheap
+ #cache
+ #cache_api
+ #cache_tagging
+ pool
+ hyperslab
+ istore
+ bittests
+ dt_arith
+ dtypes
+ cmpd_dset
+ filter_fail
+ extend
+ external
+ efc
+ objcopy
+ links
+ unlink
+ big
+ mtime
+ fillval
+ mount
+ flush1
+ flush2
+ app_ref
+ enum
+ set_extent
+ #ttsafe
+ getname
+ vfd
+ ntypes
+ dangle
+ dtransform
+ reserved
+ cross_read
+ freespace
+ mf
+ farray
+ earray
+ btree2
+ fheap
+ #error_test
+ #err_compat
+ tcheck_version
+ testmeta
+ #links_env
+ file_image
+ enc_dec_plist
+ enc_dec_plist_with_endianess
+ unregister
+)
+
+FOREACH (test ${H5_TESTS})
+ ADD_H5_EXE(${test})
+ENDFOREACH (test ${H5_TESTS})
+
+##############################################################################
+##############################################################################
+### A D D I T I O N A L T E S T S ###
+##############################################################################
+##############################################################################
+
+#-- Adding test for cache
+ADD_EXECUTABLE (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
+TARGET_NAMING (cache ${LIB_TYPE})
+TARGET_C_PROPERTIES (cache " " " ")
+TARGET_LINK_LIBRARIES (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (cache PROPERTIES FOLDER test)
+
+#-- Adding test for cache_api
+ADD_EXECUTABLE (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
+TARGET_NAMING (cache_api ${LIB_TYPE})
+TARGET_C_PROPERTIES (cache_api " " " ")
+TARGET_LINK_LIBRARIES (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (cache_api PROPERTIES FOLDER test)
+
+#-- Adding test for cache_tagging
+ADD_EXECUTABLE (cache_tagging ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
+TARGET_NAMING (cache_tagging ${LIB_TYPE})
+TARGET_C_PROPERTIES (cache_tagging " " " ")
+TARGET_LINK_LIBRARIES (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (cache_tagging PROPERTIES FOLDER test)
+
+#-- Adding test for ttsafe
+ADD_EXECUTABLE (ttsafe
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c
+)
+TARGET_NAMING (ttsafe ${LIB_TYPE})
+TARGET_C_PROPERTIES (ttsafe " " " ")
+TARGET_LINK_LIBRARIES (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (ttsafe PROPERTIES FOLDER test)
+
+#-- Adding test for err_compat
+IF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+ ADD_EXECUTABLE (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c)
+ TARGET_NAMING (err_compat ${LIB_TYPE})
+ TARGET_C_PROPERTIES (err_compat " " " ")
+ TARGET_LINK_LIBRARIES (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ SET_TARGET_PROPERTIES (err_compat PROPERTIES FOLDER test)
+ENDIF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+
+#-- Adding test for error_test
+ADD_EXECUTABLE (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c)
+TARGET_NAMING (error_test ${LIB_TYPE})
+TARGET_C_PROPERTIES (error_test " " " ")
+TARGET_LINK_LIBRARIES (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (error_test PROPERTIES FOLDER test)
+
+#-- Adding test for links_env
+ADD_EXECUTABLE (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c)
+TARGET_NAMING (links_env ${LIB_TYPE})
+TARGET_C_PROPERTIES (links_env " " " ")
+TARGET_LINK_LIBRARIES (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (links_env PROPERTIES FOLDER test)
+
+#-- Adding test for libinfo
+SET (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake)
+FILE (WRITE ${GREP_RUNNER}
+ "FILE (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\")
+IF (\${TEST_RESULT} STREQUAL \"0\")
+ MESSAGE (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\")
+ELSE (\${TEST_RESULT} STREQUAL \"0\")
+ MESSAGE (STATUS \"COMMAND Result: \${TEST_RESULT}\")
+ENDIF (\${TEST_RESULT} STREQUAL \"0\")
+"
+)
+
+##############################################################################
+### P L U G I N T E S T S
+##############################################################################
+IF (BUILD_SHARED_LIBS)
+ ADD_EXECUTABLE (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c)
+ TARGET_NAMING (plugin ${LIB_TYPE})
+ TARGET_C_PROPERTIES (plugin " " " ")
+ TARGET_LINK_LIBRARIES (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET})
+ SET_TARGET_PROPERTIES (plugin PROPERTIES FOLDER test)
+ENDIF (BUILD_SHARED_LIBS)
+
INCLUDE (CMakeTests.cmake)