summaryrefslogtreecommitdiffstats
path: root/tools/src/h5ls
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2024-03-05 14:52:09 (GMT)
committerGitHub <noreply@github.com>2024-03-05 14:52:09 (GMT)
commit7741170bdd225da130f3ab98c454c118b5511b14 (patch)
tree35e631c884f16cf1251523c703b25df5cb178541 /tools/src/h5ls
parentc44e0e35ed584d4efe67bdf1dafe25a793085e0f (diff)
downloadhdf5-7741170bdd225da130f3ab98c454c118b5511b14.zip
hdf5-7741170bdd225da130f3ab98c454c118b5511b14.tar.gz
hdf5-7741170bdd225da130f3ab98c454c118b5511b14.tar.bz2
Sync develop branch changes since 2/16 to hdf5_1_14 branch (#4058)
* Remove oneapi return value warning. (#4028) * Replaced last sprintf with snprintf (#4007) * Replaced last sprintf with snprintf To have the size of the buffer, it was required to change a function signature, and change all users of it. In most cases, determining the buffer size wasn't trivial and so SIZE_MAX is passed. But at least this improves the infrastructure. Someone can later figure out the correct sizes. * Test vlen sequence IO in API tests (#4027) * Check argument for CMake REGEX FCMangle.h. (#4029) * Replace deprecated Fortran 'include mpif.h' with 'USE mpi' (#4031) With MPI 4.1 the use of the mpif.h include file has been deprecated. Codes should transition to USE mpi or USE mpi_f08. Signed-off-by: Christoph Niethammer <niethammer@hlrs.de> * Fix H5F_get_access_plist to copy file locking settings (#4030) H5F_get_access_plist previously did not copy over the file locking settings from a file into the new File Access Property List that it creates. This would make it difficult to match the file locking settings between an external file and its parent file. * Fix missing NOT from if check in HL folder (#4036) * Fix the datatype passed to H5*exists_async APIs in tests. (#4033) Add a new testing function to verify C_BOOL values. * Add deb and rpm binaries to snapshots (#4035) * Update and Add general INSTALL (#4016) * Improve performance of flushing single objects (#4017) Improve performance of flushing a single object, and remove metadata cache flush markers * Fix memory leak in H5LTopen_file_image when H5LT_FILE_IMAGE_DONT_COPY flag is used (#4021) When the H5LT_FILE_IMAGE_DONT_COPY flag is passed to H5LTopen_file_image, the internally-allocated udata structure gets leaked as the core file driver doesn't have a way to determine when or if it needs to call the 'udata_free' callback. This has been fixed by freeing the udata structure when the 'image_free' callback gets made during file close, where the file is holding the last reference to the udata structure. * Fix allocating too much memory in dset API test (#4041) * Don't try to load general-19 warnings file for icc (#4042) The Autools Classic Intel compiler configuration attempts to load a file named `general-19` from the intel-warnings/classic directory, which does not exist. This removes the attempted load of the file. * Remove unused AIX cross-compile cache overrides (#4043) The ibm-aix Autotools config file had some unmaintained and unnecessary Autoconf cache overrides. These have been removed. * Consolidate Autotools linux files (#4044) There are many architecture-specific linux files in the config directory, all of which simply redirect to linux-gnulibc1. This change renames linux-gnulibc1 to linux-gnu and deletes the more specific files. * Remove check for gettimeofday + tz in CMake (#4045) This is not used in the library * Remove limitations on preset generators (#4051) * Fix issue with FAPL file locking setting inheriting test (#4053) Fixes an issue where the HDF5_USE_FILE_LOCKING environment variable being set can interfere with the file locking setting that the test expects to be returned. * Bump the github-actions group with 2 updates (#4054) Bumps the github-actions group with 2 updates: [actions/download-artifact](https://github.com/actions/download-artifact) and [github/codeql-action](https://github.com/github/codeql-action). * Fix VOL-compatibility issues in External Link API test (#4039) Fix link API tests with incorrect filename * Add upddated cmake tools from source location (#4040) * Add options to allow tools type selection and naming (#4046) * Improve error messages when tools attempt to use non-enabled S3 and HDFS VFDs. (#4047) * Correct several 1.15/1.15.0 references to 1.14/1.14.4. * Ignore HDF5Examples/CMakeUserPresets.json
Diffstat (limited to 'tools/src/h5ls')
-rw-r--r--tools/src/h5ls/CMakeLists.txt38
-rw-r--r--tools/src/h5ls/h5ls.c7
2 files changed, 17 insertions, 28 deletions
diff --git a/tools/src/h5ls/CMakeLists.txt b/tools/src/h5ls/CMakeLists.txt
index 67122a1..f8f7fff 100644
--- a/tools/src/h5ls/CMakeLists.txt
+++ b/tools/src/h5ls/CMakeLists.txt
@@ -4,41 +4,27 @@ project (HDF5_TOOLS_SRC_H5LS C)
#-----------------------------------------------------------------------------
# Add the h5ls executable
#-----------------------------------------------------------------------------
-if (BUILD_STATIC_LIBS)
- add_executable (h5ls ${HDF5_TOOLS_SRC_H5LS_SOURCE_DIR}/h5ls.c)
- target_include_directories (h5ls PRIVATE "${HDF5_TOOLS_ROOT_DIR}/lib;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- target_compile_options(h5ls PRIVATE "${HDF5_CMAKE_C_FLAGS}")
- #target_compile_definitions(h5ls PRIVATE H5_TOOLS_DEBUG)
+add_executable (h5ls ${HDF5_TOOLS_SRC_H5LS_SOURCE_DIR}/h5ls.c)
+target_include_directories (h5ls PRIVATE "${HDF5_TOOLS_ROOT_DIR}/lib;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+target_compile_options(h5ls PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+#target_compile_definitions(h5ls PRIVATE H5_TOOLS_DEBUG)
+if (HDF5_BUILD_STATIC_TOOLS)
TARGET_C_PROPERTIES (h5ls STATIC)
target_link_libraries (h5ls PRIVATE ${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)
+else ()
+ TARGET_C_PROPERTIES (h5ls SHARED)
+ target_link_libraries (h5ls PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
endif ()
+set_target_properties (h5ls PROPERTIES FOLDER tools)
+set_global_variable (HDF5_UTILS_TO_EXPORT "${HDF5_UTILS_TO_EXPORT};h5ls")
-if (BUILD_SHARED_LIBS)
- add_executable (h5ls-shared ${HDF5_TOOLS_SRC_H5LS_SOURCE_DIR}/h5ls.c)
- target_include_directories (h5ls-shared PRIVATE "${HDF5_TOOLS_ROOT_DIR}/lib;${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
- target_compile_options(h5ls-shared PRIVATE "${HDF5_CMAKE_C_FLAGS}")
- #target_compile_definitions(h5ls-shared PRIVATE H5_TOOLS_DEBUG)
- TARGET_C_PROPERTIES (h5ls-shared SHARED)
- target_link_libraries (h5ls-shared PRIVATE ${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 ()
+set (H5_DEP_EXECUTABLES h5ls)
#-----------------------------------------------------------------------------
# Add Target to clang-format
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_FORMATTERS)
- if (BUILD_STATIC_LIBS)
- clang_format (HDF5_H5LS_SRC_FORMAT h5ls)
- else ()
- clang_format (HDF5_H5LS_SRC_FORMAT h5ls-shared)
- endif ()
+ clang_format (HDF5_H5LS_SRC_FORMAT h5ls)
endif ()
##############################################################################
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 04c5ff3..b3488d5 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -2858,7 +2858,8 @@ main(int argc, char *argv[])
vfd_info.info = &ros3_fa;
#else
- fprintf(rawerrorstream, "Error: Read-Only S3 VFD is not enabled\n\n");
+ fprintf(rawerrorstream, "Error: Read-Only S3 VFD is not available unless enabled when HDF5 is "
+ "configured and built.\n\n");
usage();
leave(EXIT_FAILURE);
#endif
@@ -2881,7 +2882,9 @@ main(int argc, char *argv[])
vfd_info.info = &hdfs_fa;
#else
- fprintf(rawerrorstream, "Error: The HDFS VFD is not enabled\n\n");
+ fprintf(
+ rawerrorstream,
+ "Error: The HDFS VFD is not available unless enabled when HDF5 is configured and built.\n\n");
usage();
leave(EXIT_FAILURE);
#endif