diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-03-19 14:23:02 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-03-19 14:23:02 (GMT) |
commit | 26fecb8c5a444c64106c36750addfc9d71338c1d (patch) | |
tree | 09d1ecfd5d25472fb59ba0cd04c2f6b27b92c0e9 /test | |
parent | eecddd9f3e80c2d00235e289653a0adbe44136d9 (diff) | |
parent | 6be711bbd2b86de5bcd8f092d8f27d6b2251c111 (diff) | |
download | hdf5-26fecb8c5a444c64106c36750addfc9d71338c1d.zip hdf5-26fecb8c5a444c64106c36750addfc9d71338c1d.tar.gz hdf5-26fecb8c5a444c64106c36750addfc9d71338c1d.tar.bz2 |
Merge pull request #2457 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '6be711bbd2b86de5bcd8f092d8f27d6b2251c111':
Fix threadsafe for new test
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 21 |
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 ### ############################################################################## |