summaryrefslogtreecommitdiffstats
path: root/java/examples/groups/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'java/examples/groups/CMakeLists.txt')
-rw-r--r--java/examples/groups/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt
index 5393afd..01da53c 100644
--- a/java/examples/groups/CMakeLists.txt
+++ b/java/examples/groups/CMakeLists.txt
@@ -66,6 +66,7 @@ if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
get_property (target_name TARGET ${HDF5_JAVA_JNI_LIB_TARGET} PROPERTY OUTPUT_NAME)
set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name}$<$<OR:$<CONFIG:Debug>,$<CONFIG:Developer>>:${CMAKE_DEBUG_POSTFIX}>;")
+ set (last_test "")
foreach (example ${HDF_JAVA_EXAMPLES})
if (NOT example STREQUAL "H5Ex_G_Iterate" AND NOT example STREQUAL "H5Ex_G_Visit")
if (example STREQUAL "H5Ex_G_Compact")
@@ -88,6 +89,9 @@ if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
COMMAND ${CMAKE_COMMAND} -E echo "${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5 exists"
)
endif ()
+ if (last_test)
+ set_tests_properties (JAVA_groups-${example}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
add_test (
NAME JAVA_groups-${example}-copy-objects
@@ -132,6 +136,9 @@ if (BUILD_TESTING AND HDF5_TEST_EXAMPLES AND HDF5_TEST_SERIAL)
set_tests_properties (JAVA_groups-${example}-clean-objects PROPERTIES
DEPENDS JAVA_groups-${example}
)
+ set (last_test "JAVA_groups-${example}-clean-objects")
+ else ()
+ set (last_test "JAVA_groups-${example}")
endif ()
endforeach ()
endif ()