diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-02-06 21:30:08 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-02-06 21:30:08 (GMT) |
commit | 78ea0a0c081a1cf07795fffa2100057538510f81 (patch) | |
tree | de3d8d848badde9bb35d937b0c42912f3a62ae5f /tools/h5ls | |
parent | b7acf7dd3b44c9263476c884f57e6c0edb811c49 (diff) | |
download | hdf5-78ea0a0c081a1cf07795fffa2100057538510f81.zip hdf5-78ea0a0c081a1cf07795fffa2100057538510f81.tar.gz hdf5-78ea0a0c081a1cf07795fffa2100057538510f81.tar.bz2 |
HDFFV-9875 Bring changes from develop branch
Diffstat (limited to 'tools/h5ls')
-rw-r--r-- | tools/h5ls/CMakeLists.txt | 39 | ||||
-rw-r--r-- | tools/h5ls/CMakeTests.cmake | 14 |
2 files changed, 33 insertions, 20 deletions
diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index 80bd2f7..0e49edb 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -16,9 +16,18 @@ target_link_libraries (h5ls ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET}) set_target_properties (h5ls PROPERTIES FOLDER tools) set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5ls") -set (H5_DEP_EXECUTABLES - h5ls -) +set (H5_DEP_EXECUTABLES h5ls) + +if (BUILD_SHARED_LIBS) + add_executable (h5ls-shared ${HDF5_TOOLS_H5LS_SOURCE_DIR}/h5ls.c) + TARGET_NAMING (h5ls-shared SHARED) + TARGET_C_PROPERTIES (h5ls-shared SHARED " " " ") + target_link_libraries (h5ls-shared ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) + set_target_properties (h5ls-shared PROPERTIES FOLDER tools) + set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5ls-shared") + + set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} h5ls-shared) +endif () if (BUILD_TESTING) @@ -52,7 +61,7 @@ if (BUILD_TESTING) include (CMakeTests.cmake) -endif (BUILD_TESTING) +endif () ############################################################################## ############################################################################## @@ -63,13 +72,17 @@ endif (BUILD_TESTING) #----------------------------------------------------------------------------- # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- +if (HDF5_EXPORTED_TARGETS) + if (BUILD_SHARED_LIBS) + INSTALL_PROGRAM_PDB (h5ls-shared ${HDF5_INSTALL_BIN_DIR} toolsapplications) + endif () + INSTALL_PROGRAM_PDB (h5ls ${HDF5_INSTALL_BIN_DIR} toolsapplications) -#INSTALL_PROGRAM_PDB (h5ls ${HDF5_INSTALL_BIN_DIR} toolsapplications) - -install ( - TARGETS - h5ls - EXPORT - ${HDF5_EXPORTED_TARGETS} - RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications -) + install ( + TARGETS + ${H5_DEP_EXECUTABLES} + EXPORT + ${HDF5_EXPORTED_TARGETS} + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT toolsapplications + ) +endif () diff --git a/tools/h5ls/CMakeTests.cmake b/tools/h5ls/CMakeTests.cmake index 1646fa9..f995c74 100644 --- a/tools/h5ls/CMakeTests.cmake +++ b/tools/h5ls/CMakeTests.cmake @@ -410,9 +410,9 @@ # ( HDFFV-7838, ) if (H5_WORDS_BIGENDIAN) ADD_H5_TEST (tattrreg_be 0 -w80 -v -d tattrreg.h5) - else (H5_WORDS_BIGENDIAN) + else () ADD_H5_TEST (tattrreg_le 0 -w80 -v -d tattrreg.h5) - endif (H5_WORDS_BIGENDIAN) + endif () # test for non-existing file ADD_H5_TEST (nosuchfile 1 nosuchfile.h5) @@ -420,19 +420,19 @@ # test for variable length data types in verbose mode if (H5_WORDS_BIGENDIAN) ADD_H5_TEST (tvldtypes2be 0 -v tvldtypes1.h5) - else (H5_WORDS_BIGENDIAN) + else () ADD_H5_TEST (tvldtypes2le 0 -v tvldtypes1.h5) - endif (H5_WORDS_BIGENDIAN) + endif () # test for dataset region references data types in verbose mode if (H5_WORDS_BIGENDIAN) ADD_H5_TEST (tdataregbe 0 -v tdatareg.h5) - else (H5_WORDS_BIGENDIAN) + else () ADD_H5_TEST (tdataregle 0 -v tdatareg.h5) - endif (H5_WORDS_BIGENDIAN) + endif () ############################################################################## ### P L U G I N T E S T S ############################################################################## ADD_H5_UD_TEST (h5ls_plugin_test 0 tudfilter -w80 -d tudfilter.h5) - + |