summaryrefslogtreecommitdiffstats
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt32
1 files changed, 12 insertions, 20 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 95f021d..2cbcd2a 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -30,6 +30,7 @@ IF (MINGW)
ENDIF (MINGW)
TARGET_LINK_LIBRARIES (${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} ${LIB_TYPE})
+SET_TARGET_PROPERTIES (${HDF5_TEST_LIB_TARGET} PROPERTIES FOLDER libraries/test)
# --------------------------------------------------------------------
# Copy all the HDF5 files from the test directory into the source directory
@@ -152,6 +153,7 @@ SET (testhdf5_SRCS
ADD_EXECUTABLE (testhdf5 ${testhdf5_SRCS})
TARGET_NAMING (testhdf5 ${LIB_TYPE})
TARGET_LINK_LIBRARIES (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+SET_TARGET_PROPERTIES (testhdf5 PROPERTIES FOLDER test)
# Remove any output file left over from previous test run
ADD_TEST (
@@ -176,7 +178,6 @@ ADD_TEST (
)
ADD_TEST (NAME testhdf5 COMMAND $<TARGET_FILE:testhdf5>)
SET_TESTS_PROPERTIES(testhdf5 PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
-
##############################################################################
##############################################################################
@@ -188,6 +189,7 @@ MACRO (ADD_H5_TEST file)
ADD_EXECUTABLE (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
TARGET_NAMING (${file} ${LIB_TYPE})
TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ SET_TARGET_PROPERTIES (${file} PROPERTIES FOLDER test)
ADD_TEST (NAME ${file} COMMAND $<TARGET_FILE:${file}>)
ENDMACRO (ADD_H5_TEST file)
@@ -314,7 +316,6 @@ ENDFOREACH (test ${H5_TESTS})
SET_TESTS_PROPERTIES(flush2 PROPERTIES DEPENDS flush1)
-
##############################################################################
##############################################################################
### A D D I T I O N A L T E S T S ###
@@ -325,6 +326,7 @@ SET_TESTS_PROPERTIES(flush2 PROPERTIES DEPENDS flush1)
ADD_EXECUTABLE (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
TARGET_NAMING (cache ${LIB_TYPE})
TARGET_LINK_LIBRARIES (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (cache PROPERTIES FOLDER test)
ADD_TEST (
NAME h5test-clear-cache-objects
COMMAND ${CMAKE_COMMAND}
@@ -338,6 +340,7 @@ SET_TESTS_PROPERTIES(cache PROPERTIES DEPENDS h5test-clear-cache-objects)
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_LINK_LIBRARIES (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (cache_api PROPERTIES FOLDER test)
ADD_TEST (
NAME h5test-clear-cache_api-objects
@@ -352,6 +355,7 @@ SET_TESTS_PROPERTIES(cache_api PROPERTIES DEPENDS h5test-clear-cache_api-objects
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_LINK_LIBRARIES (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (cache_tagging PROPERTIES FOLDER test)
ADD_TEST (
NAME h5test-clear-cache_tagging-objects
@@ -373,6 +377,7 @@ ADD_EXECUTABLE (ttsafe
)
TARGET_NAMING (ttsafe ${LIB_TYPE})
TARGET_LINK_LIBRARIES (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (ttsafe PROPERTIES FOLDER test)
ADD_TEST (
NAME h5test-clear-ttsafe-objects
@@ -391,6 +396,7 @@ IF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
ADD_EXECUTABLE (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c)
TARGET_NAMING (err_compat ${LIB_TYPE})
TARGET_LINK_LIBRARIES (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ SET_TARGET_PROPERTIES (err_compat PROPERTIES FOLDER test)
ADD_TEST (
NAME h5test-clear-err_compat-objects
@@ -416,6 +422,7 @@ ENDIF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
ADD_EXECUTABLE (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c)
TARGET_NAMING (error_test ${LIB_TYPE})
TARGET_LINK_LIBRARIES (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (error_test PROPERTIES FOLDER test)
ADD_TEST (
NAME h5test-clear-error_test-objects
@@ -440,6 +447,7 @@ SET_TESTS_PROPERTIES(error_test PROPERTIES DEPENDS h5test-clear-error_test-objec
ADD_EXECUTABLE (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c)
TARGET_NAMING (links_env ${LIB_TYPE})
TARGET_LINK_LIBRARIES (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (links_env PROPERTIES FOLDER test)
ADD_TEST (
NAME h5test-clear-links_env-objects
@@ -600,6 +608,7 @@ IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c)
TARGET_NAMING (${genfile} ${LIB_TYPE})
TARGET_LINK_LIBRARIES (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ SET_TARGET_PROPERTIES (${genfile} PROPERTIES FOLDER generator/test)
ENDMACRO (ADD_H5_GENERATOR genfile)
# generator executables
@@ -624,24 +633,7 @@ IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
)
FOREACH (gen ${H5_GENERATORS})
- ADD_EXECUTABLE (${gen} ${HDF5_TEST_SOURCE_DIR}/${gen}.c)
- TARGET_NAMING (${gen} ${LIB_TYPE})
- TARGET_LINK_LIBRARIES (${gen} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ ADD_H5_GENERATOR (${gen})
ENDFOREACH (gen ${H5_GENERATORS})
ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
-
-#-- Put the tests in a solution folder in Visual Studio
-set_target_properties(hdf5_test PROPERTIES FOLDER libraries)
-FOREACH (test ${H5_TESTS})
- set_target_properties(${test} PROPERTIES FOLDER test)
-ENDFOREACH (test ${H5_TESTS})
-set_target_properties(testhdf5 PROPERTIES FOLDER test)
-set_target_properties(cache PROPERTIES FOLDER test)
-set_target_properties(cache_api PROPERTIES FOLDER test)
-set_target_properties(cache_tagging PROPERTIES FOLDER test)
-set_target_properties(ttsafe PROPERTIES FOLDER test)
-set_target_properties(err_compat PROPERTIES FOLDER test)
-set_target_properties(error_test PROPERTIES FOLDER test)
-set_target_properties(links_env PROPERTIES FOLDER test)
-