summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/CMakeLists.txt4
-rw-r--r--c++/src/H5CppDoc.h8
-rw-r--r--c++/src/H5DataType.cpp2
-rw-r--r--c++/src/H5Exception.cpp2
-rw-r--r--c++/src/H5FaccProp.cpp47
-rw-r--r--c++/src/H5FaccProp.h6
-rw-r--r--c++/src/H5IntType.cpp2
-rw-r--r--c++/src/H5Location.cpp2
-rw-r--r--c++/src/H5Location.h2
-rw-r--r--c++/src/H5Object.h2
-rw-r--r--c++/src/Makefile.in94
-rw-r--r--c++/src/cpp_doc_config2
-rw-r--r--c++/src/h5c++.in2
13 files changed, 124 insertions, 51 deletions
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 2a92ed2..058f457 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_CPP_SRC CXX)
#-----------------------------------------------------------------------------
@@ -90,6 +90,7 @@ if (NOT ONLY_SHARED_LIBS)
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
+ target_compile_options(${HDF5_CPP_LIB_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
target_compile_definitions(${HDF5_CPP_LIB_TARGET}
PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings
)
@@ -107,6 +108,7 @@ if (BUILD_SHARED_LIBS)
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
+ target_compile_options(${HDF5_CPP_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
target_compile_definitions(${HDF5_CPP_LIBSH_TARGET}
PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
PRIVATE $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings
diff --git a/c++/src/H5CppDoc.h b/c++/src/H5CppDoc.h
index 5e80408..1108181 100644
--- a/c++/src/H5CppDoc.h
+++ b/c++/src/H5CppDoc.h
@@ -25,7 +25,7 @@
* \section intro_sec Introduction
*
* The C++ API provides C++ wrappers for the HDF5 C Library.
- *
+ *
* It is assumed that the user has knowledge of the HDF5 file format and its
* components. For more information on the HDF5 C Library, please refer to
* the HDF5 Software Documentation page.
@@ -54,9 +54,9 @@
* \section install_sec Installation
*
* The HDF5 C++ API is included with the HDF5 source code.
- *
- * Please refer to the release_docs/INSTALL file under the top directory
- * of the HDF5 source code for information about installing, building,
+ *
+ * Please refer to the release_docs/INSTALL file under the top directory
+ * of the HDF5 source code for information about installing, building,
* and testing the C++ API.
*
* <br />
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index 081cc03..0472975 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -122,7 +122,7 @@ DataType::DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type,
{
id = H5Location::p_dereference(attr.getId(), ref, ref_type, plist, "constructor - by dereference");
}
- */
+ */
//--------------------------------------------------------------------------
// Function: DataType copy constructor
diff --git a/c++/src/H5Exception.cpp b/c++/src/H5Exception.cpp
index cf9e577..7431e6c 100644
--- a/c++/src/H5Exception.cpp
+++ b/c++/src/H5Exception.cpp
@@ -60,7 +60,7 @@ H5std_string Exception::getMajorString(hid_t err_major) const
{
// Preliminary call to H5Eget_msg() to get the length of the message
ssize_t mesg_size = H5Eget_msg(err_major, NULL, NULL, 0);
-
+
// If H5Eget_msg() returns a negative value, raise an exception,
if (mesg_size < 0)
throw IdComponentException("Exception::getMajorString",
diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp
index 1657351..6128d65 100644
--- a/c++/src/H5FaccProp.cpp
+++ b/c++/src/H5FaccProp.cpp
@@ -685,6 +685,53 @@ unsigned FileAccPropList::getGcReferences() const
}
//--------------------------------------------------------------------------
+// Function: FileAccPropList::setFileLocking
+///\brief Sets file locking flags.
+///\param use_file_locking - IN: Flag that determines if file locks should
+// be used or not.
+///\param ignore_when_disabled - IN: Flag that determines if file locks
+// should be be used when disabled on the file system or not.
+///\exception H5::PropListIException
+///\par Description
+/// For information, please refer to the H5Pset_file_locking API in
+/// the HDF5 C Reference Manual.
+// Programmer Dana Robinson - 2020
+//--------------------------------------------------------------------------
+void FileAccPropList::setFileLocking(hbool_t use_file_locking, hbool_t ignore_when_disabled) const
+{
+ herr_t ret_value = H5Pset_file_locking(id, use_file_locking, ignore_when_disabled);
+
+ if (ret_value < 0)
+ {
+ throw PropListIException("FileAccPropList::setFileLocking", "H5Pset_file_locking failed");
+ }
+}
+
+//--------------------------------------------------------------------------
+// Function: FileAccPropList::getFileLocking
+///\brief Gets file locking flags.
+///\param use_file_locking - OUT: Flag that determines if file locks
+// should be used or not.
+///\param ignore_when_disabled - OUT: Flag that determines if file locks
+// should be be used when disabled on the file system or not.
+///\exception H5::PropListIException
+///\par Description
+/// For information, please refer to the H5Pget_file_locking API in
+/// the HDF5 C Reference Manual.
+// Programmer Dana Robinson - 2020
+//--------------------------------------------------------------------------
+void FileAccPropList::getFileLocking(hbool_t& use_file_locking, hbool_t& ignore_when_disabled) const
+{
+ herr_t ret_value = H5Pget_file_locking(id, &use_file_locking, &ignore_when_disabled);
+
+ if (ret_value < 0)
+ {
+ throw PropListIException("FileAccPropList::getFileLocking", "H5Pget_file_locking failed");
+ }
+}
+
+
+//--------------------------------------------------------------------------
// Function: FileAccPropList::setLibverBounds
///\brief Sets bounds on versions of library format to be used when creating
/// or writing objects.
diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h
index 58f049e..ee90fa4 100644
--- a/c++/src/H5FaccProp.h
+++ b/c++/src/H5FaccProp.h
@@ -126,6 +126,12 @@ class H5_DLLCPP FileAccPropList : public PropList {
// Returns garbage collecting references setting.
unsigned getGcReferences() const;
+ // Sets file locking parameters.
+ void setFileLocking(hbool_t use_file_locking, hbool_t ignore_when_disabled) const;
+
+ // Gets file locking parameters.
+ void getFileLocking(hbool_t& use_file_locking, hbool_t& ignore_when_disabled) const;
+
// Sets bounds on versions of library format to be used when creating
// or writing objects.
void setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_high) const;
diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp
index 49c638e..01c20e9 100644
--- a/c++/src/H5IntType.cpp
+++ b/c++/src/H5IntType.cpp
@@ -83,7 +83,7 @@ IntType::IntType(const DataSet& dataset) : AtomType()
{
// Calls C function H5Dget_type to get the id of the datatype
id = H5Dget_type(dataset.getId());
-
+
if (id < 0)
{
throw DataSetIException("IntType constructor", "H5Dget_type failed");
diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp
index 2641960..100c0b9 100644
--- a/c++/src/H5Location.cpp
+++ b/c++/src/H5Location.cpp
@@ -568,7 +568,7 @@ void H5Location::dereference(const H5Location& loc, const void* ref, H5R_type_t
{
p_setId(p_dereference(attr.getId(), ref, ref_type, plist, "dereference"));
}
- */
+ */
#ifndef H5_NO_DEPRECATED_SYMBOLS
//--------------------------------------------------------------------------
diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h
index dc3db75..c21cf06 100644
--- a/c++/src/H5Location.h
+++ b/c++/src/H5Location.h
@@ -72,7 +72,7 @@ class H5_DLLCPP H5Location : public IdComponent {
// Creates a reference to a named object or to a dataset region
// in this object.
- void reference(void* ref, const char* name,
+ void reference(void* ref, const char* name,
H5R_type_t ref_type = H5R_OBJECT) const;
void reference(void* ref, const H5std_string& name,
H5R_type_t ref_type = H5R_OBJECT) const;
diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h
index 4a4e909..d7b2b0b 100644
--- a/c++/src/H5Object.h
+++ b/c++/src/H5Object.h
@@ -31,7 +31,7 @@ namespace H5 {
H5Object is H5File is not an HDF5 object, and renaming H5Object
to H5Location will risk breaking user applications.
-BMR
- Apr 2, 2014: Added wrapper getObjName for H5Iget_name
+ Apr 2, 2014: Added wrapper getObjName for H5Iget_name
Sep 21, 2016: Rearranging classes (HDFFV-9920) moved H5A wrappers back
into H5Object. This way, C functions that takes attribute id
can be in H5Location and those that cannot take attribute id
diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in
index c7c217f..497fce8 100644
--- a/c++/src/Makefile.in
+++ b/c++/src/Makefile.in
@@ -430,14 +430,14 @@ AMTAR = @AMTAR@
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Include src directory
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_JAVACFLAGS = @AM_JAVACFLAGS@
@@ -457,6 +457,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -473,6 +474,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@
DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
@@ -509,8 +511,11 @@ H5_CFLAGS = @H5_CFLAGS@
H5_CLASSPATH = @H5_CLASSPATH@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_IS_DARWIN = @H5_IS_DARWIN@
H5_JAVACFLAGS = @H5_JAVACFLAGS@
H5_JAVAFLAGS = @H5_JAVAFLAGS@
H5_JNIFLAGS = @H5_JNIFLAGS@
@@ -533,6 +538,7 @@ HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
+IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -569,6 +575,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+MIRROR_VFD = @MIRROR_VFD@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -628,6 +635,7 @@ TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
+USE_FILE_LOCKING = @USE_FILE_LOCKING@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
@@ -663,6 +671,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -719,15 +728,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -747,30 +756,30 @@ TRACE = perl $(top_srcdir)/bin/trace
# .chklog files are output from those tests.
# *.clog and *.clog2 are from the MPE option.
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
-LT_VERS_INTERFACE = 105
+LT_VERS_INTERFACE = 106
LT_VERS_REVISION = 0
-LT_VERS_AGE = 2
-LT_CXX_VERS_INTERFACE = 105
+LT_VERS_AGE = 3
+LT_CXX_VERS_INTERFACE = 106
LT_CXX_VERS_REVISION = 0
-LT_CXX_VERS_AGE = 2
-LT_F_VERS_INTERFACE = 102
-LT_F_VERS_REVISION = 1
-LT_F_VERS_AGE = 0
+LT_CXX_VERS_AGE = 3
+LT_F_VERS_INTERFACE = 103
+LT_F_VERS_REVISION = 0
+LT_F_VERS_AGE = 1
LT_HL_VERS_INTERFACE = 101
-LT_HL_VERS_REVISION = 3
+LT_HL_VERS_REVISION = 4
LT_HL_VERS_AGE = 1
LT_HL_CXX_VERS_INTERFACE = 101
-LT_HL_CXX_VERS_REVISION = 4
+LT_HL_CXX_VERS_REVISION = 5
LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 100
-LT_HL_F_VERS_REVISION = 5
+LT_HL_F_VERS_REVISION = 6
LT_HL_F_VERS_AGE = 0
-LT_JAVA_VERS_INTERFACE = 104
-LT_JAVA_VERS_REVISION = 1
-LT_JAVA_VERS_AGE = 4
-LT_TOOLS_VERS_INTERFACE = 101
-LT_TOOLS_VERS_REVISION = 3
-LT_TOOLS_VERS_AGE = 1
+LT_JAVA_VERS_INTERFACE = 105
+LT_JAVA_VERS_REVISION = 0
+LT_JAVA_VERS_AGE = 5
+LT_TOOLS_VERS_INTERFACE = 102
+LT_TOOLS_VERS_REVISION = 0
+LT_TOOLS_VERS_AGE = 0
# This is our main target
lib_LTLIBRARIES = libhdf5_cpp.la
@@ -827,7 +836,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
@@ -1511,28 +1520,37 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
echo "============================" > $${log}; \
fi; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\
else \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\
fi; \
else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Testing: $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
fi; \
if test -n "$(REALTIMEOUTPUT)"; then \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \
+ fi; \
+ else \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
echo "============================" | tee -a $${log}; \
else \
echo "============================" >> $${log}; \
diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config
index e3a3d0e..8397a2f 100644
--- a/c++/src/cpp_doc_config
+++ b/c++/src/cpp_doc_config
@@ -38,7 +38,7 @@ PROJECT_NAME =
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = "1.10.6"
+PROJECT_NUMBER = "1.10.7"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in
index f068f51..5a542f9 100644
--- a/c++/src/h5c++.in
+++ b/c++/src/h5c++.in
@@ -311,7 +311,7 @@ fi
if test "x$do_link" = "xyes"; then
shared_link=""
- # conditionally link with the hl library
+ # conditionally link with the hl library
if test "X$HL" = "Xhl"; then
libraries=" $libraries -lhdf5_hl_cpp -lhdf5_cpp -lhdf5_hl -lhdf5 "
else