summaryrefslogtreecommitdiffstats
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-03-28 01:19:22 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-03-28 01:19:22 (GMT)
commit2a06f943779fd3cc04d93ad6ec9a94a28035c50d (patch)
treee814a5df1a7e5225e5f0434e67dc9d7a966f2349 /test/CMakeLists.txt
parentfeb0f521b16b79485c22c86a630a1d91cb680a61 (diff)
parentf5cb547825e462c3299b6f41d03a71aa6faef950 (diff)
downloadhdf5-2a06f943779fd3cc04d93ad6ec9a94a28035c50d.zip
hdf5-2a06f943779fd3cc04d93ad6ec9a94a28035c50d.tar.gz
hdf5-2a06f943779fd3cc04d93ad6ec9a94a28035c50d.tar.bz2
Merge pull request #2476 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:tools_vol_update to tools_vol_update
* commit 'f5cb547825e462c3299b6f41d03a71aa6faef950': (29 commits) Minor renaming in h5dump (addr --> token) Correct macro check Add extensive warnings to tools executables Reorg comments Correct warning flag form Because of tools macro, this needs to be a warning unused set-variable in macro Fix Werror issues in JNI and tools TRILAB-192 fix JNI shadow warning TRILAB-192 restrict extensive warnings to libraries TRILAB-24 use CHECK_STRUCT_HAS_MEMBER TRILAB-192 add release note TRILAB-192 Identify warnings that fail as errors Correct failure when allocation tracking are disabled. Update the MANIFEST for the autoconf/cmake shared warnings files. Correct syntax Update CMake compiler flags to use same set of warnings Revise API for H5get_alloc_stats() to take a struct instead of separate values. Allow use of INTEL icl/icl++ for clang Move the GNU warnings configuration under config/gnu-warnings/ and trim the filename prefixes. Update config/gnu-flags to suit. ...
Diffstat (limited to 'test/CMakeLists.txt')
-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 ###
##############################################################################