Skip to content

Commit

Permalink
Merge pull request #619 from derobins/vfd_swmr/thg_standards
Browse files Browse the repository at this point in the history
More code from develop
  • Loading branch information
derobins authored May 3, 2021
2 parents 383be26 + fca509b commit 51fbbac
Show file tree
Hide file tree
Showing 75 changed files with 1,202 additions and 1,030 deletions.
3 changes: 1 addition & 2 deletions CMakeInstallation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
set (release_files
${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_CMake.txt
${HDF5_SOURCE_DIR}/release_docs/COPYING
${HDF5_SOURCE_DIR}/release_docs/RELEASE.txt
)
if (WIN32)
Expand Down Expand Up @@ -263,9 +262,9 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
set (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}")
set (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}")
set (CPACK_PACKAGE_VERSION_PATCH "")
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
if (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
endif ()
set (CPACK_PACKAGE_RELOCATABLE TRUE)
Expand Down
20 changes: 18 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,14 @@ else ()
set (tgt_file_ext "-shared")
endif ()

#-----------------------------------------------------------------------------
# perl is used in some optional src and tests, check availability
find_package (Perl)
if (PERL_FOUND)
set (H5_PERL_FOUND YES)
endif ()
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
# Option to Build Static executables
#-----------------------------------------------------------------------------
Expand All @@ -517,12 +525,18 @@ if (BUILD_STATIC_EXECS)
endif ()
endif ()

option (HDF5_ENABLE_ANALYZER_TOOLS "enable the use of Clang tools" OFF)
mark_as_advanced (HDF5_ENABLE_ANALYZER_TOOLS)
if (HDF5_ENABLE_ANALYZER_TOOLS)
include (${HDF5_SOURCE_DIR}/config/sanitizer/tools.cmake)
endif ()
option (HDF5_ENABLE_SANITIZERS "execute the Clang sanitizer" OFF)
mark_as_advanced (HDF5_ENABLE_SANITIZERS)
if (HDF5_ENABLE_SANITIZERS)
include (${HDF5_SOURCE_DIR}/config/sanitizer/sanitizers.cmake)
endif ()
option (HDF5_ENABLE_FORMATTERS "format source files" OFF)
mark_as_advanced (HDF5_ENABLE_FORMATTERS)
if (HDF5_ENABLE_FORMATTERS)
include (${HDF5_SOURCE_DIR}/config/sanitizer/formatting.cmake)
endif ()
Expand Down Expand Up @@ -1029,7 +1043,9 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
if (HDF5_BUILD_FORTRAN)
include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake)

message (STATUS "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
message (VERBOSE "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}")
endif ()
include (${HDF_RESOURCES_DIR}/HDFFortranCompilerFlags.cmake)
include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake)
set (LINK_Fortran_LIBS ${LINK_LIBS})
Expand Down Expand Up @@ -1071,7 +1087,7 @@ endif ()
# Option to build HDF5 C++ Library
#-----------------------------------------------------------------------------
if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
option (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" ON)
option (HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" OFF)
if (HDF5_BUILD_CPP_LIB)
# check for unsupported options
if (HDF5_ENABLE_PARALLEL)
Expand Down
6 changes: 5 additions & 1 deletion c++/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@ install (
)

if (NOT WIN32 AND NOT MINGW)
set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
if (HDF5_ENABLE_PARALLEL AND MPI_CXX_FOUND)
set (_PKG_CONFIG_COMPILER ${MPI_CXX_COMPILER})
else ()
set (_PKG_CONFIG_COMPILER ${CMAKE_CXX_COMPILER})
endif ()
configure_file (
${HDF_RESOURCES_DIR}/libh5cc.in
${HDF5_BINARY_DIR}/CMakeFiles/h5c++
Expand Down
6 changes: 3 additions & 3 deletions c++/src/H5ArrayType.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class H5_DLLCPP ArrayType : public DataType {

// Returns an ArrayType object via DataType* by decoding the
// binary object description of this type.
virtual DataType *decode() const;
virtual DataType *decode() const H5_OVERRIDE;

// Returns the number of dimensions of this array datatype.
int getArrayNDims() const;
Expand All @@ -49,7 +49,7 @@ class H5_DLLCPP ArrayType : public DataType {

///\brief Returns this class name.
virtual H5std_string
fromClass() const
fromClass() const H5_OVERRIDE
{
return ("ArrayType");
}
Expand All @@ -61,7 +61,7 @@ class H5_DLLCPP ArrayType : public DataType {
ArrayType(const hid_t existing_id);

// Noop destructor
virtual ~ArrayType();
virtual ~ArrayType() H5_OVERRIDE;

// Default constructor
ArrayType();
Expand Down
4 changes: 2 additions & 2 deletions c++/src/H5AtomType.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class H5_DLLCPP AtomType : public DataType {

///\brief Returns this class name.
virtual H5std_string
fromClass() const
fromClass() const H5_OVERRIDE
{
return ("AtomType");
}
Expand All @@ -68,7 +68,7 @@ class H5_DLLCPP AtomType : public DataType {
AtomType(const AtomType &original);

// Noop destructor
virtual ~AtomType();
virtual ~AtomType() H5_OVERRIDE;
#endif // DOXYGEN_SHOULD_SKIP_THIS

protected:
Expand Down
18 changes: 9 additions & 9 deletions c++/src/H5Attribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
Attribute(const hid_t attr_id);

// Closes this attribute.
virtual void close();
virtual void close() H5_OVERRIDE;

// Gets the name of this attribute.
ssize_t getName(char *attr_name, size_t buf_size = 0) const;
Expand All @@ -50,13 +50,13 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
ssize_t getName(size_t buf_size, H5std_string &attr_name) const;

// Gets a copy of the dataspace for this attribute.
virtual DataSpace getSpace() const;
virtual DataSpace getSpace() const H5_OVERRIDE;

// Returns the amount of storage size required for this attribute.
virtual hsize_t getStorageSize() const;
virtual hsize_t getStorageSize() const H5_OVERRIDE;

// Returns the in memory size of this attribute's data.
virtual size_t getInMemDataSize() const;
virtual size_t getInMemDataSize() const H5_OVERRIDE;

// Reads data from this attribute.
void read(const DataType &mem_type, void *buf) const;
Expand All @@ -68,21 +68,21 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {

///\brief Returns this class name.
virtual H5std_string
fromClass() const
fromClass() const H5_OVERRIDE
{
return ("Attribute");
}

// Gets the attribute id.
virtual hid_t getId() const;
virtual hid_t getId() const H5_OVERRIDE;

// Destructor: properly terminates access to this attribute.
virtual ~Attribute();
virtual ~Attribute() H5_OVERRIDE;

#ifndef DOXYGEN_SHOULD_SKIP_THIS
protected:
// Sets the attribute id.
virtual void p_setId(const hid_t new_id);
virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
#endif // DOXYGEN_SHOULD_SKIP_THIS

private:
Expand All @@ -92,7 +92,7 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
// getTypeClass and various API functions getXxxType
// defined in AbstractDs for generic datatype and specific
// sub-types
virtual hid_t p_get_type() const;
virtual hid_t p_get_type() const H5_OVERRIDE;

// Reads variable or fixed len strings from this attribute.
void p_read_variable_len(const DataType &mem_type, H5std_string &strg) const;
Expand Down
6 changes: 3 additions & 3 deletions c++/src/H5CompType.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class H5_DLLCPP CompType : public DataType {

// Returns a CompType object via DataType* by decoding the binary
// object description of this type.
virtual DataType *decode() const;
virtual DataType *decode() const H5_OVERRIDE;

// Returns the type class of the specified member of this compound
// datatype. It provides to the user a way of knowing what type
Expand Down Expand Up @@ -108,13 +108,13 @@ class H5_DLLCPP CompType : public DataType {

///\brief Returns this class name.
virtual H5std_string
fromClass() const
fromClass() const H5_OVERRIDE
{
return ("CompType");
}

// Noop destructor.
virtual ~CompType();
virtual ~CompType() H5_OVERRIDE;

private:
// Contains common code that is used by the member functions
Expand Down
4 changes: 2 additions & 2 deletions c++/src/H5DaccProp.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class H5_DLLCPP DSetAccPropList : public LinkAccPropList {

///\brief Returns this class name.
virtual H5std_string
fromClass() const
fromClass() const H5_OVERRIDE
{
return ("DSetAccPropList");
}
Expand All @@ -51,7 +51,7 @@ class H5_DLLCPP DSetAccPropList : public LinkAccPropList {
DSetAccPropList(const hid_t plist_id);

// Noop destructor.
virtual ~DSetAccPropList();
virtual ~DSetAccPropList() H5_OVERRIDE;

#ifndef DOXYGEN_SHOULD_SKIP_THIS

Expand Down
18 changes: 9 additions & 9 deletions c++/src/H5DataSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace H5 {
class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
public:
// Close this dataset.
virtual void close();
virtual void close() H5_OVERRIDE;

// Extends the dataset with unlimited dimension.
void extend(const hsize_t *size) const;
Expand All @@ -53,16 +53,16 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
haddr_t getOffset() const;

// Gets the dataspace of this dataset.
virtual DataSpace getSpace() const;
virtual DataSpace getSpace() const H5_OVERRIDE;

// Determines whether space has been allocated for a dataset.
void getSpaceStatus(H5D_space_status_t &status) const;

// Returns the amount of storage size required for this dataset.
virtual hsize_t getStorageSize() const;
virtual hsize_t getStorageSize() const H5_OVERRIDE;

// Returns the in memory size of this attribute's data.
virtual size_t getInMemDataSize() const;
virtual size_t getInMemDataSize() const H5_OVERRIDE;

// Returns the number of bytes required to store VL data.
hsize_t getVlenBufSize(const DataType &type, const DataSpace &space) const;
Expand Down Expand Up @@ -100,7 +100,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {

///\brief Returns this class name.
virtual H5std_string
fromClass() const
fromClass() const H5_OVERRIDE
{
return ("DataSet");
}
Expand All @@ -121,15 +121,15 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
DataSet(const hid_t existing_id);

// Gets the dataset id.
virtual hid_t getId() const;
virtual hid_t getId() const H5_OVERRIDE;

// Destructor: properly terminates access to this dataset.
virtual ~DataSet();
virtual ~DataSet() H5_OVERRIDE;

protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Sets the dataset id.
virtual void p_setId(const hid_t new_id);
virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
#endif // DOXYGEN_SHOULD_SKIP_THIS

private:
Expand All @@ -139,7 +139,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
// getTypeClass and various API functions getXxxType
// defined in AbstractDs for generic datatype and specific
// sub-types
virtual hid_t p_get_type() const;
virtual hid_t p_get_type() const H5_OVERRIDE;

// Reads variable or fixed len strings from this dataset.
void p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id,
Expand Down
2 changes: 1 addition & 1 deletion c++/src/H5DataSpace.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class H5_DLLCPP DataSpace : public IdComponent {
static void deleteConstants();

// Destructor: properly terminates access to this dataspace.
virtual ~DataSpace();
virtual ~DataSpace() H5_OVERRIDE;

#ifndef DOXYGEN_SHOULD_SKIP_THIS

Expand Down
10 changes: 5 additions & 5 deletions c++/src/H5DataType.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class H5_DLLCPP DataType : public H5Object {
// PropList& plist = PropList::DEFAULT);

// Closes this datatype.
virtual void close();
virtual void close() H5_OVERRIDE;

// Copies an existing datatype to this datatype object.
void copy(const DataType &like_type);
Expand Down Expand Up @@ -133,7 +133,7 @@ class H5_DLLCPP DataType : public H5Object {

///\brief Returns this class name.
virtual H5std_string
fromClass() const
fromClass() const H5_OVERRIDE
{
return ("DataType");
}
Expand All @@ -148,10 +148,10 @@ class H5_DLLCPP DataType : public H5Object {
bool hasBinaryDesc() const;

// Gets the datatype id.
virtual hid_t getId() const;
virtual hid_t getId() const H5_OVERRIDE;

// Destructor: properly terminates access to this datatype.
virtual ~DataType();
virtual ~DataType() H5_OVERRIDE;

protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
Expand All @@ -162,7 +162,7 @@ class H5_DLLCPP DataType : public H5Object {
hid_t p_decode() const;

// Sets the datatype id.
virtual void p_setId(const hid_t new_id);
virtual void p_setId(const hid_t new_id) H5_OVERRIDE;

// Opens a datatype and returns the id.
hid_t p_opentype(const H5Location &loc, const char *dtype_name) const;
Expand Down
4 changes: 2 additions & 2 deletions c++/src/H5DcreatProp.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {

///\brief Returns this class name.
virtual H5std_string
fromClass() const
fromClass() const H5_OVERRIDE
{
return ("DSetCreatPropList");
}
Expand All @@ -141,7 +141,7 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {
DSetCreatPropList(const hid_t plist_id);

// Noop destructor.
virtual ~DSetCreatPropList();
virtual ~DSetCreatPropList() H5_OVERRIDE;

#ifndef DOXYGEN_SHOULD_SKIP_THIS

Expand Down
4 changes: 2 additions & 2 deletions c++/src/H5DxferProp.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {

///\brief Returns this class name.
virtual H5std_string
fromClass() const
fromClass() const H5_OVERRIDE
{
return ("DSetMemXferPropList");
}
Expand All @@ -113,7 +113,7 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
DSetMemXferPropList(const hid_t plist_id);

// Noop destructor
virtual ~DSetMemXferPropList();
virtual ~DSetMemXferPropList() H5_OVERRIDE;

#ifndef DOXYGEN_SHOULD_SKIP_THIS

Expand Down
Loading

0 comments on commit 51fbbac

Please sign in to comment.