summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-01-02 20:37:25 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-01-02 20:37:25 (GMT)
commitd31b45766fa5bdbb7245cf5aa9444c9e6c6ca863 (patch)
tree9a13b5ed0513c16f752e2ab98ac245d6ededaf8f /tools/lib
parent08f7c97077585f9a9c36dc9c6f976e53fafdc690 (diff)
parent17b8f0bb936633f01bf6deba247e37bcadbc6b82 (diff)
downloadhdf5-d31b45766fa5bdbb7245cf5aa9444c9e6c6ca863.zip
hdf5-d31b45766fa5bdbb7245cf5aa9444c9e6c6ca863.tar.gz
hdf5-d31b45766fa5bdbb7245cf5aa9444c9e6c6ca863.tar.bz2
Merge pull request #840 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '17b8f0bb936633f01bf6deba247e37bcadbc6b82': Fix valgrind issues HDFFV-9724 init var to null HDFFV-9724 add valgrind ENV Fix memory leak due to addition of FORMAT check loop HDFFV-9724 prefix of 0 length should be null value HDFFV-9724 Corrected files and verified tests Add library INTERFACE and MPI to tools
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt
index ade7671..0fc1981 100644
--- a/tools/lib/CMakeLists.txt
+++ b/tools/lib/CMakeLists.txt
@@ -39,7 +39,10 @@ set (H5_TOOLS_LIB_HDRS
add_library (${HDF5_TOOLS_LIB_TARGET} STATIC ${H5_TOOLS_LIB_SOURCES} ${H5_TOOLS_LIB_HDRS})
TARGET_C_PROPERTIES (${HDF5_TOOLS_LIB_TARGET} STATIC " " " ")
-target_link_libraries (${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
+target_link_libraries (${HDF5_TOOLS_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
+if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)
+ target_link_libraries (${HDF5_TOOLS_LIB_TARGET} PRIVATE ${MPI_C_LIBRARIES})
+endif ()
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_TOOLS_LIB_TARGET} ${HDF5_TOOLS_LIB_NAME} STATIC)
set_target_properties (${HDF5_TOOLS_LIB_TARGET} PROPERTIES
@@ -52,7 +55,10 @@ set (install_targets ${HDF5_TOOLS_LIB_TARGET})
if (BUILD_SHARED_LIBS)
add_library (${HDF5_TOOLS_LIBSH_TARGET} SHARED ${H5_TOOLS_LIB_SOURCES} ${H5_TOOLS_LIB_HDRS})
TARGET_C_PROPERTIES (${HDF5_TOOLS_LIBSH_TARGET} SHARED " " " ")
- target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
+ target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
+ if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)
+ target_link_libraries (${HDF5_TOOLS_LIBSH_TARGET} PRIVATE ${MPI_C_LIBRARIES})
+ endif ()
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TOOLS_LIBSH_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TOOLS_LIB_NAME} SHARED ${HDF5_TOOLS_PACKAGE_SOVERSION})
set_target_properties (${HDF5_TOOLS_LIBSH_TARGET} PROPERTIES