2018-03-10 02:31:58 +08:00
|
|
|
cmake_minimum_required (VERSION 3.10)
|
2018-04-20 23:11:55 +08:00
|
|
|
project (HDF5_TEST_PAR C)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Define Tests
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
2016-05-04 23:06:05 +08:00
|
|
|
set (testphdf5_SOURCES
|
2010-05-14 00:01:50 +08:00
|
|
|
${HDF5_TEST_PAR_SOURCE_DIR}/testphdf5.c
|
|
|
|
${HDF5_TEST_PAR_SOURCE_DIR}/t_dset.c
|
|
|
|
${HDF5_TEST_PAR_SOURCE_DIR}/t_file.c
|
2012-04-05 02:01:29 +08:00
|
|
|
${HDF5_TEST_PAR_SOURCE_DIR}/t_file_image.c
|
2010-05-14 00:01:50 +08:00
|
|
|
${HDF5_TEST_PAR_SOURCE_DIR}/t_mdset.c
|
|
|
|
${HDF5_TEST_PAR_SOURCE_DIR}/t_ph5basic.c
|
|
|
|
${HDF5_TEST_PAR_SOURCE_DIR}/t_coll_chunk.c
|
|
|
|
${HDF5_TEST_PAR_SOURCE_DIR}/t_span_tree.c
|
|
|
|
${HDF5_TEST_PAR_SOURCE_DIR}/t_chunk_alloc.c
|
|
|
|
${HDF5_TEST_PAR_SOURCE_DIR}/t_filter_read.c
|
2012-09-27 04:53:18 +08:00
|
|
|
${HDF5_TEST_PAR_SOURCE_DIR}/t_prop.c
|
2010-05-14 00:01:50 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
#-- Adding test for testhdf5
|
2016-05-04 23:06:05 +08:00
|
|
|
add_executable (testphdf5 ${testphdf5_SOURCES})
|
2018-04-27 05:41:04 +08:00
|
|
|
target_include_directories(testphdf5
|
|
|
|
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
|
|
|
|
)
|
|
|
|
TARGET_C_PROPERTIES (testphdf5 STATIC)
|
|
|
|
target_link_libraries (testphdf5
|
2018-07-28 03:58:01 +08:00
|
|
|
PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
|
2018-04-27 05:41:04 +08:00
|
|
|
)
|
2014-03-12 05:14:57 +08:00
|
|
|
set_target_properties (testphdf5 PROPERTIES FOLDER test/par)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
2013-08-20 05:49:44 +08:00
|
|
|
MACRO (ADD_H5P_EXE file)
|
2014-03-12 05:14:57 +08:00
|
|
|
add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c)
|
2018-04-27 05:41:04 +08:00
|
|
|
target_include_directories(${file}
|
|
|
|
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
|
|
|
|
)
|
|
|
|
TARGET_C_PROPERTIES (${file} STATIC)
|
|
|
|
target_link_libraries (${file}
|
2018-07-28 03:58:01 +08:00
|
|
|
PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
|
2018-04-27 05:41:04 +08:00
|
|
|
)
|
2014-03-12 05:14:57 +08:00
|
|
|
set_target_properties (${file} PROPERTIES FOLDER test/par)
|
2013-08-20 05:49:44 +08:00
|
|
|
ENDMACRO (ADD_H5P_EXE file)
|
2010-05-14 00:01:50 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
set (H5P_TESTS
|
2010-05-14 00:01:50 +08:00
|
|
|
t_mpi
|
2017-07-11 04:17:26 +08:00
|
|
|
t_bigio
|
2010-05-14 00:01:50 +08:00
|
|
|
t_cache
|
2018-02-28 02:57:07 +08:00
|
|
|
t_cache_image
|
2010-05-14 00:01:50 +08:00
|
|
|
t_pflush1
|
|
|
|
t_pflush2
|
2017-09-29 04:27:29 +08:00
|
|
|
t_pread
|
2015-02-23 23:14:43 +08:00
|
|
|
t_pshutdown
|
|
|
|
t_prestart
|
2015-06-09 04:52:48 +08:00
|
|
|
t_init_term
|
2011-01-31 23:42:46 +08:00
|
|
|
t_shapesame
|
2017-09-15 20:57:40 +08:00
|
|
|
t_filters_parallel
|
2010-05-14 00:01:50 +08:00
|
|
|
)
|
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
foreach (testp ${H5P_TESTS})
|
2013-08-20 05:49:44 +08:00
|
|
|
ADD_H5P_EXE(${testp})
|
2017-03-02 04:47:53 +08:00
|
|
|
endforeach ()
|
2010-05-14 00:01:50 +08:00
|
|
|
|
2014-03-12 05:14:57 +08:00
|
|
|
include (CMakeTests.cmake)
|