summaryrefslogtreecommitdiffstats
path: root/testpar/CMakeLists.txt
diff options
context:
space:
mode:
authorM. Scot Breitenfeld <brtnfld@hdfgroup.org>2019-06-25 17:39:35 (GMT)
committerM. Scot Breitenfeld <brtnfld@hdfgroup.org>2019-06-25 17:39:35 (GMT)
commit35c9af8371c4da7f5327c76ddab097b442128f59 (patch)
treed51be51c385a9b463388ba154efc3fa37cad49e8 /testpar/CMakeLists.txt
parentc752332bfd0e9c3090f3a0c02d0253cd45c2e2ce (diff)
parent1d8f7bf297100ec11204442708a7f670a89f3f02 (diff)
downloadhdf5-inactive/parallel_vds_develop.zip
hdf5-inactive/parallel_vds_develop.tar.gz
hdf5-inactive/parallel_vds_develop.tar.bz2
Merge branch 'develop' into parallel_vds_developinactive/parallel_vds_develop
Diffstat (limited to 'testpar/CMakeLists.txt')
-rw-r--r--testpar/CMakeLists.txt40
1 files changed, 27 insertions, 13 deletions
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 797cb3f..95ff0de 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -22,24 +22,38 @@ set (testphdf5_SOURCES
#-- Adding test for testhdf5
add_executable (testphdf5 ${testphdf5_SOURCES})
-target_include_directories(testphdf5
+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
- PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
-)
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (testphdf5 STATIC)
+ target_link_libraries (testphdf5
+ PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
+ )
+else ()
+ TARGET_C_PROPERTIES (testphdf5 SHARED)
+ target_link_libraries (testphdf5
+ PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
+ )
+endif ()
set_target_properties (testphdf5 PROPERTIES FOLDER test/par)
MACRO (ADD_H5P_EXE file)
add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c)
- target_include_directories(${file}
+ 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}
- PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
- )
+ if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (${file} STATIC)
+ target_link_libraries (${file}
+ PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
+ )
+ else ()
+ TARGET_C_PROPERTIES (${file} SHARED)
+ target_link_libraries (${file}
+ PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
+ )
+ endif ()
set_target_properties (${file} PROPERTIES FOLDER test/par)
ENDMACRO (ADD_H5P_EXE file)
@@ -47,7 +61,7 @@ set (H5P_TESTS
t_mpi
t_bigio
t_cache
- t_cache_image
+ #t_cache_image
t_pflush1
t_pflush2
t_pread
@@ -60,8 +74,8 @@ set (H5P_TESTS
t_filters_parallel
)
-foreach (testp ${H5P_TESTS})
- ADD_H5P_EXE(${testp})
+foreach (h5_testp ${H5P_TESTS})
+ ADD_H5P_EXE(${h5_testp})
endforeach ()
include (CMakeTests.cmake)