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.cmake23
1 files changed, 19 insertions, 4 deletions
diff --git a/hl/fortran/examples/CMakeTests.cmake b/hl/fortran/examples/CMakeTests.cmake
index 2e73ad9..b51e657 100644
--- a/hl/fortran/examples/CMakeTests.cmake
+++ b/hl/fortran/examples/CMakeTests.cmake
@@ -17,14 +17,28 @@
##############################################################################
# Remove any output file left over from previous test run
+set (HL_FORTRAN_F90_EX_CLEANFILES
+ ex_ds1.h5
+ exlite.h5
+)
add_test (
NAME HL_FORTRAN_f90_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
- ex_ds1.h5
- exlite.h5
+ -E remove ${HL_FORTRAN_F90_EX_CLEANFILES}
+)
+set_tests_properties (HL_FORTRAN_f90_ex-clear-objects PROPERTIES
+ FIXTURES_SETUP clear_HL_FORTRAN_f90_ex
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
+)
+add_test (
+ NAME HL_FORTRAN_f90_ex-clean-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${HL_FORTRAN_F90_EX_CLEANFILES}
+)
+set_tests_properties (HL_FORTRAN_f90_ex-clean-objects PROPERTIES
+ FIXTURES_CLEANUP clear_HL_FORTRAN_f90_ex
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
-set_tests_properties (HL_FORTRAN_f90_ex-clear-objects PROPERTIES FIXTURES_SETUP clear_HL_FORTRAN_f90_ex)
foreach (example ${examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -44,5 +58,6 @@ foreach (example ${examples})
endif ()
set_tests_properties (HL_FORTRAN_f90_ex_${example} PROPERTIES
FIXTURES_REQUIRED clear_HL_FORTRAN_f90_ex
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
endforeach ()