summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-06-01 15:47:43 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-06-01 15:47:43 (GMT)
commitfa518dfcab6de70f74bf888d9a50f12cefd370c3 (patch)
tree7364b4752bb72c20c64ab9867ea5ce0717f094b4
parent83d24645a1b5a9db4e10fa76332292f3d97a942f (diff)
parentf5b0b1c60784a3dbfea6cdf6082106fc8bed0462 (diff)
downloadhdf5-fa518dfcab6de70f74bf888d9a50f12cefd370c3.zip
hdf5-fa518dfcab6de70f74bf888d9a50f12cefd370c3.tar.gz
hdf5-fa518dfcab6de70f74bf888d9a50f12cefd370c3.tar.bz2
Merge pull request #1096 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'f5b0b1c60784a3dbfea6cdf6082106fc8bed0462': Fix usage of compression lib in shared tests
-rw-r--r--test/CMakeLists.txt19
1 files changed, 18 insertions, 1 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index a2ade92..517a620 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -200,7 +200,7 @@ set (H5_TESTS
cmpd_dset
filter_fail
extend
- direct_chunk
+ direct_chunk # compression lib link
external
efc
objcopy
@@ -252,6 +252,7 @@ macro (ADD_H5_EXE file)
endmacro ()
set (H5_TESTS_MULTIPLE
+ direct_chunk
testhdf5
cache_image
ttsafe
@@ -266,7 +267,23 @@ endforeach ()
##############################################################################
### M U L T I P L E S O U R C E T E S T S ###
##############################################################################
+######### Also special handling of link libs #############
+#-- Adding test for direct_chunk
+add_executable (direct_chunk ${HDF5_TEST_SOURCE_DIR}/direct_chunk.c)
+target_include_directories(direct_chunk PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+TARGET_C_PROPERTIES (direct_chunk STATIC)
+target_link_libraries (direct_chunk PRIVATE ${HDF5_TEST_LIB_TARGET} ${LINK_COMP_LIBS})
+set_target_properties (direct_chunk PROPERTIES FOLDER test)
+if (BUILD_SHARED_LIBS)
+ add_executable (direct_chunk-shared ${HDF5_TEST_SOURCE_DIR}/direct_chunk.c)
+ target_include_directories(direct_chunk-shared PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_TEST_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ TARGET_C_PROPERTIES (direct_chunk-shared SHARED)
+ target_link_libraries (direct_chunk-shared PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${LINK_COMP_LIBS})
+ set_target_properties (direct_chunk-shared PROPERTIES FOLDER test)
+endif ()
+
+######### Special handling for multiple sources #############
#-- Adding test for testhdf5
add_executable (testhdf5 ${testhdf5_SOURCES})
target_include_directories(testhdf5 PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")