summaryrefslogtreecommitdiffstats
path: root/fortran/examples/CMakeTests.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/examples/CMakeTests.cmake')
-rw-r--r--fortran/examples/CMakeTests.cmake52
1 files changed, 25 insertions, 27 deletions
diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake
index 221e5cc..5e7dfa8 100644
--- a/fortran/examples/CMakeTests.cmake
+++ b/fortran/examples/CMakeTests.cmake
@@ -16,34 +16,30 @@
##############################################################################
##############################################################################
- set (test_CLEANFILES
- compound.h5
- copy1.h5
- copy2.h5
- dsetf.h5
- extend.h5
- FORTRAN.h5
- groupf.h5
- groupsf.h5
- h5_cmprss.h5
- mount1.h5
- mount2.h5
- sdsf.h5
- subset.h5
- SDScompound.h5
- test.h5
- )
+set (test_ex_fortran_CLEANFILES
+ compound.h5
+ copy1.h5
+ copy2.h5
+ dsetf.h5
+ extend.h5
+ FORTRAN.h5
+ groupf.h5
+ groupsf.h5
+ h5_cmprss.h5
+ mount1.h5
+ mount2.h5
+ sdsf.h5
+ subset.h5
+ SDScompound.h5
+ test.h5
+)
- # Remove any output file left over from previous test run
- add_test (
- NAME f90_ex-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ${test_CLEANFILES}
- )
- if (last_test)
- set_tests_properties (f90_ex-clear-objects PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "f90_ex-clear-objects")
+# Remove any output file left over from previous test run
+add_test (
+ NAME f90_ex-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${test_ex_fortran_CLEANFILES}
+)
+set_tests_properties (f90_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_f90_ex)
foreach (example ${examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -61,6 +57,7 @@ foreach (example ${examples})
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
+ set_tests_properties (f90_ex_${example} PROPERTIES FIXTURES_REQUIRED clear_f90_ex)
if (last_test)
set_tests_properties (f90_ex_${example} PROPERTIES DEPENDS ${last_test})
endif ()
@@ -83,6 +80,7 @@ foreach (example ${F2003_examples})
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
+ set_tests_properties (f03_ex_${example} PROPERTIES FIXTURES_REQUIRED clear_f90_ex)
if (last_test)
set_tests_properties (f03_ex_${example} PROPERTIES DEPENDS ${last_test})
endif ()