2013-08-20 05:49:44 +08:00
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
##############################################################################
|
|
|
|
### T E S T I N G ###
|
|
|
|
##############################################################################
|
|
|
|
##############################################################################
|
|
|
|
|
2013-11-02 05:15:37 +08:00
|
|
|
# Remove any output file left over from previous test run
|
2014-03-12 06:07:13 +08:00
|
|
|
add_test (
|
2013-11-02 05:15:37 +08:00
|
|
|
NAME f90_ex-clear-objects
|
|
|
|
COMMAND ${CMAKE_COMMAND}
|
2015-08-27 00:48:42 +08:00
|
|
|
-E remove
|
2013-11-02 05:15:37 +08:00
|
|
|
compound.h5
|
|
|
|
copy1.h5
|
|
|
|
copy2.h5
|
|
|
|
dsetf.h5
|
2015-08-27 00:48:42 +08:00
|
|
|
extend.h5
|
2013-11-02 05:15:37 +08:00
|
|
|
FORTRAN.h5
|
|
|
|
groupf.h5
|
|
|
|
groupsf.h5
|
|
|
|
h5_cmprss.h5
|
|
|
|
mount1.h5
|
|
|
|
mount2.h5
|
|
|
|
sdsf.h5
|
|
|
|
subset.h5
|
2016-05-04 23:06:05 +08:00
|
|
|
SDScompound.h5
|
|
|
|
test.h5
|
2013-11-02 05:15:37 +08:00
|
|
|
)
|
2014-03-12 05:14:57 +08:00
|
|
|
if (NOT "${last_test}" STREQUAL "")
|
2014-03-12 06:07:13 +08:00
|
|
|
set_tests_properties (f90_ex-clear-objects PROPERTIES DEPENDS ${last_test})
|
2014-03-12 05:14:57 +08:00
|
|
|
endif (NOT "${last_test}" STREQUAL "")
|
|
|
|
set (last_test "f90_ex-clear-objects")
|
2015-08-27 00:48:42 +08:00
|
|
|
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
|
2015-08-05 23:56:58 +08:00
|
|
|
add_test (
|
|
|
|
NAME f90_ex-shared-clear-objects
|
|
|
|
COMMAND ${CMAKE_COMMAND}
|
2015-08-27 00:48:42 +08:00
|
|
|
-E remove
|
2015-08-05 23:56:58 +08:00
|
|
|
compound.h5
|
|
|
|
copy1.h5
|
|
|
|
copy2.h5
|
|
|
|
dsetf.h5
|
2015-08-27 00:48:42 +08:00
|
|
|
extend.h5
|
2015-08-05 23:56:58 +08:00
|
|
|
FORTRAN.h5
|
|
|
|
groupf.h5
|
|
|
|
groupsf.h5
|
|
|
|
h5_cmprss.h5
|
|
|
|
mount1.h5
|
|
|
|
mount2.h5
|
|
|
|
sdsf.h5
|
|
|
|
subset.h5
|
2016-05-04 23:06:05 +08:00
|
|
|
SDScompound.h5
|
|
|
|
test.h5
|
2015-08-05 23:56:58 +08:00
|
|
|
)
|
|
|
|
if (NOT "${last_test}" STREQUAL "")
|
|
|
|
set_tests_properties (f90_ex-shared-clear-objects PROPERTIES DEPENDS ${last_test})
|
|
|
|
endif (NOT "${last_test}" STREQUAL "")
|
|
|
|
set (last_test "f90_ex-shared-clear-objects")
|
2015-08-27 00:48:42 +08:00
|
|
|
endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
|
2013-11-02 05:15:37 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
foreach (example ${examples})
|
2014-03-12 06:07:13 +08:00
|
|
|
add_test (NAME f90_ex_${example} COMMAND $<TARGET_FILE:f90_ex_${example}>)
|
2014-03-12 05:14:57 +08:00
|
|
|
if (NOT "${last_test}" STREQUAL "")
|
2014-03-12 06:07:13 +08:00
|
|
|
set_tests_properties (f90_ex_${example} PROPERTIES DEPENDS ${last_test})
|
2014-03-12 05:14:57 +08:00
|
|
|
endif (NOT "${last_test}" STREQUAL "")
|
|
|
|
set (last_test "f90_ex_${example}")
|
2015-08-27 00:48:42 +08:00
|
|
|
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
|
2015-08-05 23:56:58 +08:00
|
|
|
add_test (NAME f90_ex-shared_${example} COMMAND $<TARGET_FILE:f90_ex_${example}-shared>)
|
|
|
|
if (NOT "${last_test}" STREQUAL "")
|
|
|
|
set_tests_properties (f90_ex-shared_${example} PROPERTIES DEPENDS ${last_test})
|
|
|
|
endif (NOT "${last_test}" STREQUAL "")
|
|
|
|
set (last_test "f90_ex-shared_${example}")
|
2015-08-27 00:48:42 +08:00
|
|
|
endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
|
2014-03-12 05:14:57 +08:00
|
|
|
endforeach (example ${examples})
|
2013-08-20 05:49:44 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
if (HDF5_ENABLE_F2003)
|
|
|
|
foreach (example ${F2003_examples})
|
2014-03-12 06:07:13 +08:00
|
|
|
add_test (NAME f03_ex_${example} COMMAND $<TARGET_FILE:f03_ex_${example}>)
|
2014-03-12 05:14:57 +08:00
|
|
|
if (NOT "${last_test}" STREQUAL "")
|
2014-03-12 06:07:13 +08:00
|
|
|
set_tests_properties (f03_ex_${example} PROPERTIES DEPENDS ${last_test})
|
2014-03-12 05:14:57 +08:00
|
|
|
endif (NOT "${last_test}" STREQUAL "")
|
|
|
|
set (last_test "f03_ex_${example}")
|
2015-08-27 00:48:42 +08:00
|
|
|
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
|
2015-08-05 23:56:58 +08:00
|
|
|
add_test (NAME f03_ex-shared_${example} COMMAND $<TARGET_FILE:f03_ex_${example}-shared>)
|
|
|
|
if (NOT "${last_test}" STREQUAL "")
|
|
|
|
set_tests_properties (f03_ex-shared_${example} PROPERTIES DEPENDS ${last_test})
|
|
|
|
endif (NOT "${last_test}" STREQUAL "")
|
|
|
|
set (last_test "f03_ex-shared_${example}")
|
2015-08-27 00:48:42 +08:00
|
|
|
endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
|
2014-03-12 05:14:57 +08:00
|
|
|
endforeach (example ${F2003_examples})
|
|
|
|
endif (HDF5_ENABLE_F2003)
|
2013-08-20 05:49:44 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
|
2014-03-12 06:07:13 +08:00
|
|
|
add_test (NAME f90_ex_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:f90_ex_ph5example>)
|
2015-08-27 00:48:42 +08:00
|
|
|
if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
|
2015-08-05 23:56:58 +08:00
|
|
|
add_test (NAME f90_ex-shared_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:f90_ex_ph5example>)
|
2015-08-27 00:48:42 +08:00
|
|
|
endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
|
2014-03-12 05:14:57 +08:00
|
|
|
endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
|