summaryrefslogtreecommitdiffstats
path: root/hl/fortran/examples/CMakeTests.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'hl/fortran/examples/CMakeTests.cmake')
-rw-r--r--hl/fortran/examples/CMakeTests.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/hl/fortran/examples/CMakeTests.cmake b/hl/fortran/examples/CMakeTests.cmake
index 954a01b..2c10295 100644
--- a/hl/fortran/examples/CMakeTests.cmake
+++ b/hl/fortran/examples/CMakeTests.cmake
@@ -5,6 +5,17 @@
##############################################################################
##############################################################################
+# Remove any output file left over from previous test run
+add_test (
+ NAME HL_FORTRAN_f90_ex-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ex_ds1.h5
+ exlite.h5
+)
+
+
foreach (example ${examples})
add_test (NAME HL_FORTRAN_f90_ex_${example} COMMAND $<TARGET_FILE:hl_f90_ex_${example}>)
+ set_tests_properties (HL_FORTRAN_f90_ex_${example} PROPERTIES DEPENDS HL_FORTRAN_f90_ex-clear-objects)
endforeach (example ${examples})