diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2018-03-09 22:57:54 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2018-03-09 22:57:54 (GMT) |
commit | a5d95ec0832d8b24e44277b3bdb90b21ea16ff2d (patch) | |
tree | ab4a705acd06c1df3aa6f54652804ce5ddb7e4f2 /src | |
parent | 3093cb5bbac5d91d16787f998346dc0270322597 (diff) | |
parent | 2a5d608f7bf5f99fb61898a331fde2ccc170117e (diff) | |
download | hdf5-a5d95ec0832d8b24e44277b3bdb90b21ea16ff2d.zip hdf5-a5d95ec0832d8b24e44277b3bdb90b21ea16ff2d.tar.gz hdf5-a5d95ec0832d8b24e44277b3bdb90b21ea16ff2d.tar.bz2 |
Merge branch 'develop' into hdf5_1_10_merge
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 48 | ||||
-rw-r--r-- | src/H5Fquery.c | 8 | ||||
-rw-r--r-- | src/H5Olayout.c | 42 |
3 files changed, 92 insertions, 6 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bf7fb07..d10870d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -991,3 +991,51 @@ if (HDF5_EXPORTED_TARGETS) INCLUDES DESTINATION include ) endif () + +#----------------------------------------------------------------------------- +# Create pkgconfig files +#----------------------------------------------------------------------------- +set (_PKG_CONFIG_PREFIX ${CMAKE_INSTALL_PREFIX}) +set (_PKG_CONFIG_EXEC_PREFIX \${prefix}) +set (_PKG_CONFIG_LIBDIR \${exec_prefix}/lib) +set (_PKG_CONFIG_INCLUDEDIR \${prefix}/include) +set (_PKG_CONFIG_LIBNAME "${HDF5_LIB_CORENAME}") +set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}") + +foreach (libs ${LINK_LIBS} ${LINK_COMP_LIBS}) + set (_PKG_CONFIG_LIBS_PRIVATE "${_PKG_CONFIG_LIBS_PRIVATE} -l${libs}") +endforeach () + +set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_LIB_CORENAME}") +if (BUILD_SHARED_LIBS) + set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_LIB_CORENAME}") +endif () + +set (_PKG_CONFIG_REQUIRES) +set (_PKG_CONFIG_REQUIRES_PRIVATE) + +configure_file ( + ${HDF_RESOURCES_DIR}/libhdf5.pc.in + ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc + @ONLY +) +install ( + FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc + DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig + COMPONENT libraries +) + +if (NOT WIN32) + set (_PKG_CONFIG_COMPILER ${CMAKE_C_COMPILER}) + configure_file ( + ${HDF_RESOURCES_DIR}/libh5cc.in + ${HDF5_BINARY_DIR}/CMakeFiles/h5cc + @ONLY + ) + install ( + FILES ${HDF5_BINARY_DIR}/CMakeFiles/h5cc + DESTINATION ${HDF5_INSTALL_BIN_DIR} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + COMPONENT libraries + ) +endif () diff --git a/src/H5Fquery.c b/src/H5Fquery.c index 6f4febc..f7e222e 100644 --- a/src/H5Fquery.c +++ b/src/H5Fquery.c @@ -740,12 +740,12 @@ H5F_gc_ref(const H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F_get_fc_degree + * Function: H5F_get_fc_degree * - * Purpose: Retrieve the 'file close degree' for the file. + * Purpose: Retrieve the 'file close degree' for the file. * - * Return: Success: Non-negative, the 'file close degree' - * Failure: (can't happen) + * Return: Success: Non-negative, the 'file close degree' + * Failure: (can't happen) *------------------------------------------------------------------------- */ H5F_close_degree_t diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 0994ef8..2c4c4ce 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -47,6 +47,8 @@ static herr_t H5O__layout_reset(void *_mesg); static herr_t H5O__layout_free(void *_mesg); static herr_t H5O__layout_delete(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, void *_mesg); +static herr_t H5O__layout_pre_copy_file(H5F_t *file_src, const void *mesg_src, + hbool_t *deleted, const H5O_copy_t *cpy_info, void *udata); static void *H5O__layout_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, hbool_t *recompute_size, unsigned *mesg_flags, H5O_copy_t *cpy_info, void *udata, hid_t dxpl_id); @@ -69,7 +71,7 @@ const H5O_msg_class_t H5O_MSG_LAYOUT[1] = {{ NULL, /* link method */ NULL, /* set share method */ NULL, /* can share method */ - NULL, /* pre copy native value to file */ + H5O__layout_pre_copy_file, /* pre copy native value to file */ H5O__layout_copy_file, /* copy native value to file */ NULL, /* post copy native value to file */ NULL, /* get creation index */ @@ -99,7 +101,7 @@ H5FL_DEFINE(H5O_layout_t); */ static void * H5O__layout_decode(H5F_t *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { H5O_layout_t *mesg = NULL; @@ -1057,6 +1059,42 @@ done: /*------------------------------------------------------------------------- + * Function: H5O__layout_pre_copy_file + * + * Purpose: Perform any necessary actions before copying message between + * files. + * + * Return: Success: Non-negative + * Failure: Negative + * + * Programmer: Vailin Choi; Dec 2017 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5O__layout_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, + hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata) +{ + const H5O_layout_t *layout_src = (const H5O_layout_t *)mesg_src; /* Source layout */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI_NOINIT + + /* check args */ + HDassert(cpy_info); + HDassert(cpy_info->file_dst); + + /* Check to ensure that the version of the message to be copied does not exceed + the message version allowed by the destination file's high bound */ + if(layout_src->version > H5O_layout_ver_bounds[H5F_HIGH_BOUND(cpy_info->file_dst)]) + HGOTO_ERROR(H5E_OHDR, H5E_BADRANGE, FAIL, "layout message version out of bounds") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5O__layout_pre_copy_file() */ + + +/*------------------------------------------------------------------------- * Function: H5O__layout_copy_file * * Purpose: Copies a message from _MESG to _DEST in file |