summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@koziol.gov>2020-03-20 20:50:24 (GMT)
committerQuincey Koziol <koziol@koziol.gov>2020-03-20 20:50:24 (GMT)
commit66350c3356876d590ba250e75fd8d68a66af76f9 (patch)
tree2e8ef51bc48ffd484a8daadc4cce77c48b70dc52 /test
parentae5f556415d9dccd4005299cd0e9683dafdeda68 (diff)
parent26fecb8c5a444c64106c36750addfc9d71338c1d (diff)
downloadhdf5-66350c3356876d590ba250e75fd8d68a66af76f9.zip
hdf5-66350c3356876d590ba250e75fd8d68a66af76f9.tar.gz
hdf5-66350c3356876d590ba250e75fd8d68a66af76f9.tar.bz2
Merge remote-tracking branch 'origin/develop' into alloc_stats
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt21
1 files changed, 20 insertions, 1 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 2594477..7929e2c 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -287,7 +287,7 @@ set (H5_TESTS
cache_logging
cork
swmr
- thread_id
+ thread_id # special link
vol
)
@@ -310,6 +310,7 @@ set (H5_TESTS_MULTIPLE
testhdf5
cache_image
ttsafe
+ thread_id # special link
)
# Only build single source tests here
foreach (h5_test ${H5_TESTS})
@@ -389,6 +390,24 @@ else ()
endif ()
set_target_properties (ttsafe PROPERTIES FOLDER test)
+######### Special handling for extra link lib of threads #############
+#-- Adding test for thread_id
+add_executable (thread_id ${HDF5_TEST_SOURCE_DIR}/thread_id.c)
+target_include_directories (thread_id PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (thread_id STATIC)
+ target_link_libraries (thread_id PRIVATE ${HDF5_TEST_LIB_TARGET})
+ if (NOT WIN32)
+ target_link_libraries (thread_id
+ PRIVATE $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>
+ )
+ endif ()
+else ()
+ TARGET_C_PROPERTIES (thread_id SHARED)
+ target_link_libraries (thread_id PRIVATE ${HDF5_TEST_LIBSH_TARGET} $<$<BOOL:${HDF5_ENABLE_THREADSAFE}>:Threads::Threads>)
+endif ()
+set_target_properties (thread_id PROPERTIES FOLDER test)
+
##############################################################################
### A D D I T I O N A L T E S T S ###
##############################################################################