diff --git a/Modules/ThirdParty/HDF5/.gitattributes b/Modules/ThirdParty/HDF5/.gitattributes
index ee7e2c5c2fc..284abde7244 100644
--- a/Modules/ThirdParty/HDF5/.gitattributes
+++ b/Modules/ThirdParty/HDF5/.gitattributes
@@ -2,3 +2,7 @@ src/itkhdf5/src/H5C.c hooks-max-size=500000
src/itkhdf5/src/H5Dchunk.c hooks-max-size=500000
src/itkhdf5/src/H5Shyper.c hooks-max-size=600000
src/itkhdf5/src/H5Tconv.c hooks-max-size=500000
+src/itkhdf5/src/H5Ppublic.h hooks-max-size=500000
+src/H5Odtype.c no-lf-at-eof
+
+src/itkhdf5/src/itk_hdf5_mangle.h.in hooks-max-size=500000
diff --git a/Modules/ThirdParty/HDF5/CMakeLists.txt b/Modules/ThirdParty/HDF5/CMakeLists.txt
index dcaa2fa646c..1f118aa3701 100644
--- a/Modules/ThirdParty/HDF5/CMakeLists.txt
+++ b/Modules/ThirdParty/HDF5/CMakeLists.txt
@@ -7,17 +7,6 @@ set(ITKHDF5_THIRD_PARTY 1)
# modified before reaching this point)
set(BUILD_SHARED_LIBS ${ITK_BUILD_SHARED_LIBS})
-if (BUILD_SHARED_LIBS)
- add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB=1)
- set(ONLY_SHARED_LIBS ON CACHE INTERNAL "Only build shared")
-else()
- set(ONLY_SHARED_LIBS OFF CACHE INTERNAL "Only build static")
-endif()
-if(CMAKE_LINKER MATCHES "link.exe$")
- # Suppress undefined public symbols warning
- set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /IGNORE:4221")
-endif()
-
if(ITK_USE_SYSTEM_HDF5)
if(HDF5_DIR)
diff --git a/Modules/ThirdParty/HDF5/UpdateFromUpstream.sh b/Modules/ThirdParty/HDF5/UpdateFromUpstream.sh
index 6cd2c9f4b5f..e8589b30685 100755
--- a/Modules/ThirdParty/HDF5/UpdateFromUpstream.sh
+++ b/Modules/ThirdParty/HDF5/UpdateFromUpstream.sh
@@ -8,20 +8,21 @@ readonly name="HDF5"
readonly ownership="HDF5 Maintainers "
readonly subtree="Modules/ThirdParty/HDF5/src/itkhdf5"
readonly repo="https://github.com/HDFGroup/hdf5.git"
-readonly tag="hdf5-1_12_1"
+readonly tag="hdf5_1.14.5"
readonly shortlog=false
readonly paths="
ACKNOWLEDGMENTS
CTestConfig.cmake
- README.txt
+ README.md
config/cmake
- config/cmake_ext_mod
config/clang-warnings
config/gnu-warnings
config/intel-warnings
CMakeLists.txt
CMakeInstallation.cmake
CMakeFilters.cmake
+ CMakeVOL.cmake
+ CMakeTests.cmake
COPYING
src
c++/CMakeLists.txt
@@ -40,7 +41,7 @@ extract_source () {
sed -i.bak -e '1 s| /bin/sh|/bin/sh|' c++/src/h5c++.in config/cmake/libh5cc.in
rm c++/src/h5c++.in.bak config/cmake/libh5cc.in.bak
chmod a+x c++/src/h5c++.in config/cmake/libh5cc.in
- chmod a-x README.txt
+ chmod a-x README.md
chmod a-x config/cmake/CTestScript.cmake
chmod a-x config/cmake/HDF5_Examples_options.cmake
chmod a-x config/cmake/libhdf5.pc.in
@@ -62,6 +63,7 @@ extract_source () {
find . -name Makefile.am -delete
find . -name Makefile.in -delete
find . -name "*.lnt" -delete
+ find . -name "*.icns" -delete
echo "* -whitespace" > .gitattributes
popd
}
diff --git a/Modules/ThirdParty/HDF5/src/CMakeLists.txt b/Modules/ThirdParty/HDF5/src/CMakeLists.txt
index d8096039af8..a9b6300545f 100644
--- a/Modules/ThirdParty/HDF5/src/CMakeLists.txt
+++ b/Modules/ThirdParty/HDF5/src/CMakeLists.txt
@@ -5,7 +5,6 @@ set(HDF5_EXTERNALLY_CONFIGURED ON)
# can not be skipped for installation. Use the install COMPONENTS
# features instead.
set(HDF5_INSTALL_NO_DEVELOPMENT FALSE)
-set(HDF5_EXTERNAL_LIB_PREFIX "itk")
set(HDF5_EXPORTED_TARGETS ${ITKHDF5-targets})
set(HDF5_INSTALL_LIB_DIR ${ITKHDF5_INSTALL_LIBRARY_DIR})
set(HDF5_INSTALL_BIN_DIR ${ITKHDF5_INSTALL_RUNTIME_DIR})
@@ -16,29 +15,17 @@ set(HDF5_ALLOW_EXTERNAL_SUPPORT OFF CACHE INTERNAL "Allow External Library Build
set(HDF5_BUILD_CPP_LIB ON CACHE INTERNAL "Build HDF5 C++ Library")
set(HDF5_BUILD_HL_LIB ON CACHE INTERNAL "Build High Level HDF5 Library")
set(HDF5_DISABLE_COMPILER_WARNINGS OFF CACHE INTERNAL "Disable HDF5 warnings")
-set(HDF5_ENABLE_CODESTACK OFF CACHE INTERNAL "Enable the function stack tracing (for developer debugging).")
set(HDF5_ENABLE_COVERAGE OFF CACHE INTERNAL "Enable code coverage for Libraries and Programs")
set(HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE INTERNAL "Enable deprecated public API symbols")
-set(HDF5_ENABLE_GPFS OFF CACHE INTERNAL "Enable GPFS hints for the MPI/POSIX file driver")
-set(HDF5_ENABLE_HSIZET ON CACHE INTERNAL "Enable datasets larger than memory")
-set(HDF5_ENABLE_LARGE_FILE ON CACHE INTERNAL "Enable support for large (64-bit) files on Linux.")
set(HDF5_ENABLE_PARALLEL OFF CACHE INTERNAL "Enable parallel build (requires MPI)")
set(HDF5_ENABLE_SZIP_SUPPORT OFF CACHE INTERNAL "Use SZip Filter")
-set(HDF5_ENABLE_THREADSAFE ON CACHE INTERNAL "Enable Threadsafety")
+set(HDF5_ENABLE_THREADSAFE OFF CACHE INTERNAL "Enable Threadsafety")
set(HDF5_ENABLE_TRACE OFF CACHE INTERNAL "Enable API tracing capability")
set(HDF5_ENABLE_USING_MEMCHECKER OFF CACHE INTERNAL "Indicate that a memory checker is used")
set(HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE INTERNAL "Enable HDF5 Zlib Filters")
-set(HDF5_Enable_Clear_File_Buffers ON CACHE INTERNAL "Securely clear file buffers before writing to file")
set(HDF5_Enable_Instrument OFF CACHE INTERNAL "Instrument The library")
-set(HDF5_METADATA_TRACE_FILE OFF CACHE INTERNAL "Enable metadata trace file collection")
set(HDF5_PACKAGE_EXTLIBS OFF CACHE INTERNAL "CPACK - include external libraries")
set(HDF5_STRICT_FORMAT_CHECKS OFF CACHE INTERNAL "Whether to perform strict file format checks")
-set(HDF5_USE_16_API_DEFAULT OFF CACHE INTERNAL "Use the HDF5 1.6.x API by default")
-set(HDF5_USE_FILTER_FLETCHER32 ON CACHE INTERNAL "Use the FLETCHER32 Filter")
-set(HDF5_USE_FILTER_NBIT ON CACHE INTERNAL "Use the NBIT Filter")
-set(HDF5_USE_FILTER_SCALEOFFSET ON CACHE INTERNAL "Use the SCALEOFFSET Filter")
-set(HDF5_USE_FILTER_SHUFFLE ON CACHE INTERNAL "Use the SHUFFLE Filter")
-set(HDF5_USE_H5DUMP_PACKED_BITS ON CACHE INTERNAL "Use the PACKED BITS feature in h5dump")
set(HDF5_WANT_DATA_ACCURACY ON CACHE INTERNAL "IF data accuracy is guaranteed during data conversions")
set(HDF5_WANT_DCONV_EXCEPTION ON CACHE INTERNAL "exception handling functions is checked during data conversions")
set(HDF_LEGACY_NAMING ON CACHE INTERNAL "Use Legacy Names for Libraries and Programs")
@@ -46,15 +33,8 @@ set(HDF5_BUILD_FRAMEWORKS OFF CACHE INTERNAL "TRUE to build as frameworks librar
set(HDF5_BUILD_WITH_INSTALL_NAME OFF CACHE INTERNAL "Build with library install_name set to the installation path")
set(HDF5_ENABLE_ALL_WARNINGS OFF CACHE INTERNAL "Enable all warnings")
set(HDF5_ENABLE_DEBUG_APIS OFF CACHE INTERNAL "Turn on debugging in all packages")
-set(HDF5_ENABLE_DIRECT_VFD ON CACHE INTERNAL "Build the Direct I/O Virtual File Driver")
+set(HDF5_ENABLE_DIRECT_VFD OFF CACHE INTERNAL "Build the Direct I/O Virtual File Driver")
set(HDF5_ENABLE_EMBEDDED_LIBINFO ON CACHE INTERNAL "embed library info into executables")
-set(HDF5_ENABLE_GROUPFIVE_WARNINGS OFF CACHE INTERNAL "Enable group five warnings")
-set(HDF5_ENABLE_GROUPFOUR_WARNINGS OFF CACHE INTERNAL "Enable group four warnings")
-set(HDF5_ENABLE_GROUPONE_WARNINGS OFF CACHE INTERNAL "Enable group one warnings")
-set(HDF5_ENABLE_GROUPSIX_WARNINGS OFF CACHE INTERNAL "Enable group six warnings")
-set(HDF5_ENABLE_GROUPTHREE_WARNINGS OFF CACHE INTERNAL "Enable group three warnings")
-set(HDF5_ENABLE_GROUPTWO_WARNINGS OFF CACHE INTERNAL "Enable group two warnings")
-set(HDF5_ENABLE_GROUPZERO_WARNINGS OFF CACHE INTERNAL "Enable group zero warnings")
set(HDF5_GENERATE_HEADERS OFF CACHE INTERNAL "Rebuild Generated Files")
set(HDF5_PACK_EXAMPLES OFF CACHE INTERNAL "Package the HDF5 Library Examples Compressed File")
set(HDF5_NO_PACKAGES OFF CACHE INTERNAL "CPACK - Disable packaging")
@@ -64,17 +44,46 @@ set(HDF_TEST_EXPRESS OFF CACHE INTERNAL "Control testing framework (0-3)")
set(BUILD_STATIC_EXECS OFF CACHE INTERNAL "Build Static Executables")
set(BUILD_USER_DEFINED_LIBS OFF CACHE INTERNAL "Build user defined libs")
+set (SZIP_USE_EXTERNAL OFF CACHE INTERNAL "Use External Library Building for SZIP" )
+set (ZLIB_USE_EXTERNAL OFF CACHE INTERNAL "Use External Library Building for ZLIB" )
+set (HDF5_DIMENSION_SCALES_NEW_REF OFF CACHE INTERNAL "Use new-style references with dimension scale APIs" )
+set (HDF5_EXTERNAL_LIB_PREFIX "itk" CACHE INTERNAL "Use prefix for custom library naming.")
+set (HDF5_LIB_INFIX "" CACHE INTERNAL "Use infix for custom library naming.")
+set (HDF5_USE_GNU_DIRS OFF CACHE INTERNAL "TRUE to use GNU Coding Standard install directory variables, FALSE to use historical settings")
+set (HDF5_TEST_SERIAL OFF CACHE INTERNAL "Execute non-parallel tests" )
+
+set (HDF5_BUILD_DOC OFF CACHE INTERNAL "Build documentation")
+set (HDF5_ENABLE_MAP_API OFF CACHE INTERNAL "Build the map API")
+set (HDF5_ENABLE_WARNINGS_AS_ERRORS OFF CACHE INTERNAL "Interpret some warnings as errors")
+set (HDF5_MINGW_STATIC_GCC_LIBS OFF CACHE INTERNAL "")
+set (HDF5_MSVC_NAMING_CONVENTION OFF CACHE INTERNAL "Use MSVC Naming conventions for Shared Libraries")
+set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE INTERNAL "Enable PLUGIN Filters")
+
+set (HDF5_BUILD_STATIC_TOOLS OFF CACHE INTERNAL "Build Static Tools NOT Shared Tools")
+set (HDF5_ENABLE_MAP_API OFF CACHE INTERNAL "Build the map API")
+set (HDF5_ENABLE_NONSTANDARD_FEATURES ON CACHE INTERNAL "Enable support for non-standard programming language features")
+set (HDF5_ENABLE_SUBFILING_VFD OFF CACHE INTERNAL "Build Parallel HDF5 Subfiling VFD")
+set (HDF5_USE_LIBAEC_STATIC OFF CACHE INTERNAL "Use static AEC library" )
+set (HDF5_USE_ZLIB_NG OFF CACHE INTERNAL "Use zlib-ng library as zlib library" )
+set (HDF5_USE_ZLIB_STATIC OFF CACHE INTERNAL "Find static zlib library" )
+set (ALLOW_UNSUPPORTED OFF CACHE INTERNAL "Allow unsupported combinations of configure options")
+
+
+if (NOT BUILD_SHARED_LIBS)
+ set (BUILD_STATIC_LIBS ON CACHE INTERNAL "Build Static Libraries")
+endif()
+
# Setup all necessary overrides for zlib so that HDF5 uses our
# internally compiled zlib rather than any other version
if(HDF5_ENABLE_Z_LIB_SUPPORT)
# We must tell the main HDF5 library that it depends on our zlib
- set(ZLIB_INCLUDE_DIRS "${ITKZLIB_INCLUDE_DIRS}")
- set(ZLIB_LIBRARIES "${ITKZLIB_LIBRARIES}")
- if(BUILD_SHARED_LIBS)
- set(ZLIB_SHARED_LIBRARY ${ITKZLIB_LIBRARIES})
- endif()
- set(ZLIB_STATIC_LIBRARY ${ITKZLIB_LIBRARIES})
+ # see src/itkhdf5/CMakeLists.txt for detauls
+ set(H5_ZLIB_INCLUDE_DIRS "${ITKZLIB_INCLUDE_DIRS}")
+ set(H5_ZLIB_LIBRARIES "${ITKZLIB_LIBRARIES}")
+ set(HDF5_LIB_DEPENDENCIES ${ITKZLIB_LIBRARIES})
set(H5_ZLIB_HEADER "itk_zlib.h")
+
+ set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${H5_ZLIB_LIBRARIES})
endif()
add_subdirectory(itkhdf5)
@@ -91,7 +100,6 @@ mark_as_advanced(HDF5_USE_18_API_DEFAULT)
mark_as_advanced(HDF5_USE_FILE_LOCKING)
mark_as_advanced(HDF5_USE_PREGEN)
mark_as_advanced(USE_LIBAEC)
-unset(ALLOW_UNSUPPORTED CACHE)
if(BUILD_SHARED_LIBS)
set(target_extension -shared)
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/.clang-format b/Modules/ThirdParty/HDF5/src/itkhdf5/.clang-format
index 62dc6b584b2..59a9bd479ae 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/.clang-format
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/.clang-format
@@ -1,7 +1,20 @@
---
-Language: Cpp
BasedOnStyle: LLVM
AlignConsecutiveAssignments: true
+BraceWrapping:
+ AfterFunction: true
+ #llvm10-11: AfterControlStatement: false - Never
+ BeforeCatch: true
+ BeforeElse: true
+ #llvm11: BeforeLambdaBody: false
+ #llvm11: BeforeWhile: false
+BreakBeforeBraces: Stroustrup
+BreakAfterJavaFieldAnnotations: true
+BreakStringLiterals: true
+ColumnLimit: 110
+IndentWidth: 4
+---
+Language: Cpp
#llvm11: AlignConsecutiveBitFields: false
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true
@@ -22,17 +35,6 @@ AlwaysBreakAfterReturnType: AllDefinitions
# - H5_ATTR_CONST
# - H5_ATTR_PURE
# - H5_ATTR_FALLTHROUGH
-BraceWrapping:
- AfterFunction: true
- #llvm10-11: AfterControlStatement: false - Never
- BeforeCatch: true
- BeforeElse: true
- #llvm11: BeforeLambdaBody: false
- #llvm11: BeforeWhile: false
-BreakBeforeBraces: Stroustrup
-BreakAfterJavaFieldAnnotations: true
-BreakStringLiterals: true
-ColumnLimit: 110 # Update $max_trace_macro_line_len in bin/trace also
ForEachMacros: ['ALL_MEMBERS', 'UNIQUE_MEMBERS']
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
@@ -55,7 +57,6 @@ IndentCaseLabels: true
#llvm11: IndentCaseBlocks: false
IndentGotoLabels: false
#llvm11: IndentExternBlock: AfterExternBlock
-IndentWidth: 4
#llvm11: InsertTrailingCommas: None
MacroBlockBegin: "^BEGIN_FUNC"
MacroBlockEnd: "^END_FUNC"
@@ -64,33 +65,45 @@ ObjCBlockIndentWidth: 4
ReflowComments: true
SortIncludes: false
StatementMacros:
+ - CATCH
+ - END_MEMBERS
- FUNC_ENTER_API
- - FUNC_LEAVE_API
+ - FUNC_ENTER_API_NAMECHECK_ONLY
+ - FUNC_ENTER_NOAPI
+ - FUNC_ENTER_NOAPI_NOERR
+ - FUNC_ENTER_NOAPI_NOINIT
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ - FUNC_ENTER_PACKAGE
+ - FUNC_LEAVE_API
+ - FUNC_LEAVE_API_NAMECHECK_ONLY
- FUNC_LEAVE_NOAPI
+ - FUNC_LEAVE_NOAPI_NOFS
+ - H5E_END_TRY
+ - H5E_PRINTF
+ - H5E_THROW
- H5_BEGIN_TAG
- - HGOTO_DONE_TAG
- H5_END_TAG
- - HSYS_DONE_ERROR
- - HSYS_GOTO_ERROR
- - HDONE_ERROR
- - HERROR
+ - H5_GCC_DIAG_OFF
+ - H5_GCC_DIAG_ON
+ - H5_CLANG_DIAG_OFF
+ - H5_CLANG_DIAG_ON
+ - H5_GCC_CLANG_DIAG_OFF
+ - H5_GCC_CLANG_DIAG_ON
- H5_LEAVE
- - H5E_PRINTF
- - H5E_THROW
- HGOTO_DONE
- - HGOTO_ERROR
- - HMPI_ERROR
- HMPI_DONE_ERROR
+ - HMPI_ERROR
- HMPI_GOTO_ERROR
- - H5_GCC_DIAG_OFF
- - H5_GCC_DIAG_ON
- - CATCH
+ - HSYS_DONE_ERROR
+ - HSYS_GOTO_ERROR
#llvm10: TypenameMacros:
#llvm10: - STACK_OF
#llvm10: - LIST
#llvm11: WhitespaceSensitiveMacros:
#llvm11: - STRINGIZE
#llvm11: - PP_STRINGIZE
+---
+Language: Java
+BreakAfterJavaFieldAnnotations: true
+JavaImportGroups: ['java', 'hdf', 'hdf.hdf5lib', 'org']
...
-
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeFilters.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeFilters.cmake
index 06ec22c25cb..52d65e59e47 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeFilters.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeFilters.cmake
@@ -9,166 +9,182 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-if (FALSE) # XXX(kitware): avoid this showing up in VTK's cache file
-option (USE_LIBAEC "Use AEC library as SZip Filter" OFF)
+option (HDF5_USE_ZLIB_NG "Use zlib-ng library as zlib library" OFF)
+option (HDF5_USE_ZLIB_STATIC "Find static zlib library" OFF)
+option (HDF5_USE_LIBAEC_STATIC "Find static AEC library" OFF)
+option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" OFF)
+option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" OFF)
+
+if (NOT ZLIB_USE_LOCALCONTENT)
+ if (HDF5_USE_ZLIB_NG)
+ set (ZLIB_URL ${ZLIBNG_TGZ_ORIGPATH}/${ZLIBNG_TGZ_NAME})
+ else ()
+ set (ZLIB_URL ${ZLIB_TGZ_ORIGPATH}/${ZLIB_TGZ_NAME})
+ endif ()
else ()
-set (USE_LIBAEC OFF)
+ if (HDF5_USE_ZLIB_NG)
+ set (ZLIB_URL ${TGZPATH}/${ZLIBNG_TGZ_NAME})
+ else ()
+ set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
+ endif ()
endif ()
+message (VERBOSE "Filter ZLIB file is ${ZLIB_URL}")
-if (FALSE) # XXX(kitware): Hardcode settings.
-include (ExternalProject)
-include (FetchContent)
+if (NOT LIBAEC_USE_LOCALCONTENT)
+ set (SZIP_URL ${LIBAEC_TGZ_ORIGPATH}/${LIBAEC_TGZ_NAME})
+else ()
+ set (SZIP_URL ${TGZPATH}/${LIBAEC_TGZ_NAME})
+endif ()
+message (VERBOSE "Filter SZIP file is ${SZIP_URL}")
+include (ExternalProject)
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO")
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)")
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
-else ()
-set(HDF5_ALLOW_EXTERNAL_SUPPORT NO)
-endif ()
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1)
- option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1)
+ set (ZLIB_USE_EXTERNAL ON CACHE BOOL "Use External Library Building for ZLIB else search" FORCE)
+ set (SZIP_USE_EXTERNAL ON CACHE BOOL "Use External Library Building for SZIP else search" FORCE)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
set (ZLIB_URL ${ZLIB_GIT_URL} CACHE STRING "Path to zlib git repository")
set (ZLIB_BRANCH ${ZLIB_GIT_BRANCH})
- set (SZIP_URL ${SZIP_GIT_URL} CACHE STRING "Path to szip git repository")
- set (SZIP_BRANCH ${SZIP_GIT_BRANCH})
+ set (SZIP_URL ${LIBAEC_GIT_URL} CACHE STRING "Path to szip git repository")
+ set (SZIP_BRANCH ${LIBAEC_GIT_BRANCH})
elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
if (NOT TGZPATH)
set (TGZPATH ${HDF5_SOURCE_DIR})
endif ()
- set (ZLIB_URL ${TGZPATH}/${ZLIB_TGZ_NAME})
- if (NOT EXISTS "${ZLIB_URL}")
- set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ if (ZLIB_USE_LOCALCONTENT)
+ if (NOT EXISTS "${ZLIB_URL}")
+ set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE)
message (VERBOSE "Filter ZLIB file ${ZLIB_URL} not found")
endif ()
endif ()
- set (SZIP_URL ${TGZPATH}/${SZIP_TGZ_NAME})
- if (USE_LIBAEC)
- set (SZIP_URL ${TGZPATH}/${SZAEC_TGZ_NAME})
- endif ()
- if (NOT EXISTS "${SZIP_URL}")
- set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ if (LIBAEC_USE_LOCALCONTENT)
+ if (NOT EXISTS "${SZIP_URL}")
+ set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE)
message (VERBOSE "Filter SZIP file ${SZIP_URL} not found")
endif ()
endif ()
else ()
- set (ZLIB_USE_EXTERNAL 0)
- set (SZIP_USE_EXTERNAL 0)
+ set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE)
+ set (ZLIB_USE_EXTERNAL OFF CACHE BOOL "Use External Library Building for ZLIB else search")
+ set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE)
+ set (SZIP_USE_EXTERNAL OFF CACHE BOOL "Use External Library Building for SZIP else search")
endif ()
endif ()
#-----------------------------------------------------------------------------
# Option for ZLib support
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
-option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF)
-else ()
-set(HDF5_ENABLE_Z_LIB_SUPPORT ON)
-endif ()
+set(H5_ZLIB_FOUND FALSE)
+option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" ON)
if (HDF5_ENABLE_Z_LIB_SUPPORT)
if (NOT H5_ZLIB_HEADER)
if (NOT ZLIB_USE_EXTERNAL)
- find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
+ if (HDF5_USE_ZLIB_NG)
+ set (PACKAGE_NAME ${ZLIBNG_PACKAGE_NAME}${HDF_PACKAGE_EXT})
+ else ()
+ set (PACKAGE_NAME ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT})
+ endif ()
+ set(ZLIB_FOUND FALSE)
+ if (HDF5_USE_ZLIB_STATIC)
+ set(ZLIB_SEACH_TYPE static)
+ else ()
+ set(ZLIB_SEACH_TYPE shared)
+ endif ()
+ find_package (ZLIB NAMES ${PACKAGE_NAME} COMPONENTS ${ZLIB_SEACH_TYPE})
if (NOT ZLIB_FOUND)
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
+ set(ZLIB_USE_STATIC_LIBS ${HDF5_USE_ZLIB_STATIC})
+ endif()
find_package (ZLIB) # Legacy find
- if (ZLIB_FOUND)
- set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_LIBRARIES})
- endif ()
endif ()
- endif ()
- if (ZLIB_FOUND)
- set (H5_HAVE_FILTER_DEFLATE 1)
- set (H5_HAVE_ZLIB_H 1)
- set (H5_HAVE_LIBZ 1)
- set (H5_ZLIB_HEADER "zlib.h")
- set (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR})
- set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
+ set(H5_ZLIB_FOUND ${ZLIB_FOUND})
+ if (H5_ZLIB_FOUND)
+ set (H5_ZLIB_HEADER "zlib.h")
+ set (H5_ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR})
+ set (H5_ZLIB_INCLUDE_DIRS ${H5_ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
+ # The FindZLIB.cmake module does not set an OUTPUT_NAME
+ # on the target. The target returned is: ZLIB::ZLIB
+ get_filename_component (libname ${ZLIB_LIBRARIES} NAME_WLE)
+ string (REGEX REPLACE "^lib" "" libname ${libname})
+ set_target_properties (ZLIB::ZLIB PROPERTIES OUTPUT_NAME zlib-static)
+ set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ZLIB::ZLIB)
+ endif ()
else ()
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
- set (H5_HAVE_FILTER_DEFLATE 1)
- set (H5_HAVE_ZLIB_H 1)
- set (H5_HAVE_LIBZ 1)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Filter ZLIB is built")
- endif ()
- else ()
- message (FATAL_ERROR " ZLib is Required for ZLib support in HDF5")
+ message (VERBOSE "Filter HDF5_ZLIB is built")
+ set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${H5_ZLIB_STATIC_LIBRARY})
endif ()
endif ()
else ()
# This project is being called from within another and ZLib is already configured
+ set(H5_ZLIB_FOUND TRUE)
+ endif ()
+ if (H5_ZLIB_FOUND)
set (H5_HAVE_FILTER_DEFLATE 1)
set (H5_HAVE_ZLIB_H 1)
set (H5_HAVE_LIBZ 1)
- endif ()
- if (H5_HAVE_FILTER_DEFLATE)
- set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
- endif ()
- set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${ZLIB_STATIC_LIBRARY})
- INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Filter ZLIB is ON")
+ if (H5_HAVE_FILTER_DEFLATE)
+ set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
+ endif ()
+ set (HDF5_COMP_INCLUDE_DIRECTORIES "${HDF5_COMP_INCLUDE_DIRECTORIES};${H5_ZLIB_INCLUDE_DIRS}")
+ message (VERBOSE "Filter HDF5_ZLIB is ON")
+ else ()
+ set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE)
+ message (WARNING " ZLib support in HDF5 was enabled but not found")
endif ()
endif ()
#-----------------------------------------------------------------------------
# Option for SzLib support
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): no need for szip support.
-option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
+set(H5_SZIP_FOUND FALSE)
+option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" ON)
if (HDF5_ENABLE_SZIP_SUPPORT)
- option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
+ option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" ON)
if (NOT SZIP_USE_EXTERNAL)
- find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
+ if (HDF5_USE_LIBAEC_STATIC)
+ set(LIBAEC_SEACH_TYPE static)
+ else ()
+ set(LIBAEC_SEACH_TYPE shared)
+ endif ()
+ set(libaec_USE_STATIC_LIBS ${HDF5_USE_LIBAEC_STATIC})
+ set(SZIP_FOUND FALSE)
+ find_package (SZIP NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS ${LIBAEC_SEACH_TYPE})
if (NOT SZIP_FOUND)
find_package (SZIP) # Legacy find
- if (SZIP_FOUND)
- set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
- endif ()
endif ()
- endif ()
- if (SZIP_FOUND)
- set (H5_HAVE_FILTER_SZIP 1)
- set (H5_HAVE_SZLIB_H 1)
- set (H5_HAVE_LIBSZ 1)
- set (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
- set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR})
+ set(H5_SZIP_FOUND ${SZIP_FOUND})
+ if (H5_SZIP_FOUND)
+ set (H5_SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
+ set (H5_SZIP_INCLUDE_DIRS ${H5_SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR})
+ set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
+ endif ()
else ()
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING})
- set (H5_HAVE_FILTER_SZIP 1)
- set (H5_HAVE_SZLIB_H 1)
- set (H5_HAVE_LIBSZ 1)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Filter SZIP is built")
- endif ()
- if (USE_LIBAEC)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "... with library AEC")
- endif ()
- set (SZ_PACKAGE_NAME ${LIBAEC_PACKAGE_NAME})
- else ()
- set (SZ_PACKAGE_NAME ${SZIP_PACKAGE_NAME})
- endif ()
- else ()
- message (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
+ message (VERBOSE "Filter SZIP is built")
+ message (VERBOSE "... with library AEC")
+ set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${H5_SZIP_STATIC_LIBRARY})
endif ()
endif ()
- set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_STATIC_LIBRARY})
- INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ if (H5_SZIP_FOUND)
+ set (H5_HAVE_FILTER_SZIP 1)
+ set (H5_HAVE_SZLIB_H 1)
+ set (H5_HAVE_LIBSZ 1)
+ set (HDF5_COMP_INCLUDE_DIRECTORIES "${HDF5_COMP_INCLUDE_DIRECTORIES};${H5_SZIP_INCLUDE_DIRS}")
message (VERBOSE "Filter SZIP is ON")
+ if (H5_HAVE_FILTER_SZIP)
+ set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
+ endif ()
+ if (HDF5_ENABLE_SZIP_ENCODING)
+ set (H5_HAVE_SZIP_ENCODER 1)
+ set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE")
+ endif ()
+ else ()
+ set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE)
+ message (WARNING "SZIP support in HDF5 was enabled but not found")
endif ()
- if (H5_HAVE_FILTER_SZIP)
- set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
- endif ()
- if (HDF5_ENABLE_SZIP_ENCODING)
- set (H5_HAVE_SZIP_ENCODER 1)
- set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE")
- endif ()
-endif ()
endif ()
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeInstallation.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeInstallation.cmake
index 1bf9f45b7f3..56dd50042e6 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeInstallation.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeInstallation.cmake
@@ -34,7 +34,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (HDF5_EXPORTED_TARGETS)
install (
EXPORT ${HDF5_EXPORTED_TARGETS}
- DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5
+ DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
NAMESPACE ${HDF_PACKAGE_NAMESPACE}
COMPONENT configinstall
@@ -55,17 +55,10 @@ endif ()
# Set includes needed for build
#-----------------------------------------------------------------------------
set (HDF5_INCLUDES_BUILD_TIME
- ${HDF5_SRC_DIR} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR}
+ ${HDF5_SRC_INCLUDE_DIRS} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR}
${HDF5_TOOLS_SRC_DIR} ${HDF5_SRC_BINARY_DIR}
)
-#-----------------------------------------------------------------------------
-# Set variables needed for installation
-#-----------------------------------------------------------------------------
-set (HDF5_VERSION_STRING ${HDF5_PACKAGE_VERSION})
-set (HDF5_VERSION_MAJOR ${HDF5_PACKAGE_VERSION_MAJOR})
-set (HDF5_VERSION_MINOR ${HDF5_PACKAGE_VERSION_MINOR})
-
#-----------------------------------------------------------------------------
# Configure the hdf5-config.cmake file for the build directory
#-----------------------------------------------------------------------------
@@ -75,7 +68,7 @@ set (CURRENT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" )
configure_package_config_file (
${HDF_RESOURCES_DIR}/hdf5-config.cmake.in
"${HDF5_BINARY_DIR}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake"
- INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}/hdf5"
+ INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}"
PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}"
)
@@ -89,14 +82,14 @@ set (CURRENT_BUILD_DIR "${CMAKE_INSTALL_PREFIX}" )
configure_package_config_file (
${HDF_RESOURCES_DIR}/hdf5-config.cmake.in
"${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake"
- INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}/hdf5"
+ INSTALL_DESTINATION "${HDF5_INSTALL_CMAKE_DIR}"
PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
)
if (NOT HDF5_EXTERNALLY_CONFIGURED)
install (
FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake
- DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5
+ DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
COMPONENT configinstall
)
endif ()
@@ -110,9 +103,13 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
VERSION ${HDF5_PACKAGE_VERSION}
COMPATIBILITY SameMinorVersion
)
+ #configure_file (
+ # ${HDF_RESOURCES_DIR}/hdf5-config-version.cmake.in
+ # ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY
+ #)
install (
FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
- DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/hdf5
+ DESTINATION ${HDF5_INSTALL_CMAKE_DIR}
COMPONENT configinstall
)
endif ()
@@ -129,7 +126,7 @@ else ()
set (BYTESEX little-endian)
endif ()
configure_file (
- ${HDF_RESOURCES_DIR}/libhdf5.settings.cmake.in
+ ${HDF5_SOURCE_DIR}/src/libhdf5.settings.cmake.in
${HDF5_SRC_BINARY_DIR}/libhdf5.settings ESCAPE_QUOTES @ONLY
)
install (
@@ -141,14 +138,14 @@ install (
#-----------------------------------------------------------------------------
# Configure the HDF5_Examples.cmake file and the examples
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF)
-else ()
-set(HDF5_PACK_EXAMPLES OFF)
-endif ()
if (HDF5_PACK_EXAMPLES)
+ if (DEFINED CMAKE_TOOLCHAIN_FILE)
+ get_filename_component(TOOLCHAIN ${CMAKE_TOOLCHAIN_FILE} NAME)
+ set(CTEST_TOOLCHAIN_FILE "\${CTEST_SOURCE_DIRECTORY}/config/toolchain/${TOOLCHAIN}")
+ endif ()
configure_file (
- ${HDF_RESOURCES_DIR}/HDF5_Examples.cmake.in
+ ${HDF_RESOURCES_DIR}/examples/HDF5_Examples.cmake.in
${HDF5_BINARY_DIR}/HDF5_Examples.cmake @ONLY
)
install (
@@ -156,17 +153,13 @@ if (HDF5_PACK_EXAMPLES)
DESTINATION ${HDF5_INSTALL_DATA_DIR}
COMPONENT hdfdocuments
)
- if (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}")
- execute_process(
- COMMAND ${CMAKE_COMMAND} -E tar xzf ${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}
- )
- install (
- DIRECTORY ${HDF5_BINARY_DIR}/HDF5Examples
- DESTINATION ${HDF5_INSTALL_DATA_DIR}
- USE_SOURCE_PERMISSIONS
- COMPONENT hdfdocuments
- )
- endif ()
+
+ install (
+ DIRECTORY ${HDF5_SOURCE_DIR}/HDF5Examples
+ DESTINATION ${HDF5_INSTALL_DATA_DIR}
+ USE_SOURCE_PERMISSIONS
+ COMPONENT hdfdocuments
+ )
install (
FILES
${HDF5_SOURCE_DIR}/release_docs/USING_CMake_Examples.txt
@@ -175,24 +168,22 @@ if (HDF5_PACK_EXAMPLES)
)
install (
FILES
- ${HDF_RESOURCES_DIR}/CTestScript.cmake
+ ${HDF_RESOURCES_DIR}/examples/CTestScript.cmake
DESTINATION ${HDF5_INSTALL_DATA_DIR}
COMPONENT hdfdocuments
)
install (
FILES
- ${HDF_RESOURCES_DIR}/HDF5_Examples_options.cmake
+ ${HDF_RESOURCES_DIR}/examples/HDF5_Examples_options.cmake
DESTINATION ${HDF5_INSTALL_DATA_DIR}
COMPONENT hdfdocuments
)
endif ()
#-----------------------------------------------------------------------------
-# Configure the README.txt file for the binary package
+# Configure the README.md file for the binary package
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): skip unnecessary installation rules.
HDF_README_PROPERTIES(HDF5_BUILD_FORTRAN)
-endif ()
#-----------------------------------------------------------------------------
# Configure the COPYING.txt file for the windows binary package
@@ -250,7 +241,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
endif ()
install (
FILES ${release_files}
- DESTINATION ${HDF5_INSTALL_DATA_DIR}
+ DESTINATION ${HDF5_INSTALL_DOC_DIR}
COMPONENT hdfdocuments
)
endif ()
@@ -262,10 +253,10 @@ endif ()
if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
set (CPACK_PACKAGE_VENDOR "HDF_Group")
set (CPACK_PACKAGE_NAME "${HDF5_PACKAGE_NAME}")
- if (CDASH_LOCAL)
- set (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}")
- else ()
+ if (NOT WIN32 OR HDF5_VERS_SUBRELEASE MATCHES "^[0-9]+$")
set (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION_STRING}")
+ else ()
+ set (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}")
endif ()
set (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}")
set (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}")
@@ -281,15 +272,17 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
else ()
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
endif ()
- set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.bmp")
+ set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_DIR}/hdf.bmp")
+
+ set (CPACK_ORIG_SOURCE_DIR ${CMAKE_SOURCE_DIR})
+ if ("$ENV{BINSIGN}" STREQUAL "exists")
+ set (CPACK_PRE_BUILD_SCRIPTS ${CMAKE_SOURCE_DIR}/config/cmake/SignPackageFiles.cmake)
+ endif ()
set (CPACK_GENERATOR "TGZ")
if (WIN32)
set (CPACK_GENERATOR "ZIP")
- if (NSIS_EXECUTABLE)
- list (APPEND CPACK_GENERATOR "NSIS")
- endif ()
# Installers for 32- vs. 64-bit CMake:
# - Root install directory (displayed to end user at installer-run time)
# - "NSIS package/display name" (text used in the installer GUI)
@@ -302,12 +295,12 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
set (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
endif ()
- # set the install/unistall icon used for the installer itself
+ # set the install/uninstall icon used for the installer itself
# There is a bug in NSI that does not handle full unix paths properly.
- set (CPACK_NSIS_MUI_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico")
- set (CPACK_NSIS_MUI_UNIICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico")
+ set (CPACK_NSIS_MUI_ICON "${HDF_RESOURCES_DIR}\\\\hdf.ico")
+ set (CPACK_NSIS_MUI_UNIICON "${HDF_RESOURCES_DIR}\\\\hdf.ico")
# set the package header icon for MUI
- set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.bmp")
+ set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_DIR}\\\\hdf.bmp")
set (CPACK_NSIS_DISPLAY_NAME "${CPACK_NSIS_PACKAGE_NAME}")
if (OVERRIDE_INSTALL_VERSION)
set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${OVERRIDE_INSTALL_VERSION}")
@@ -337,7 +330,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
set (CPACK_RESOURCE_FILE_LICENSE "${HDF5_BINARY_DIR}/COPYING.txt")
# .. variable:: CPACK_WIX_PRODUCT_ICON
# The Icon shown next to the program name in Add/Remove programs.
- set(CPACK_WIX_PRODUCT_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.ico")
+ set(CPACK_WIX_PRODUCT_ICON "${HDF_RESOURCES_DIR}\\\\hdf.ico")
#
# .. variable:: CPACK_WIX_UI_BANNER
#
@@ -361,21 +354,30 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
set(CPACK_WIX_PROPERTY_ARPURLINFOABOUT "${HDF5_PACKAGE_URL}")
set(CPACK_WIX_PROPERTY_ARPHELPLINK "${HDF5_PACKAGE_BUGREPORT}")
if (BUILD_SHARED_LIBS)
- set(CPACK_WIX_PATCH_FILE "${HDF_RESOURCES_DIR}/patch.xml")
+ if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer")
+ set (WIX_CMP_NAME "${HDF5_LIB_NAME}${CMAKE_DEBUG_POSTFIX}")
+ else ()
+ set (WIX_CMP_NAME "${HDF5_LIB_NAME}")
+ endif ()
+ configure_file (${HDF_RESOURCES_DIR}/patch.xml.in ${HDF5_BINARY_DIR}/patch.xml @ONLY)
+ set(CPACK_WIX_PATCH_FILE "${HDF5_BINARY_DIR}/patch.xml")
endif ()
elseif (APPLE)
list (APPEND CPACK_GENERATOR "STGZ")
- list (APPEND CPACK_GENERATOR "DragNDrop")
+ option (HDF5_PACK_MACOSX_DMG "Package the HDF5 Library using DragNDrop" ON)
+ if (HDF5_PACK_MACOSX_DMG)
+ list (APPEND CPACK_GENERATOR "DragNDrop")
+ endif ()
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
- set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.icns")
+ set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_DIR}/hdf.icns")
option (HDF5_PACK_MACOSX_FRAMEWORK "Package the HDF5 Library in a Frameworks" OFF)
if (HDF5_PACK_MACOSX_FRAMEWORK AND HDF5_BUILD_FRAMEWORKS)
set (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}")
set (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in /
set (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/")
- set (CPACK_BUNDLE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.icns")
+ set (CPACK_BUNDLE_ICON "${HDF_RESOURCES_DIR}/hdf.icns")
set (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist")
set (CPACK_SHORT_VERSION_STRING "${CPACK_PACKAGE_VERSION}")
#-----------------------------------------------------------------------------
@@ -390,7 +392,7 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
${HDF5_BINARY_DIR}/CMakeFiles/PkgInfo @ONLY
)
configure_file (
- ${HDF_RESOURCES_EXT_DIR}/version.plist.in
+ ${HDF_RESOURCES_DIR}/version.plist.in
${HDF5_BINARY_DIR}/CMakeFiles/version.plist @ONLY
)
install (
@@ -403,18 +405,29 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
- set (CPACK_DEBIAN_PACKAGE_SECTION "Libraries")
- set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}")
-
-# list (APPEND CPACK_GENERATOR "RPM")
- set (CPACK_RPM_PACKAGE_RELEASE "1")
- set (CPACK_RPM_COMPONENT_INSTALL ON)
- set (CPACK_RPM_PACKAGE_RELOCATABLE ON)
- set (CPACK_RPM_PACKAGE_LICENSE "BSD-style")
- set (CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
- set (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}")
- set (CPACK_RPM_PACKAGE_SUMMARY "HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.")
- set (CPACK_RPM_PACKAGE_DESCRIPTION
+ find_program (DPKGSHLIB_EXE dpkg-shlibdeps)
+ if (DPKGSHLIB_EXE)
+ list (APPEND CPACK_GENERATOR "DEB")
+ set (CPACK_DEBIAN_PACKAGE_SECTION "Libraries")
+ set (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}")
+ endif ()
+
+ find_program (RPMBUILD_EXE rpmbuild)
+ if (RPMBUILD_EXE)
+ list (APPEND CPACK_GENERATOR "RPM")
+ set (CPACK_RPM_PACKAGE_RELEASE "1")
+ set (CPACK_RPM_PACKAGE_RELEASE_DIST ON)
+ set (CPACK_RPM_COMPONENT_INSTALL ON)
+ set (CPACK_RPM_PACKAGE_RELOCATABLE ON)
+ set (CPACK_RPM_FILE_NAME "RPM-DEFAULT")
+ set (CPACK_RPM_PACKAGE_NAME "${CPACK_PACKAGE_NAME}")
+ set (CPACK_RPM_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
+ set (CPACK_RPM_PACKAGE_VENDOR "${CPACK_PACKAGE_VENDOR}")
+ set (CPACK_RPM_PACKAGE_LICENSE "BSD-style")
+ set (CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
+ set (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}")
+ set (CPACK_RPM_PACKAGE_SUMMARY "HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.")
+ set (CPACK_RPM_PACKAGE_DESCRIPTION
"The HDF5 technology suite includes:
* A versatile data model that can represent very complex data objects and a wide variety of metadata.
@@ -429,13 +442,14 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
The HDF5 data model, file format, API, library, and tools are open and distributed without charge.
"
- )
+ )
- #-----------------------------------------------------------------------------
- # Configure the spec file for the install RPM
- #-----------------------------------------------------------------------------
-# configure_file ("${HDF5_RESOURCES_DIR}/hdf5.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec" @ONLY IMMEDIATE)
-# set (CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec")
+ #-----------------------------------------------------------------------------
+ # Configure the spec file for the install RPM
+ #-----------------------------------------------------------------------------
+# configure_file ("${HDF5_RESOURCES_DIR}/hdf5.spec.in" "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec" @ONLY IMMEDIATE)
+# set (CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_BINARY_DIR}/${HDF5_PACKAGE_NAME}.spec")
+ endif ()
endif ()
# By default, do not warn when built on machines using only VS Express:
@@ -448,22 +462,20 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
if (HDF5_PACKAGE_EXTLIBS)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
+ if (H5_ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
if (WIN32)
- set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;ALL;/")
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_ZLIB_INCLUDE_DIR_GEN};HDF5_ZLIB;ALL;/")
else ()
- set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;libraries;/")
- set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;headers;/")
- set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;configinstall;/")
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_ZLIB_INCLUDE_DIR_GEN};HDF5_ZLIB;libraries;/")
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_ZLIB_INCLUDE_DIR_GEN};HDF5_ZLIB;configinstall;/")
endif ()
endif ()
- if (SZIP_FOUND AND SZIP_USE_EXTERNAL)
+ if (H5_SZIP_FOUND AND SZIP_USE_EXTERNAL)
if (WIN32)
- set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;ALL;/")
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};SZIP;ALL;/")
else ()
- set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/")
- set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;headers;/")
- set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/")
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/")
+ set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/")
endif ()
endif ()
if (PLUGIN_FOUND AND PLUGIN_USE_EXTERNAL)
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeLists.txt b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeLists.txt
index c010975ab3a..cf9729d099e 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeLists.txt
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeLists.txt
@@ -1,23 +1,21 @@
-#[[ITK --start
-cmake_minimum_required (VERSION 3.12)
-# ITK --stop ]]
+cmake_minimum_required (VERSION 3.18)
project (HDF5 C)
if (POLICY CMP0074)
+ # find_package() uses _ROOT variables.
cmake_policy (SET CMP0074 NEW)
endif ()
if (POLICY CMP0083)
+ # To control generation of Position Independent Executable (PIE) or not,
+ # some flags are required at link time.
cmake_policy (SET CMP0083 NEW)
endif ()
-# XXX(kitware): Set to avoid cmake complaining
-if (POLICY CMP0007)
- cmake_policy (SET CMP0007 NEW)
-endif ()
-
-# XXX(kitware): Hardcode settings.
-set(DISABLE_PDB_FILES ON)
+# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24:
+if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
+ cmake_policy(SET CMP0135 NEW)
+endif()
#-----------------------------------------------------------------------------
# Instructions for use : Normal Build
@@ -46,16 +44,17 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
)
endif ()
-# CMake version 3.14 added option --ignore-eol to compare files
-# cmake -E compare_files --ignore-eol file1 file2
-set (CMAKE_IGNORE_EOL "--ignore-eol")
-if (CMAKE_VERSION VERSION_LESS "3.14.0")
- set (CMAKE_IGNORE_EOL "")
- if (WIN32)
- message (FATAL_ERROR "Windows builds require a minimum of CMake 3.14")
+# Whether the most recently called project() command, in the current scope or above,
+# was in the top level CMakeLists.txt file.
+if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.21.0")
+ if(NOT PROJECT_IS_TOP_LEVEL)
+ set (HDF5_EXTERNALLY_CONFIGURED 1)
endif()
-endif ()
-
+else()
+ if (NOT CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
+ set (HDF5_EXTERNALLY_CONFIGURED 1)
+ endif()
+endif()
#-----------------------------------------------------------------------------
# Instructions for use : Sub-Project Build
#
@@ -75,9 +74,7 @@ endif ()
# dependencies to this variable so that external projects pick them up
#
#option (HDF5_EXTERNAL_LIB_PREFIX "Use prefix for custom library naming." "")
-# ITK --start
-set (HDF5_EXTERNAL_LIB_PREFIX "itk" CACHE STRING "Use prefix for custom library naming.")
-# ITK --stop
+set (HDF5_EXTERNAL_LIB_PREFIX "" CACHE STRING "Use prefix for custom library naming.")
mark_as_advanced (HDF5_EXTERNAL_LIB_PREFIX)
# HDF5_EXTERNAL_LIB_PREFIX :
# If the parent project needs to install hdf libraries, but avoid
@@ -90,6 +87,13 @@ mark_as_advanced (HDF5_LIB_INFIX)
# e.g. the infix '_openmpi' results in the library name 'libhdf5_openmpi.so'
# This name is used in packages on debian based systems.
# (see https://packages.debian.org/jessie/amd64/libhdf5-openmpi-8/filelist)
+#option (HDF5_EXTERNAL_LIB_SUFFIX "Use prefix for custom library naming." "")
+set (HDF5_EXTERNAL_LIB_SUFFIX "" CACHE STRING "Use suffix for custom library naming.")
+mark_as_advanced (HDF5_EXTERNAL_LIB_SUFFIX)
+# HDF5_EXTERNAL_LIB_SUFFIX :
+# If the parent project needs to install hdf libraries, but avoid
+# name conflicts with system versions, then a suffix may be added
+# to ensure that the correct versions configured are used.
#
# HDF5_INSTALL_BIN_DIR, HDF5_INSTALL_LIB_DIR, HDF5_INSTALL_INCLUDE_DIR, HDF5_INSTALL_DATA_DIR :
# Customize the 'bin', 'lib', 'include', and 'share' installation directories.
@@ -119,8 +123,8 @@ mark_as_advanced (HDF5_LIB_INFIX)
# else ()
# set (H5_ZLIB_HEADER "vtk_zlib.h")
# # Set vars that FindZlib would have set if used in sub project
-# set (ZLIB_INCLUDE_DIRS "${VTK_ZLIB_INCLUDE_DIRS}")
-# set (ZLIB_LIBRARIES vtkzlib)
+# set (H5_ZLIB_INCLUDE_DIRS "${VTK_H5_ZLIB_INCLUDE_DIRS}")
+# set (H5_ZLIB_LIBRARIES vtkzlib)
# endif ()
# endif ()
#
@@ -129,7 +133,6 @@ mark_as_advanced (HDF5_LIB_INFIX)
#-----------------------------------------------------------------------------
string (TIMESTAMP CONFIG_DATE "%Y-%m-%d")
-if (FALSE) # XXX(kitware): Hardcode settings.
#-----------------------------------------------------------------------------
# Allow Visual Studio solution directories
#-----------------------------------------------------------------------------
@@ -146,51 +149,67 @@ option (HDF5_NO_PACKAGES "CPACK - Disable packaging" OFF)
mark_as_advanced (HDF5_NO_PACKAGES)
option (ALLOW_UNSUPPORTED "Allow unsupported combinations of configure options" OFF)
mark_as_advanced (ALLOW_UNSUPPORTED)
-else ()
-set(HDF5_USE_FOLDERS OFF)
-set(HDF5_NO_PACKAGES ON)
-set(ALLOW_UNSUPPORTED OFF)
-endif ()
#-----------------------------------------------------------------------------
-# Set the core names of all the libraries
-#-----------------------------------------------------------------------------
-set (HDF5_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}")
-set (HDF5_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test")
-set (HDF5_CPP_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_cpp")
-set (HDF5_HL_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl")
-set (HDF5_HL_CPP_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_cpp")
-set (HDF5_TOOLS_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_tools")
-set (HDF5_UTILS_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_utils")
-set (HDF5_F90_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_fortran")
-set (HDF5_F90_C_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_f90cstub")
-set (HDF5_F90_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test_fortran")
-set (HDF5_F90_C_TEST_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_test_f90cstub")
-set (HDF5_HL_F90_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_fortran")
-set (HDF5_HL_F90_C_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_hl_f90cstub")
-set (HDF5_JAVA_JNI_LIB_CORENAME "hdf5${HDF5_LIB_INFIX}_java")
+# Set the core names of all the libraries CORENAME is the base library name
+# for targets, BASE_CORE
+# filename are made of PREFIX_BASE_INFIX_CORE_SUFFIX
+#-----------------------------------------------------------------------------
+set (HDF5_LIB_BASE "hdf5")
+
+set (HDF5_LIB_CORE "")
+set (HDF5_TEST_LIB_CORE "_test")
+set (HDF5_CPP_LIB_CORE "_cpp")
+set (HDF5_HL_LIB_CORE "_hl")
+set (HDF5_HL_CPP_LIB_CORE "_hl_cpp")
+set (HDF5_TOOLS_LIB_CORE "_tools")
+set (HDF5_UTILS_LIB_CORE "_utils")
+set (HDF5_F90_LIB_CORE "_fortran")
+set (HDF5_F90_C_LIB_CORE "_f90cstub")
+set (HDF5_F90_TEST_LIB_CORE "_test_fortran")
+set (HDF5_F90_C_TEST_LIB_CORE "_test_f90cstub")
+set (HDF5_HL_F90_LIB_CORE "_hl_fortran")
+set (HDF5_HL_F90_C_LIB_CORE "_hl_f90cstub")
+set (HDF5_JAVA_JNI_LIB_CORE "_java")
+
+set (HDF5_LIB_CORENAME "${HDF5_LIB_BASE}")
+set (HDF5_TEST_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_TEST_LIB_CORE}")
+set (HDF5_CPP_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_CPP_LIB_CORE}")
+set (HDF5_HL_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_HL_LIB_CORE}")
+set (HDF5_HL_CPP_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_HL_CPP_LIB_CORE}")
+set (HDF5_TOOLS_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_TOOLS_LIB_CORE}")
+set (HDF5_UTILS_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_UTILS_LIB_CORE}")
+set (HDF5_F90_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_F90_LIB_CORE}")
+set (HDF5_F90_C_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_F90_C_LIB_CORE}")
+set (HDF5_F90_TEST_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_F90_TEST_LIB_CORE}")
+set (HDF5_F90_C_TEST_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_F90_C_TEST_LIB_CORE}")
+set (HDF5_HL_F90_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_HL_F90_LIB_CORE}")
+set (HDF5_HL_F90_C_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_HL_F90_C_LIB_CORE}")
+set (HDF5_JAVA_JNI_LIB_CORENAME "${HDF5_LIB_BASE}${HDF5_JAVA_JNI_LIB_CORE}")
set (HDF5_JAVA_HDF5_LIB_CORENAME "jarhdf5")
set (HDF5_JAVA_TEST_LIB_CORENAME "jartest5")
#-----------------------------------------------------------------------------
# Set the true names of all the libraries if customized by external project
#-----------------------------------------------------------------------------
-set (HDF5_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_CORENAME}")
-set (HDF5_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_LIB_CORENAME}")
-set (HDF5_CPP_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_CPP_LIB_CORENAME}")
-set (HDF5_HL_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_LIB_CORENAME}")
-set (HDF5_HL_CPP_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_CPP_LIB_CORENAME}")
-set (HDF5_TOOLS_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TOOLS_LIB_CORENAME}")
-set (HDF5_UTILS_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_UTILS_LIB_CORENAME}")
-set (HDF5_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_LIB_CORENAME}")
-set (HDF5_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_C_LIB_CORENAME}")
-set (HDF5_F90_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_TEST_LIB_CORENAME}")
-set (HDF5_F90_C_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_F90_C_TEST_LIB_CORENAME}")
-set (HDF5_HL_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_LIB_CORENAME}")
-set (HDF5_HL_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_HL_F90_C_LIB_CORENAME}")
-set (HDF5_JAVA_JNI_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_JNI_LIB_CORENAME}")
-set (HDF5_JAVA_HDF5_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_HDF5_LIB_CORENAME}")
-set (HDF5_JAVA_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_TEST_LIB_CORENAME}")
+set (HDF5_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}")
+set (HDF5_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_TEST_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}")
+set (HDF5_CPP_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_CPP_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}")
+set (HDF5_HL_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_HL_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}")
+set (HDF5_HL_CPP_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_HL_CPP_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}")
+set (HDF5_TOOLS_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_TOOLS_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}")
+set (HDF5_UTILS_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_UTILS_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}")
+set (HDF5_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_F90_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}")
+set (HDF5_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_F90_C_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}")
+set (HDF5_F90_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_F90_TEST_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}")
+set (HDF5_F90_C_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_F90_C_TEST_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}")
+set (HDF5_HL_F90_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_HL_F90_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}")
+set (HDF5_HL_F90_C_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_HL_F90_C_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}")
+#Because the loading mechanism of the JNI library requires a fixed name, the name of the JNI library cannot be customized
+#set (HDF5_JAVA_JNI_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_LIB_BASE}${HDF5_LIB_INFIX}${HDF5_JAVA_JNI_LIB_CORE}${HDF5_EXTERNAL_LIB_SUFFIX}")
+set (HDF5_JAVA_JNI_LIB_NAME "${HDF5_LIB_BASE}${HDF5_JAVA_JNI_LIB_CORE}")
+set (HDF5_JAVA_HDF5_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_HDF5_LIB_CORENAME}${HDF5_LIB_INFIX}${HDF5_EXTERNAL_LIB_SUFFIX}")
+set (HDF5_JAVA_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_TEST_LIB_CORENAME}${HDF5_LIB_INFIX}${HDF5_EXTERNAL_LIB_SUFFIX}")
#-----------------------------------------------------------------------------
# Set the target names of all the libraries
@@ -228,30 +247,35 @@ set (HDF5_HL_F90_C_LIBSH_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-shared")
#-----------------------------------------------------------------------------
# Define some CMake variables for use later in the project
#-----------------------------------------------------------------------------
-set (HDF_CONFIG_DIR ${HDF5_SOURCE_DIR}/config)
-set (HDF_RESOURCES_DIR ${HDF5_SOURCE_DIR}/config/cmake)
-set (HDF_RESOURCES_EXT_DIR ${HDF5_SOURCE_DIR}/config/cmake_ext_mod)
-set (HDF5_SRC_DIR ${HDF5_SOURCE_DIR}/src)
-set (HDF5_TEST_SRC_DIR ${HDF5_SOURCE_DIR}/test)
-set (HDF5_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/c++)
-set (HDF5_CPP_TST_DIR ${HDF5_SOURCE_DIR}/c++/test)
-set (HDF5_HL_SRC_DIR ${HDF5_SOURCE_DIR}/hl)
-set (HDF5_HL_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/hl/c++)
-set (HDF5_HL_TOOLS_DIR ${HDF5_SOURCE_DIR}/hl/tools)
-set (HDF5_TOOLS_DIR ${HDF5_SOURCE_DIR}/tools)
-set (HDF5_TOOLS_SRC_DIR ${HDF5_SOURCE_DIR}/tools/src)
-set (HDF5_PERFORM_SRC_DIR ${HDF5_SOURCE_DIR}/tools/src/perform)
-set (HDF5_UTILS_DIR ${HDF5_SOURCE_DIR}/utils)
-set (HDF5_F90_SRC_DIR ${HDF5_SOURCE_DIR}/fortran)
+set (HDF_CONFIG_DIR ${HDF5_SOURCE_DIR}/config)
+set (HDF_RESOURCES_DIR ${HDF5_SOURCE_DIR}/config/cmake)
+set (HDF5_SRC_DIR ${HDF5_SOURCE_DIR}/src)
+set (HDF5_TEST_SRC_DIR ${HDF5_SOURCE_DIR}/test)
+set (HDF5_TEST_PAR_DIR ${HDF5_SOURCE_DIR}/testpar)
+set (HDF5_TEST_API_SRC_DIR ${HDF5_SOURCE_DIR}/test/API)
+set (HDF5_TEST_API_PAR_SRC_DIR ${HDF5_SOURCE_DIR}/testpar/API)
+set (HDF5_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/c++)
+set (HDF5_CPP_TST_DIR ${HDF5_SOURCE_DIR}/c++/test)
+set (HDF5_HL_SRC_DIR ${HDF5_SOURCE_DIR}/hl)
+set (HDF5_HL_CPP_SRC_DIR ${HDF5_SOURCE_DIR}/hl/c++)
+set (HDF5_HL_TOOLS_DIR ${HDF5_SOURCE_DIR}/hl/tools)
+set (HDF5_TOOLS_ROOT_DIR ${HDF5_SOURCE_DIR}/tools)
+set (HDF5_TOOLS_SRC_DIR ${HDF5_SOURCE_DIR}/tools/src)
+set (HDF5_TOOLS_TST_DIR ${HDF5_SOURCE_DIR}/tools/test)
+set (HDF5_PERFORM_SRC_DIR ${HDF5_SOURCE_DIR}/tools/src/perform)
+set (HDF5_UTILS_DIR ${HDF5_SOURCE_DIR}/utils)
+set (HDF5_F90_SRC_DIR ${HDF5_SOURCE_DIR}/fortran)
set (HDF5_JAVA_JNI_SRC_DIR ${HDF5_SOURCE_DIR}/java/src/jni)
set (HDF5_JAVA_HDF5_SRC_DIR ${HDF5_SOURCE_DIR}/java/src/hdf)
set (HDF5_JAVA_TEST_SRC_DIR ${HDF5_SOURCE_DIR}/java/test)
set (HDF5_JAVA_LIB_DIR ${HDF5_SOURCE_DIR}/java/lib)
-set (HDF5_JAVA_LOGGING_JAR ${HDF5_SOURCE_DIR}/java/lib/slf4j-api-1.7.25.jar)
-set (HDF5_JAVA_LOGGING_NOP_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-nop-1.7.25.jar)
-set (HDF5_JAVA_LOGGING_SIMPLE_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-simple-1.7.25.jar)
+set (HDF5_JAVA_LOGGING_JAR ${HDF5_SOURCE_DIR}/java/lib/slf4j-api-2.0.6.jar)
+set (HDF5_JAVA_LOGGING_NOP_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-nop-2.0.6.jar)
+set (HDF5_JAVA_LOGGING_SIMPLE_JAR ${HDF5_SOURCE_DIR}/java/lib/ext/slf4j-simple-2.0.6.jar)
set (HDF5_DOXYGEN_DIR ${HDF5_SOURCE_DIR}/doxygen)
+set (HDF5_SRC_INCLUDE_DIRS ${HDF5_SRC_DIR})
+
#-----------------------------------------------------------------------------
# parse the full version number from H5public.h and include in H5_VERS_INFO
#-----------------------------------------------------------------------------
@@ -264,9 +288,7 @@ string (REGEX REPLACE ".*#define[ \t]+H5_VERS_RELEASE[ \t]+([0-9]*).*$"
"\\1" H5_VERS_RELEASE ${_h5public_h_contents})
string (REGEX REPLACE ".*#define[ \t]+H5_VERS_SUBRELEASE[ \t]+\"([0-9A-Za-z._-]*)\".*$"
"\\1" H5_VERS_SUBRELEASE ${_h5public_h_contents})
-if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (TRACE "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}")
-endif ()
+message (TRACE "VERSION: ${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}-${H5_VERS_SUBRELEASE}")
#-----------------------------------------------------------------------------
# parse the full soversion number from config/lt_vers.am and include in H5_SOVERS_INFO
@@ -279,11 +301,7 @@ string (REGEX REPLACE ".*LT_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$"
string (REGEX REPLACE ".*LT_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_LIB_SOVERS_RELEASE ${_lt_vers_am_contents})
math (EXPR H5_LIB_SOVERS_MAJOR ${H5_LIB_SOVERS_INTERFACE}-${H5_LIB_SOVERS_RELEASE})
-#[[ ITK --start
-if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "SOVERSION: ${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}")
-endif ()
-# ITK --stop ]]
+message (VERBOSE "SOVERSION: ${H5_LIB_SOVERS_MAJOR}.${H5_LIB_SOVERS_RELEASE}.${H5_LIB_SOVERS_MINOR}")
string (REGEX MATCH ".*LT_TOOLS_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_TOOLS_SOVERS_EXISTS ${_lt_vers_am_contents})
if (H5_TOOLS_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_TOOLS_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$"
@@ -293,11 +311,7 @@ if (H5_TOOLS_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_TOOLS_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_TOOLS_SOVERS_RELEASE ${_lt_vers_am_contents})
math (EXPR H5_TOOLS_SOVERS_MAJOR ${H5_TOOLS_SOVERS_INTERFACE}-${H5_TOOLS_SOVERS_RELEASE})
-#[[ ITK --start
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "SOVERSION_TOOLS: ${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}")
- endif ()
-# ITK --stop ]]
+ message (VERBOSE "SOVERSION_TOOLS: ${H5_TOOLS_SOVERS_MAJOR}.${H5_TOOLS_SOVERS_RELEASE}.${H5_TOOLS_SOVERS_MINOR}")
endif ()
string (REGEX MATCH ".*LT_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_CXX_SOVERS_EXISTS ${_lt_vers_am_contents})
if (H5_CXX_SOVERS_EXISTS)
@@ -308,14 +322,10 @@ if (H5_CXX_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_CXX_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_CXX_SOVERS_RELEASE ${_lt_vers_am_contents})
math (EXPR H5_CXX_SOVERS_MAJOR ${H5_CXX_SOVERS_INTERFACE}-${H5_CXX_SOVERS_RELEASE})
-#[[ ITK --start
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "SOVERSION_CXX: ${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}")
- endif ()
-# ITK --stop ]]
+ message (VERBOSE "SOVERSION_CXX: ${H5_CXX_SOVERS_MAJOR}.${H5_CXX_SOVERS_RELEASE}.${H5_CXX_SOVERS_MINOR}")
endif ()
string (REGEX MATCH ".*LT_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_F_SOVERS_EXISTS ${_lt_vers_am_contents})
-if (H5_F_SOVERS_EXISTS AND FALSE) # XXX(kitware): VTK doesn't need Fortran support.
+if (H5_F_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_F_SOVERS_INTERFACE ${_lt_vers_am_contents})
string (REGEX REPLACE ".*LT_F_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$"
@@ -323,11 +333,7 @@ if (H5_F_SOVERS_EXISTS AND FALSE) # XXX(kitware): VTK doesn't need Fortran suppo
string (REGEX REPLACE ".*LT_F_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_F_SOVERS_RELEASE ${_lt_vers_am_contents})
math (EXPR H5_F_SOVERS_MAJOR ${H5_F_SOVERS_INTERFACE}-${H5_F_SOVERS_RELEASE})
-#[[ ITK --start
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "SOVERSION_F: ${H5_F_SOVERS_MAJOR}.${H5_F_SOVERS_RELEASE}.${H5_F_SOVERS_MINOR}")
- endif ()
-# ITK --stop ]]
+ message (VERBOSE "SOVERSION_F: ${H5_F_SOVERS_MAJOR}.${H5_F_SOVERS_RELEASE}.${H5_F_SOVERS_MINOR}")
endif ()
string (REGEX MATCH ".*LT_HL_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_SOVERS_EXISTS ${_lt_vers_am_contents})
if (H5_HL_SOVERS_EXISTS)
@@ -338,11 +344,7 @@ if (H5_HL_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_HL_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_HL_SOVERS_RELEASE ${_lt_vers_am_contents})
math (EXPR H5_HL_SOVERS_MAJOR ${H5_HL_SOVERS_INTERFACE}-${H5_HL_SOVERS_RELEASE})
-#[[ ITK --start
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "SOVERSION_HL: ${H5_HL_SOVERS_MAJOR}.${H5_HL_SOVERS_RELEASE}.${H5_HL_SOVERS_MINOR}")
- endif ()
-# ITK --stop ]]
+ message (VERBOSE "SOVERSION_HL: ${H5_HL_SOVERS_MAJOR}.${H5_HL_SOVERS_RELEASE}.${H5_HL_SOVERS_MINOR}")
endif ()
string (REGEX MATCH ".*LT_HL_CXX_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_CXX_SOVERS_EXISTS ${_lt_vers_am_contents})
if (H5_HL_CXX_SOVERS_EXISTS)
@@ -353,14 +355,10 @@ if (H5_HL_CXX_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_HL_CXX_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_HL_CXX_SOVERS_RELEASE ${_lt_vers_am_contents})
math (EXPR H5_HL_CXX_SOVERS_MAJOR ${H5_HL_CXX_SOVERS_INTERFACE}-${H5_HL_CXX_SOVERS_RELEASE})
-#[[ ITK --start
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "SOVERSION_HL_CXX: ${H5_HL_CXX_SOVERS_MAJOR}.${H5_HL_CXX_SOVERS_RELEASE}.${H5_HL_CXX_SOVERS_MINOR}")
- endif ()
-# ITK --stop ]]
+ message (VERBOSE "SOVERSION_HL_CXX: ${H5_HL_CXX_SOVERS_MAJOR}.${H5_HL_CXX_SOVERS_RELEASE}.${H5_HL_CXX_SOVERS_MINOR}")
endif ()
string (REGEX MATCH ".*LT_HL_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_HL_F_SOVERS_EXISTS ${_lt_vers_am_contents})
-if (H5_HL_F_SOVERS_EXISTS AND FALSE) # XXX(kitware): VTK doesn't need Fortran support.
+if (H5_HL_F_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_HL_F_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_HL_F_SOVERS_INTERFACE ${_lt_vers_am_contents})
string (REGEX REPLACE ".*LT_HL_F_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$"
@@ -368,14 +366,10 @@ if (H5_HL_F_SOVERS_EXISTS AND FALSE) # XXX(kitware): VTK doesn't need Fortran su
string (REGEX REPLACE ".*LT_HL_F_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_HL_F_SOVERS_RELEASE ${_lt_vers_am_contents})
math (EXPR H5_HL_F_SOVERS_MAJOR ${H5_HL_F_SOVERS_INTERFACE}-${H5_HL_F_SOVERS_RELEASE})
-#[[ ITK --start
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "SOVERSION_HL_F: ${H5_HL_F_SOVERS_MAJOR}.${H5_HL_F_SOVERS_RELEASE}.${H5_HL_F_SOVERS_MINOR}")
- endif ()
-# ITK --stop ]]
+ message (VERBOSE "SOVERSION_HL_F: ${H5_HL_F_SOVERS_MAJOR}.${H5_HL_F_SOVERS_RELEASE}.${H5_HL_F_SOVERS_MINOR}")
endif ()
string (REGEX MATCH ".*LT_JAVA_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$" H5_JAVA_SOVERS_EXISTS ${_lt_vers_am_contents})
-if(H5_JAVA_SOVERS_EXISTS AND FALSE) # XXX(kitware): VTK doesn't need Java support.
+if(H5_JAVA_SOVERS_EXISTS)
string (REGEX REPLACE ".*LT_JAVA_VERS_INTERFACE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_JAVA_SOVERS_INTERFACE ${_lt_vers_am_contents})
string (REGEX REPLACE ".*LT_JAVA_VERS_REVISION[ \t]+=[ \t]+([0-9]*).*$"
@@ -383,11 +377,7 @@ if(H5_JAVA_SOVERS_EXISTS AND FALSE) # XXX(kitware): VTK doesn't need Java suppor
string (REGEX REPLACE ".*LT_JAVA_VERS_AGE[ \t]+=[ \t]+([0-9]*).*$"
"\\1" H5_JAVA_SOVERS_RELEASE ${_lt_vers_am_contents})
math (EXPR H5_JAVA_SOVERS_MAJOR ${H5_JAVA_SOVERS_INTERFACE}-${H5_JAVA_SOVERS_RELEASE})
-#[[ ITK --start
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "SOVERSION_JAVA: ${H5_JAVA_SOVERS_MAJOR}.${H5_JAVA_SOVERS_RELEASE}.${H5_JAVA_SOVERS_MINOR}")
- endif ()
-# ITK --stop ]]
+ message (VERBOSE "SOVERSION_JAVA: ${H5_JAVA_SOVERS_MAJOR}.${H5_JAVA_SOVERS_RELEASE}.${H5_JAVA_SOVERS_MINOR}")
endif ()
#-----------------------------------------------------------------------------
@@ -461,14 +451,22 @@ set (HDF5_PACKAGE_TARNAME "${HDF5_PACKAGE}${HDF_PACKAGE_EXT}")
set (HDF5_PACKAGE_URL "http://www.hdfgroup.org")
set (HDF5_PACKAGE_BUGREPORT "help@hdfgroup.org")
+#-----------------------------------------------------------------------------
+# Set variables needed for installation
+#-----------------------------------------------------------------------------
+set (HDF5_VERSION_STRING ${HDF5_PACKAGE_VERSION})
+set (HDF5_VERSION_MAJOR ${HDF5_PACKAGE_VERSION_MAJOR})
+set (HDF5_VERSION_MINOR ${HDF5_PACKAGE_VERSION_MINOR})
+set (H5_LIBVER_DIR ${H5_VERS_MAJOR}${H5_VERS_MINOR})
+
#-----------------------------------------------------------------------------
# Include some macros for reusable code
#-----------------------------------------------------------------------------
-include (${HDF_RESOURCES_EXT_DIR}/HDFMacros.cmake)
+include (${HDF_RESOURCES_DIR}/HDFMacros.cmake)
HDF_DIR_PATHS(${HDF5_PACKAGE_NAME})
-include (${HDF_RESOURCES_EXT_DIR}/HDFLibMacros.cmake)
+include (${HDF_RESOURCES_DIR}/HDFLibMacros.cmake)
include (${HDF_RESOURCES_DIR}/HDF5PluginMacros.cmake)
include (${HDF_RESOURCES_DIR}/HDF5Macros.cmake)
@@ -499,6 +497,13 @@ include (${HDF_RESOURCES_DIR}/ConfigureChecks.cmake)
set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
+#-----------------------------------------------------------------------------
+# Include directories in the source or build tree should come before other
+# directories to prioritize headers in the sources over installed ones.
+#-----------------------------------------------------------------------------
+set (CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
+set (HDF5_COMP_INCLUDE_DIRECTORIES)
+
#-----------------------------------------------------------------------------
# Mac OS X Options
#-----------------------------------------------------------------------------
@@ -509,48 +514,51 @@ endif ()
#-----------------------------------------------------------------------------
# Option to Build Shared and Static libs, default is both
#-----------------------------------------------------------------------------
+option (ONLY_SHARED_LIBS "Only Build Shared Libraries" OFF)
+mark_as_advanced (ONLY_SHARED_LIBS)
option (BUILD_STATIC_LIBS "Build Static Libraries" ON)
set (H5_ENABLE_STATIC_LIB NO)
option (BUILD_SHARED_LIBS "Build Shared Libraries" ON)
set (H5_ENABLE_SHARED_LIB NO)
-# ITK --start
-option (ONLY_SHARED_LIBS "Only Build Shared Libraries" ${BUILD_SHARED_LIBS})
-# ITK --stop
-mark_as_advanced (ONLY_SHARED_LIBS)
-if (BUILD_STATIC_LIBS)
- set (H5_ENABLE_STATIC_LIB YES)
-endif ()
-if (BUILD_SHARED_LIBS)
- set (H5_ENABLE_SHARED_LIB YES)
-endif ()
+option (HDF5_BUILD_STATIC_TOOLS "Build Static Tools NOT Shared Tools" OFF)
-# Force only shared libraries if all OFF
-if (NOT BUILD_STATIC_LIBS AND NOT BUILD_SHARED_LIBS)
+# only shared libraries/tools is true if user forces static OFF
+if (NOT BUILD_STATIC_LIBS)
set (ONLY_SHARED_LIBS ON CACHE BOOL "Only Build Shared Libraries" FORCE)
endif ()
+# only shared libraries is set ON by user then force settings
if (ONLY_SHARED_LIBS)
set (H5_ENABLE_STATIC_LIB NO)
- set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries")
+ set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE)
+ set (BUILD_STATIC_LIBS OFF CACHE BOOL "Build Static Libraries" FORCE)
+ if (HDF5_BUILD_STATIC_TOOLS)
+ message (WARNING "Cannot build static tools without static libraries. Building shared tools.")
+ endif ()
+ set (HDF5_BUILD_STATIC_TOOLS OFF CACHE BOOL "Build Static Tools NOT Shared Tools" FORCE)
endif ()
-set (CMAKE_POSITION_INDEPENDENT_CODE ON)
+if (NOT BUILD_SHARED_LIBS AND NOT HDF5_BUILD_STATIC_TOOLS)
+ message (VERBOSE "Cannot build shared tools without shared libraries. Building static tools.")
+ set (HDF5_BUILD_STATIC_TOOLS ON CACHE BOOL "Build Static Tools NOT Shared Tools" FORCE)
+endif ()
-if (NOT BUILD_SHARED_LIBS)
- set (tgt_file_ext "")
-else ()
- set (tgt_file_ext "-shared")
+if (BUILD_STATIC_LIBS)
+ set (H5_ENABLE_STATIC_LIB YES)
endif ()
+if (BUILD_SHARED_LIBS)
+ set (H5_ENABLE_SHARED_LIB YES)
+endif ()
+
+set (CMAKE_POSITION_INDEPENDENT_CODE ON)
#-----------------------------------------------------------------------------
# perl is used in some optional src and tests, check availability
-if (FALSE) # VTK doesn't expose where this is used anyways.
find_package (Perl)
if (PERL_FOUND)
set (H5_PERL_FOUND YES)
endif ()
-endif ()
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
@@ -563,7 +571,6 @@ if (BUILD_STATIC_EXECS)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
endif ()
endif ()
-if (FALSE) # XXX(kitware): Hide settings VTK doesn't need.
option (HDF5_ENABLE_ANALYZER_TOOLS "enable the use of Clang tools" OFF)
mark_as_advanced (HDF5_ENABLE_ANALYZER_TOOLS)
@@ -601,29 +608,6 @@ if (HDF5_ENABLE_COVERAGE)
endif ()
endif ()
-#-----------------------------------------------------------------------------
-# Option to indicate using dmalloc
-#-----------------------------------------------------------------------------
-# option (HDF5_ENABLE_USING_DMALLOC "Indicate that dmalloc is used" OFF)
-# if (HDF5_ENABLE_USING_DMALLOC)
-# find_package (DMALLOC)
-# set (H5_HAVE_DMALLOC DMALLOC_FOUND)
-# endif ()
-
-#-----------------------------------------------------------------------------
-# Option to build documentation
-#-----------------------------------------------------------------------------
-option (HDF5_BUILD_DOC "Build documentation" OFF)
-if (HDF5_BUILD_DOC AND EXISTS "${HDF5_DOXYGEN_DIR}" AND IS_DIRECTORY "${HDF5_DOXYGEN_DIR}")
-# check if Doxygen is installed
- find_package(Doxygen)
- if (DOXYGEN_FOUND)
- message(STATUS "Doxygen version: ${DOXYGEN_VERSION}")
- else ()
- message(STATUS "Doxygen needs to be installed to generate the doxygen documentation")
- endif ()
-endif ()
-
#-----------------------------------------------------------------------------
# Option to indicate using a memory checker
#-----------------------------------------------------------------------------
@@ -632,14 +616,6 @@ if (HDF5_ENABLE_USING_MEMCHECKER)
set (H5_USING_MEMCHECKER 1)
endif ()
-#-----------------------------------------------------------------------------
-# Option to indicate internal memory allocation sanity checks are enabled
-#-----------------------------------------------------------------------------
-option (HDF5_MEMORY_ALLOC_SANITY_CHECK "Indicate that internal memory allocation sanity checks are enabled" OFF)
-if (HDF5_MEMORY_ALLOC_SANITY_CHECK)
- set (H5_MEMORY_ALLOC_SANITY_CHECK 1)
-endif ()
-
#-----------------------------------------------------------------------------
# Option to enable/disable using pread/pwrite for VFDs
#-----------------------------------------------------------------------------
@@ -658,13 +634,6 @@ if (HDF5_ENABLE_DEPRECATED_SYMBOLS)
else ()
set (H5_NO_DEPRECATED_SYMBOLS 1)
endif ()
-else ()
-set(HDF5_ENABLE_COVERAGE OFF)
-set(HDF5_ENABLE_USING_MEMCHECKER OFF)
-set(HDF5_MEMORY_ALLOC_SANITY_CHECK OFF)
-set(HDF5_ENABLE_DEPRECATED_SYMBOLS OFF)
-set(H5_NO_DEPRECATED_SYMBOLS 0)
-endif ()
#-----------------------------------------------------------------------------
# When building utility executables that generate other (source) files :
@@ -675,19 +644,11 @@ endif ()
if (WIN32)
add_compile_definitions (_CRT_SECURE_NO_WARNINGS)
if (MSVC)
- if (TRUE) # XXX(kitware): this is not what we want for VTK.
- add_compile_definitions (_CRT_SECURE_NO_WARNINGS _CONSOLE)
- else ()
- add_compile_definitions (_BIND_TO_CURRENT_VCLIBS_VERSION=1 _CONSOLE)
- endif ()
+ add_compile_definitions (_BIND_TO_CURRENT_VCLIBS_VERSION=1 _CONSOLE)
endif ()
endif ()
-if (FALSE) # XXX(kitware): Hide settings VTK doesn't need.
option (HDF5_MINGW_STATIC_GCC_LIBS "Statically link libgcc/libstdc++" OFF)
-else ()
-set(HDF5_MINGW_STATIC_GCC_LIBS OFF)
-endif ()
if (MSVC)
set (CMAKE_MFC_FLAG 0)
@@ -695,17 +656,6 @@ if (MSVC)
set (WIN_LINK_FLAGS "")
endif ()
-set (MAKE_SYSTEM)
-if (CMAKE_MAKE_PROGRAM MATCHES "make")
- set (MAKE_SYSTEM 1)
-endif ()
-
-set (CFG_INIT "/${CMAKE_CFG_INTDIR}")
-if (MAKE_SYSTEM)
- set (CFG_INIT "")
-endif ()
-
-if (FALSE) # XXX(kitware): Hide settings VTK doesn't need.
# Do not generate test programs by default
option (HDF5_BUILD_GENERATORS "Build Test Generators" OFF)
@@ -714,17 +664,26 @@ option (HDF5_BUILD_GENERATORS "Build Test Generators" OFF)
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_TRACE "Enable API tracing capability" OFF)
mark_as_advanced (HDF5_ENABLE_TRACE)
-if (${HDF_CFG_NAME} MATCHES "Debug")
+if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer")
# Enable instrumenting of the library's internal operations
option (HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF)
+
+ # Instrumenting is enabled by default for parallel debug builds
+ if (HDF5_ENABLE_PARALLEL)
+ set (HDF5_ENABLE_INSTRUMENT ON CACHE BOOL "Instrument The library" FORCE)
+ endif ()
+
if (HDF5_ENABLE_INSTRUMENT)
set (H5_HAVE_INSTRUMENTED_LIBRARY 1)
endif ()
mark_as_advanced (HDF5_ENABLE_INSTRUMENT)
endif ()
-else ()
-set(HDF5_BUILD_GENERATORS OFF)
-set(HDF5_ENABLE_TRACE OFF)
+
+#-----------------------------------------------------------------------------
+# Add some definitions for Developer Builds
+#-----------------------------------------------------------------------------
+if (${HDF_CFG_NAME} MATCHES "Developer")
+ include (${HDF_RESOURCES_DIR}/HDF5DeveloperBuild.cmake)
endif ()
#-----------------------------------------------------------------------------
@@ -733,27 +692,19 @@ endif ()
if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
set (H5_HAVE_EMBEDDED_LIBINFO 0)
else ()
- if (FALSE) # XXX(kitware): Hardcode settings.
- option (HDF5_ENABLE_EMBEDDED_LIBINFO "embed library info into executables" ON)
+ option (HDF5_ENABLE_EMBEDDED_LIBINFO "Embed library info into executables" ON)
if (HDF5_ENABLE_EMBEDDED_LIBINFO)
set (H5_HAVE_EMBEDDED_LIBINFO 1)
endif ()
- else ()
- set(HDF5_ENABLE_EMBEDDED_LIBINFO 1)
- endif ()
endif ()
include (${HDF_RESOURCES_DIR}/HDFCompilerFlags.cmake)
-set (CMAKE_MODULE_PATH ${HDF_RESOURCES_DIR} ${HDF_RESOURCES_EXT_DIR} ${CMAKE_MODULE_PATH})
+set (CMAKE_MODULE_PATH ${HDF_RESOURCES_DIR} ${CMAKE_MODULE_PATH})
#-----------------------------------------------------------------------------
# Option to Enable HDFS
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_ENABLE_HDFS "Enable HDFS" OFF)
-else ()
-set(HDF5_ENABLE_HDFS OFF)
-endif ()
if (HDF5_ENABLE_HDFS)
find_package(JNI REQUIRED)
if (JNI_FOUND)
@@ -767,6 +718,7 @@ if (HDF5_ENABLE_HDFS)
list (APPEND LINK_LIBS -pthread)
endif ()
else ()
+ set (HDF5_ENABLE_HDFS OFF CACHE BOOL "Enable HDFS" FORCE)
message (FATAL_ERROR "Set to use libhdfs library, but could not find or use libhdfs. Please verify that the path to HADOOP_HOME is valid, and/or reconfigure without HDF5_ENABLE_HDFS")
endif ()
endif ()
@@ -774,13 +726,17 @@ endif ()
#-----------------------------------------------------------------------------
# Option to Enable MPI Parallel
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF)
if (HDF5_ENABLE_PARALLEL)
find_package(MPI REQUIRED)
if (MPI_C_FOUND)
set (H5_HAVE_PARALLEL 1)
- if (FALSE) # XXX(kitware): VTK doesn't need Fortran support.
+
+ # Require MPI standard 3.0 and greater
+ if (MPI_VERSION LESS 3)
+ message (FATAL_ERROR "HDF5 requires MPI standard 3.0 or greater")
+ endif ()
+
# MPI checks, only do these if MPI_C_FOUND is true, otherwise they always fail
# and once set, they are cached as false and not regenerated
set (CMAKE_REQUIRED_LIBRARIES "${MPI_C_LIBRARIES}")
@@ -788,14 +744,17 @@ if (HDF5_ENABLE_PARALLEL)
# Used by Fortran + MPI
CHECK_SYMBOL_EXISTS (MPI_Comm_c2f "mpi.h" H5_HAVE_MPI_MULTI_LANG_Comm)
CHECK_SYMBOL_EXISTS (MPI_Info_c2f "mpi.h" H5_HAVE_MPI_MULTI_LANG_Info)
- endif ()
# Used by Parallel Compression feature
set (PARALLEL_FILTERED_WRITES ON)
- CHECK_SYMBOL_EXISTS (MPI_Mprobe "mpi.h" H5_HAVE_MPI_Mprobe)
- CHECK_SYMBOL_EXISTS (MPI_Imrecv "mpi.h" H5_HAVE_MPI_Imrecv)
- if (NOT H5_HAVE_MPI_Mprobe OR NOT H5_HAVE_MPI_Imrecv)
- message (WARNING "The MPI_Mprobe and/or MPI_Imrecv functions could not be located.
+ CHECK_SYMBOL_EXISTS (MPI_Ibarrier "mpi.h" H5_HAVE_MPI_Ibarrier)
+ CHECK_SYMBOL_EXISTS (MPI_Issend "mpi.h" H5_HAVE_MPI_Issend)
+ CHECK_SYMBOL_EXISTS (MPI_Iprobe "mpi.h" H5_HAVE_MPI_Iprobe)
+ CHECK_SYMBOL_EXISTS (MPI_Irecv "mpi.h" H5_HAVE_MPI_Irecv)
+ if (H5_HAVE_MPI_Ibarrier AND H5_HAVE_MPI_Issend AND H5_HAVE_MPI_Iprobe AND H5_HAVE_MPI_Irecv)
+ set (H5_HAVE_PARALLEL_FILTERED_WRITES 1)
+ else ()
+ message (WARNING "The MPI_Ibarrier/MPI_Issend/MPI_Iprobe/MPI_Irecv functions could not be located.
Parallel writes of filtered data will be disabled.")
set (PARALLEL_FILTERED_WRITES OFF)
endif ()
@@ -821,14 +780,81 @@ if (H5_HAVE_PARALLEL)
set (CMAKE_EXE_LINKER_FLAGS "${MPI_C_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
endif ()
endif ()
-else ()
-set(HDF5_ENABLE_PARALLEL OFF)
-endif ()
-if (FALSE) # XXX(kitware): Hardcode settings.
-#option (DEFAULT_API_VERSION "Enable v1.12 API (v16, v18, v110, v112)" "v112")
-set (DEFAULT_API_VERSION "v112" CACHE STRING "Enable v1.12 API (v16, v18, v110, v112)")
-set_property (CACHE DEFAULT_API_VERSION PROPERTY STRINGS v16 v18 v110 v112)
+# Determine whether to build the HDF5 Subfiling VFD
+set (H5FD_SUBFILING_DIR ${HDF5_SRC_DIR}/H5FDsubfiling)
+set (HDF5_SRC_INCLUDE_DIRS
+ ${HDF5_SRC_INCLUDE_DIRS}
+ ${H5FD_SUBFILING_DIR}
+)
+option (HDF5_ENABLE_SUBFILING_VFD "Build Parallel HDF5 Subfiling VFD" OFF)
+if (HDF5_ENABLE_SUBFILING_VFD)
+ if (WIN32)
+ message (FATAL_ERROR " **** Subfiling is not supported on Windows **** ")
+ endif ()
+ if (NOT HDF5_ENABLE_PARALLEL)
+ message (FATAL_ERROR "Subfiling VFD requires a parallel HDF5 build")
+ else ()
+ # Check for MPI_Comm_split_type
+ CHECK_SYMBOL_EXISTS (MPI_Comm_split_type "mpi.h" H5_HAVE_MPI_Comm_split_type)
+ if (NOT H5_HAVE_MPI_Comm_split_type)
+ message (FATAL_ERROR "Subfiling VFD requires MPI-3 support for MPI_Comm_split_type")
+ endif ()
+ endif ()
+
+ if (NOT DEFINED Threads_FOUND)
+ set (THREADS_PREFER_PTHREAD_FLAG ON)
+ find_package (Threads REQUIRED)
+ endif ()
+
+ # For now, make sure we're using pthreads. Once Subfiling can be
+ # supported on Windows, we should allow Win32 threads as well
+ if (NOT ${Threads_FOUND} OR NOT ${CMAKE_USE_PTHREADS_INIT})
+ message (FATAL_ERROR "Subfiling requires pthreads for system thread library")
+ endif ()
+
+ CHECK_INCLUDE_FILE("stdatomic.h" HAVE_STDATOMIC_H)
+ if (NOT HAVE_STDATOMIC_H)
+ message (FATAL_ERROR "Subfiling VFD requires atomic operations support. C11 stdatomic.h NOT available.")
+ else()
+ set (H5_HAVE_STDATOMIC_H 1)
+ endif()
+
+ set (H5_HAVE_SUBFILING_VFD 1)
+ # IOC VFD is currently only built when subfiling is enabled
+ set (H5_HAVE_IOC_VFD 1)
+
+ message (STATUS "Setting up to use Mercury components")
+ set (H5FD_SUBFILING_MERCURY_DIR ${H5FD_SUBFILING_DIR}/mercury/src/util)
+ set (HDF5_SRC_INCLUDE_DIRS
+ ${HDF5_SRC_INCLUDE_DIRS}
+ ${H5FD_SUBFILING_MERCURY_DIR}
+ )
+ set (CMAKE_REQUIRED_INCLUDES "${H5FD_SUBFILING_MERCURY_DIR}")
+
+ # Run some configure checks for the Mercury util files
+ set (CMAKE_EXTRA_INCLUDE_FILES pthread.h)
+ set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+
+ check_type_size(PTHREAD_MUTEX_ADAPTIVE_NP PTHREAD_MUTEX_ADAPTIVE_NP_SIZE)
+ if (HAVE_PTHREAD_MUTEX_ADAPTIVE_NP_SIZE)
+ set (${HDF_PREFIX}_HAVE_PTHREAD_MUTEX_ADAPTIVE_NP 1)
+ endif ()
+
+ check_symbol_exists(pthread_condattr_setclock pthread.h
+ ${HDF_PREFIX}_HAVE_PTHREAD_CONDATTR_SETCLOCK)
+
+ unset (CMAKE_EXTRA_INCLUDE_FILES)
+ unset (CMAKE_REQUIRED_LIBRARIES)
+ if(NOT H5_HAVE_SUBFILING_VFD EQUAL 1)
+ set (HDF5_ENABLE_SUBFILING_VFD OFF CACHE BOOL "Build Parallel HDF5 Subfiling VFD" FORCE)
+ endif()
+endif()
+
+#option (DEFAULT_API_VERSION "Enable v1.14 API (v16, v18, v110, v112, v114)" "v114")
+set (DEFAULT_API_VERSION "v114" CACHE STRING "Enable v1.14 API (v16, v18, v110, v112, v114)")
+set_property (CACHE DEFAULT_API_VERSION PROPERTY STRINGS v16 v18 v110 v112 v114)
+
#-----------------------------------------------------------------------------
# Option to use 1.6.x API
#-----------------------------------------------------------------------------
@@ -856,19 +882,20 @@ endif ()
#-----------------------------------------------------------------------------
# Option to use 1.12.x API
#-----------------------------------------------------------------------------
-if (NOT DEFAULT_API_VERSION)
- set (DEFAULT_API_VERSION "v112")
-endif ()
set (H5_USE_112_API_DEFAULT 0)
if (DEFAULT_API_VERSION MATCHES "v112")
set (H5_USE_112_API_DEFAULT 1)
endif ()
-else ()
-set (H5_USE_16_API_DEFAULT 0)
-set (H5_USE_18_API_DEFAULT 0)
-set (H5_USE_110_API_DEFAULT 0)
-set (H5_USE_112_API_DEFAULT 0)
-set (DEFAULT_API_VERSION "v112")
+
+#-----------------------------------------------------------------------------
+# Option to use 1.14.x API
+#-----------------------------------------------------------------------------
+if (NOT DEFAULT_API_VERSION)
+ set (DEFAULT_API_VERSION "v114")
+endif ()
+set (H5_USE_114_API_DEFAULT 0)
+if (DEFAULT_API_VERSION MATCHES "v114")
+ set (H5_USE_114_API_DEFAULT 1)
endif ()
#-----------------------------------------------------------------------------
@@ -881,7 +908,11 @@ include (UserMacros.cmake)
#-----------------------------------------------------------------------------
include (CMakeFilters.cmake)
-if (FALSE) # XXX(kitware): Disable packaging.
+#-----------------------------------------------------------------------------
+# Include external VOL connectors
+#-----------------------------------------------------------------------------
+include (CMakeVOL.cmake)
+
#-----------------------------------------------------------------------------
# Option for external libraries on windows
#-----------------------------------------------------------------------------
@@ -889,13 +920,6 @@ option (HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF)
if (NOT HDF5_EXTERNALLY_CONFIGURED)
if (HDF5_PACKAGE_EXTLIBS)
set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
- if (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
- PACKAGE_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
- endif ()
-
- if (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
- PACKAGE_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
- endif ()
endif ()
endif ()
@@ -906,51 +930,33 @@ option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF)
if (HDF5_ENABLE_THREADSAFE)
# check for unsupported options
if (WIN32)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE " **** thread-safety option not supported with static library **** ")
- message (VERBOSE " **** thread-safety option will not be used building static library **** ")
- endif ()
- endif ()
- if (HDF5_ENABLE_PARALLEL)
- if (NOT ALLOW_UNSUPPORTED)
- message (FATAL_ERROR " **** parallel and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ")
- else ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE " **** Allowing unsupported parallel and thread-safety options **** ")
- endif ()
+ if (BUILD_STATIC_LIBS)
+ message (FATAL_ERROR " **** thread-safety option not supported with static library **** ")
endif ()
endif ()
if (HDF5_BUILD_FORTRAN)
if (NOT ALLOW_UNSUPPORTED)
message (FATAL_ERROR " **** Fortran and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ")
else ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE " **** Allowing unsupported Fortran and thread-safety options **** ")
- endif ()
+ message (VERBOSE " **** Allowing unsupported Fortran and thread-safety options **** ")
endif ()
endif ()
if (HDF5_BUILD_CPP_LIB)
if (NOT ALLOW_UNSUPPORTED)
message (FATAL_ERROR " **** C++ and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ")
else ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE " **** Allowing unsupported C++ and thread-safety options **** ")
- endif ()
+ message (VERBOSE " **** Allowing unsupported C++ and thread-safety options **** ")
endif ()
endif ()
if (HDF5_BUILD_HL_LIB)
if (NOT ALLOW_UNSUPPORTED)
message (FATAL_ERROR " **** HL and thread-safety options are not supported, override with ALLOW_UNSUPPORTED option **** ")
else ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE " **** Allowing unsupported HL and thread-safety options **** ")
- endif ()
+ message (VERBOSE " **** Allowing unsupported HL and thread-safety options **** ")
endif ()
endif ()
- if (H5_HAVE_IOEO)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ")
- endif ()
+ if (WIN32)
+ # When Win32 is available, we use those threads
set (H5_HAVE_WIN_THREADS 1)
else ()
if (NOT H5_HAVE_PTHREAD_H)
@@ -963,20 +969,15 @@ if (HDF5_ENABLE_THREADSAFE)
set (H5_HAVE_THREADSAFE 1)
endif ()
endif ()
-else ()
-set(HDF5_ENABLE_THREADSAFE OFF)
-endif ()
#-----------------------------------------------------------------------------
# Option to build the map API
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_ENABLE_MAP_API "Build the map API" OFF)
-else ()
-set (HDF5_ENABLE_MAP_API OFF)
-endif ()
if (HDF5_ENABLE_MAP_API)
set (H5_HAVE_MAP_API 1)
+else ()
+ set (HDF5_ENABLE_MAP_API OFF CACHE BOOL "Build the map API" FORCE)
endif ()
#-----------------------------------------------------------------------------
@@ -984,123 +985,84 @@ endif ()
#-----------------------------------------------------------------------------
add_subdirectory (src)
-if (FALSE) # XXX(kitware): Hardcode settings.
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- if (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
- if (NOT ONLY_SHARED_LIBS)
- add_dependencies (${HDF5_LIB_TARGET} ZLIB)
+ if ((H5_ZLIB_FOUND AND ZLIB_USE_EXTERNAL) OR (H5_SZIP_FOUND AND SZIP_USE_EXTERNAL))
+ if (BUILD_STATIC_LIBS)
+ add_dependencies (${HDF5_LIB_TARGET} ${LINK_COMP_LIBS})
endif ()
if (BUILD_SHARED_LIBS)
- add_dependencies (${HDF5_LIBSH_TARGET} ZLIB)
+ add_dependencies (${HDF5_LIBSH_TARGET} ${LINK_COMP_LIBS})
endif ()
endif ()
- if (SZIP_FOUND AND SZIP_USE_EXTERNAL)
- if (NOT ONLY_SHARED_LIBS)
- add_dependencies (${HDF5_LIB_TARGET} SZIP)
- endif ()
- if (BUILD_SHARED_LIBS)
- add_dependencies (${HDF5_LIBSH_TARGET} SZIP)
+endif ()
+
+#-----------------------------------------------------------------------------
+# Option to build documentation
+#-----------------------------------------------------------------------------
+option (HDF5_BUILD_DOC "Build documentation" OFF)
+if (HDF5_BUILD_DOC AND EXISTS "${HDF5_DOXYGEN_DIR}" AND IS_DIRECTORY "${HDF5_DOXYGEN_DIR}")
+# check if Doxygen is installed
+ find_package(Doxygen)
+ if (DOXYGEN_FOUND)
+ option (HDF5_ENABLE_DOXY_WARNINGS "Enable fail if doxygen parsing has warnings." OFF)
+ mark_as_advanced (HDF5_ENABLE_DOXY_WARNINGS)
+ if (HDF5_ENABLE_DOXY_WARNINGS)
+ set (HDF5_DOXY_WARNINGS "FAIL_ON_WARNINGS")
+ else ()
+ set (HDF5_DOXY_WARNINGS "NO")
endif ()
+ message(STATUS "Doxygen version: ${DOXYGEN_VERSION}")
+ add_subdirectory (doxygen)
+ else ()
+ message(STATUS "Doxygen needs to be installed to generate the doxygen documentation")
endif ()
endif ()
-endif ()
-if (FALSE) # XXX(kitware): Disable testing of HDF5.
#-----------------------------------------------------------------------------
# Dashboard and Testing Settings
#-----------------------------------------------------------------------------
option (BUILD_TESTING "Build HDF5 Unit Testing" ON)
if (BUILD_TESTING)
- set (DART_TESTING_TIMEOUT 1200
- CACHE STRING
- "Timeout in seconds for each test (default 1200=20minutes)"
- )
-
- # Generate a list of timeouts based on DART_TESTING_TIMEOUT
- math (EXPR CTEST_SHORT_TIMEOUT "${DART_TESTING_TIMEOUT} / 2")
- math (EXPR CTEST_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 2")
- math (EXPR CTEST_VERY_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 3")
-
- option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF)
- mark_as_advanced (HDF5_TEST_VFD)
- if (HDF5_TEST_VFD)
- option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON)
- mark_as_advanced (HDF5_TEST_FHEAP_VFD)
- endif ()
-
- option (HDF5_TEST_PASSTHROUGH_VOL "Execute tests with different passthrough VOL connectors" OFF)
- mark_as_advanced (HDF5_TEST_PASSTHROUGH_VOL)
- if (HDF5_TEST_PASSTHROUGH_VOL)
- option (HDF5_TEST_FHEAP_PASSTHROUGH_VOL "Execute fheap test with different passthrough VOL connectors" ON)
- mark_as_advanced (HDF5_TEST_FHEAP_PASSTHROUGH VOL)
- endif ()
-
- option (HDF_TEST_EXPRESS "Control testing framework (0-3)" "0")
- mark_as_advanced (HDF_TEST_EXPRESS)
-
- enable_testing ()
- include (CTest)
-
- include (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
- configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
-
- option (HDF5_TEST_SERIAL "Execute non-parallel tests" ON)
- mark_as_advanced (HDF5_TEST_SERIAL)
-
- option (HDF5_TEST_TOOLS "Execute tools tests" ON)
- mark_as_advanced (HDF5_TEST_TOOLS)
-
- option (HDF5_TEST_EXAMPLES "Execute tests on examples" ON)
- mark_as_advanced (HDF5_TEST_EXAMPLES)
-
- option (HDF5_TEST_SWMR "Execute SWMR tests" ON)
- mark_as_advanced (HDF5_TEST_SWMR)
-
- option (HDF5_TEST_PARALLEL "Execute parallel tests" ON)
- mark_as_advanced (HDF5_TEST_PARALLEL)
-
- option (HDF5_TEST_FORTRAN "Execute fortran tests" ON)
- mark_as_advanced (HDF5_TEST_FORTRAN)
-
- option (HDF5_TEST_CPP "Execute cpp tests" ON)
- mark_as_advanced (HDF5_TEST_CPP)
-
- option (HDF5_TEST_JAVA "Execute java tests" ON)
- mark_as_advanced (HDF5_TEST_JAVA)
-
- if (NOT HDF5_EXTERNALLY_CONFIGURED)
- if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test")
- add_subdirectory (test)
- endif ()
- if (H5_HAVE_PARALLEL)
- if (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar")
- add_subdirectory (testpar)
- endif ()
- endif ()
- endif ()
+ include (CMakeTests.cmake)
endif ()
#-----------------------------------------------------------------------------
# Option to build HDF5 Utilities
#-----------------------------------------------------------------------------
if (EXISTS "${HDF5_SOURCE_DIR}/utils" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/utils")
- option (HDF5_BUILD_UTILS "Build HDF5 Utils" ON)
- if (HDF5_BUILD_UTILS)
- add_subdirectory (utils)
+ option (HDF5_BUILD_PARALLEL_TOOLS "Build Parallel HDF5 Tools" OFF)
+ if (HDF5_BUILD_PARALLEL_TOOLS AND HDF5_ENABLE_PARALLEL)
+ set (CMAKE_PREFIX_PATH "$HDF_RESOURCES_DIR")
+ find_package(MFU REQUIRED)
+ if (MFU_FOUND)
+ message(STATUS "LL_PATH=${LL_PATH}")
+ set (H5_HAVE_LIBMFU 1)
+ set (H5_HAVE_MFU_H 1)
+ set (CMAKE_REQUIRED_INCLUDES "${MFU_INCLUDE_DIR}")
+ set (MFU_LIBRARY_DEBUG "$MFU_LIBRARY")
+ set (MFU_LIBRARY_RELEASE "$MFU_LIBRARY")
+ endif ()
+ find_package(CIRCLE REQUIRED)
+ if (CIRCLE_FOUND)
+ set (H5_HAVE_LIBCIRCLE 1)
+ set (H5_HAVE_CIRCLE_H 1)
+ set (CMAKE_REQUIRED_INCLUDES "${CIRCLE_INCLUDE_DIR}")
+ endif ()
+ find_package(DTCMP REQUIRED)
+ if (DTCMP_FOUND)
+ set (H5_HAVE_LIBDTCMP 1)
+ set (H5_HAVE_DTCMP_H 1)
+ set (CMAKE_REQUIRED_INCLUDES "${DTCMP_INCLUDE_DIR}")
+ endif ()
endif ()
+ add_subdirectory (utils)
endif ()
-endif () # end IF (FALSE) # XXX(kitware)
-
#-----------------------------------------------------------------------------
# Option to build HDF5 Tools
#-----------------------------------------------------------------------------
if (EXISTS "${HDF5_SOURCE_DIR}/tools" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/tools")
- if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_BUILD_TOOLS "Build HDF5 Tools" ON)
- else ()
- set(HDF5_BUILD_TOOLS OFF)
- endif ()
if (HDF5_BUILD_TOOLS)
add_subdirectory (tools)
endif ()
@@ -1109,29 +1071,20 @@ endif ()
#-----------------------------------------------------------------------------
# Include filter plugins
#-----------------------------------------------------------------------------
-include (CMakePlugins.cmake)
+if (${H5_LIBVER_DIR} EQUAL 16 OR DEFAULT_API_VERSION MATCHES "v16")
+ set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE BOOL "" FORCE)
+ message (VERBOSE "Filter PLUGINs cannot be used with 1.6 API")
+else ()
+ include (CMakePlugins.cmake)
-if (HDF5_PACKAGE_EXTLIBS AND NOT HDF5_NO_PACKAGES)
- if (HDF5_ENABLE_PLUGIN_SUPPORT AND PLUGIN_FOUND)
- PACKAGE_PLUGIN_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
-# option (HDF5_TEST_PLUGIN "Execute plugin tests" ON)
-# mark_as_advanced (HDF5_TEST_PLUGIN)
+ if (HDF5_PACKAGE_EXTLIBS AND NOT HDF5_NO_PACKAGES)
+ if (HDF5_ENABLE_PLUGIN_SUPPORT AND PLUGIN_FOUND)
+ PACKAGE_PLUGIN_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
+# option (HDF5_TEST_PLUGIN "Execute plugin tests" ON)
+# mark_as_advanced (HDF5_TEST_PLUGIN)
-# TEST_PLUGIN_LIBRARY ()
- endif ()
-endif ()
-
-#-----------------------------------------------------------------------------
-# Option to build examples
-#-----------------------------------------------------------------------------
-if (EXISTS "${HDF5_SOURCE_DIR}/examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/examples")
- if (FALSE) # XXX(kitware): Hardcode settings.
- option (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" ON)
- else ()
- set(HDF5_BUILD_EXAMPLES OFF)
- endif ()
- if (HDF5_BUILD_EXAMPLES)
- add_subdirectory (examples)
+# TEST_PLUGIN_LIBRARY ()
+ endif ()
endif ()
endif ()
@@ -1139,11 +1092,7 @@ endif ()
# Option to build High Level API's
#-----------------------------------------------------------------------------
if (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
- if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_BUILD_HL_LIB "Build HIGH Level HDF5 Library" ON)
- else ()
- set(HDF5_BUILD_HL_LIB ON)
- endif ()
if (HDF5_BUILD_HL_LIB)
set (H5_INCLUDE_HL 1)
add_subdirectory (hl)
@@ -1151,22 +1100,17 @@ if (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
endif ()
#-----------------------------------------------------------------------------
-# Option to build Fortran bindings/tests/examples
+# Option to build Fortran bindings/tests
# Make sure this appears before the CONFIGURE_FILE step
# so that fortran name mangling is detected before writing H5pubconf.h
#-----------------------------------------------------------------------------
# Set default name mangling : overridden by Fortran detection in fortran dir
set (H5_FC_FUNC "H5_FC_FUNC(name,NAME) name ## _")
set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) name ## _")
-# XXX(kitware): VTK doesn't need Fortran support.
-if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran" AND FALSE)
+if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/fortran")
option (HDF5_BUILD_FORTRAN "Build FORTRAN support" OFF)
if (HDF5_BUILD_FORTRAN)
- include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake)
-
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}")
- endif ()
+ message (VERBOSE "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}")
include (${HDF_RESOURCES_DIR}/HDFFortranCompilerFlags.cmake)
include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake)
set (LINK_Fortran_LIBS ${LINK_LIBS})
@@ -1177,10 +1121,18 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
# Parallel IO usage requires MPI to be Linked and Included
if (H5_HAVE_PARALLEL)
+ find_package(MPI REQUIRED COMPONENTS Fortran)
set (LINK_Fortran_LIBS ${LINK_Fortran_LIBS} ${MPI_Fortran_LIBRARIES})
if (MPI_Fortran_LINK_FLAGS)
set (CMAKE_Fortran_EXE_LINKER_FLAGS "${MPI_Fortran_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")
endif ()
+ # Check if MPI-3 Fortran 2008 module mpi_f08 is supported
+ if (MPI_Fortran_HAVE_F08_MODULE)
+ set (H5_HAVE_MPI_F08 1)
+ message (VERBOSE "MPI-3 Fortran 2008 module mpi_f08 is supported")
+ else ()
+ message (VERBOSE "MPI-3 Fortran 2008 module mpi_f08 is NOT supported")
+ endif ()
endif ()
#option (HDF5_INSTALL_MOD_FORTRAN "Copy FORTRAN mod files to include directory (NO SHARED STATIC)" "NO")
@@ -1215,13 +1167,10 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
if (NOT ALLOW_UNSUPPORTED)
message (FATAL_ERROR " **** Parallel and C++ options are mutually exclusive, override with ALLOW_UNSUPPORTED option **** ")
else ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE " **** Allowing unsupported Parallel and C++ options **** ")
- endif ()
+ message (VERBOSE " **** Allowing unsupported Parallel and C++ options **** ")
endif ()
endif ()
- include (${HDF_RESOURCES_EXT_DIR}/HDFUseCXX.cmake)
include (${HDF_RESOURCES_DIR}/HDFCXXCompilerFlags.cmake)
add_subdirectory (c++)
@@ -1234,47 +1183,35 @@ if (EXISTS "${HDF5_SOURCE_DIR}/c++" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/c++")
endif ()
endif ()
-#-----------------------------------------------------------------------------
-# Check if Fortran's default real is double precision. If it is and HL is
-# being built then configure should fail due to bug HDFFV-889.
-#-----------------------------------------------------------------------------
-if (HDF5_BUILD_FORTRAN AND HDF5_BUILD_HL_LIB)
- if (NOT H5_FORTRAN_DEFAULT_REAL_NOT_DOUBLE)
- message (FATAL_ERROR " **** Fortran high-level routines are not supported when the default REAL is DOUBLE PRECISION, use HDF5_BUILD_HL_LIB:BOOL=OFF **** ")
- endif ()
-endif ()
-
#-----------------------------------------------------------------------------
# Option to build HDF5 Java Library
#-----------------------------------------------------------------------------
-# XXX(kitware): VTK doesn't need Java support.
-if (EXISTS "${HDF5_SOURCE_DIR}/java" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/java" AND FALSE)
+if (EXISTS "${HDF5_SOURCE_DIR}/java" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/java")
option (HDF5_BUILD_JAVA "Build Java HDF5 Library" OFF)
if (HDF5_BUILD_JAVA)
- add_subdirectory (java)
+ if (NOT BUILD_SHARED_LIBS)
+ message (FATAL_ERROR "\nJava requires shared libraries!\n")
+ else ()
+ add_subdirectory (java)
+ endif ()
endif ()
endif ()
-# XXX(kitware): needed for various headers.
-set(H5_STDC_HEADERS 1)
-if (NOT WIN32)
- set(H5_TIME_WITH_SYS_TIME 1)
-endif ()
-
#-----------------------------------------------------------------------------
# Generate the H5pubconf.h file containing user settings needed by compilation
#-----------------------------------------------------------------------------
configure_file (${HDF_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_SRC_BINARY_DIR}/H5pubconf.h @ONLY)
#-----------------------------------------------------------------------------
-# Options for use by cross compiling and toolchains
+# Option to build examples
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
-option (HDF5_USE_PREGEN "Use pre-generated Files" OFF)
-option (HDF5_BATCH_H5DETECT "Use a batch command for running h5detect" OFF)
-else ()
-set(HDF5_USE_PREGEN OFF)
-set(HDF5_BATCH_H5DETECT OFF)
+if (EXISTS "${HDF5_SOURCE_DIR}/HDF5Examples" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/HDF5Examples")
+ option (HDF5_BUILD_EXAMPLES "Build HDF5 Library Examples" ON)
+ if (HDF5_BUILD_EXAMPLES AND NOT USE_SANITIZER)
+ include (${HDF_RESOURCES_DIR}/HDF5ExampleCache.cmake)
+ set (HDF5_VERSION ${HDF5_PACKAGE_VERSION})
+ add_subdirectory (HDF5Examples)
+ endif ()
endif ()
include (CMakeInstallation.cmake)
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakePlugins.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakePlugins.cmake
index 24f8bf153ac..c6ff4f6356e 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakePlugins.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakePlugins.cmake
@@ -11,13 +11,9 @@
#
include (ExternalProject)
-if (FALSE) # XXX(kitware): Hardcode settings.
-#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO")
+option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO")
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)")
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
-else ()
-set(HDF5_ALLOW_EXTERNAL_SUPPORT "NO")
-endif ()
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
option (PLUGIN_USE_EXTERNAL "Use External Library Building for filter PLUGIN" 1)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
@@ -40,11 +36,7 @@ endif ()
#-----------------------------------------------------------------------------
# Option for PLUGIN support
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_ENABLE_PLUGIN_SUPPORT "Enable PLUGIN Filters" OFF)
-else ()
-set(HDF5_ENABLE_PLUGIN_SUPPORT OFF)
-endif ()
if (HDF5_ENABLE_PLUGIN_SUPPORT)
if (NOT PLUGIN_USE_EXTERNAL)
find_package (PLUGIN NAMES ${PLUGIN_PACKAGE_NAME}${HDF_PACKAGE_EXT})
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeTests.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeTests.cmake
new file mode 100644
index 00000000000..66199010680
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeTests.cmake
@@ -0,0 +1,112 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+#-----------------------------------------------------------------------------
+# Dashboard and Testing Settings
+#-----------------------------------------------------------------------------
+ set (DART_TESTING_TIMEOUT 1200
+ CACHE STRING
+ "Timeout in seconds for each test (default 1200=20minutes)"
+ )
+
+ # Generate a list of timeouts based on DART_TESTING_TIMEOUT
+ math (EXPR CTEST_SHORT_TIMEOUT "${DART_TESTING_TIMEOUT} / 2")
+ math (EXPR CTEST_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 2")
+ math (EXPR CTEST_VERY_LONG_TIMEOUT "${DART_TESTING_TIMEOUT} * 3")
+
+ option (HDF5_DISABLE_TESTS_REGEX "Regex pattern to set execution of specific tests to DISABLED" "")
+ mark_as_advanced (HDF5_DISABLE_TESTS_REGEX)
+
+ option (HDF5_TEST_API "Execute HDF5 API tests" OFF)
+ mark_as_advanced (HDF5_TEST_API)
+ if (HDF5_TEST_API)
+ option (HDF5_TEST_API_INSTALL "Install HDF5 API tests" OFF)
+ mark_as_advanced (HDF5_TEST_API_INSTALL)
+
+ # Enable HDF5 Async API tests
+ option (HDF5_TEST_API_ENABLE_ASYNC "Enable HDF5 Async API tests" OFF)
+ mark_as_advanced (HDF5_TEST_API_ENABLE_ASYNC)
+
+ # Build and use HDF5 test driver program for API tests
+ option (HDF5_TEST_API_ENABLE_DRIVER "Enable HDF5 API test driver program" OFF)
+ mark_as_advanced (HDF5_TEST_API_ENABLE_DRIVER)
+ if (HDF5_TEST_API_ENABLE_DRIVER)
+ set (HDF5_TEST_API_SERVER "" CACHE STRING "Server executable for running API tests")
+ mark_as_advanced (HDF5_TEST_API_SERVER)
+ endif ()
+ endif ()
+
+ option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF)
+ mark_as_advanced (HDF5_TEST_VFD)
+ if (HDF5_TEST_VFD)
+ option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON)
+ mark_as_advanced (HDF5_TEST_FHEAP_VFD)
+
+ # Initialize the list of VFDs to be used for testing and create a test folder for each VFD
+ H5_SET_VFD_LIST()
+ endif ()
+
+ option (HDF5_TEST_PASSTHROUGH_VOL "Execute tests with different passthrough VOL connectors" OFF)
+ mark_as_advanced (HDF5_TEST_PASSTHROUGH_VOL)
+ if (HDF5_TEST_PASSTHROUGH_VOL)
+ option (HDF5_TEST_FHEAP_PASSTHROUGH_VOL "Execute fheap test with different passthrough VOL connectors" ON)
+ mark_as_advanced (HDF5_TEST_FHEAP_PASSTHROUGH VOL)
+ endif ()
+
+ set (H5_TEST_EXPRESS_LEVEL_DEFAULT "3")
+ set (HDF_TEST_EXPRESS "${H5_TEST_EXPRESS_LEVEL_DEFAULT}"
+ CACHE STRING "Control testing framework (0-3) (0 = exhaustive testing; 3 = quicker testing)")
+ mark_as_advanced (HDF_TEST_EXPRESS)
+ if (NOT "${HDF_TEST_EXPRESS}" STREQUAL "")
+ set (H5_TEST_EXPRESS_LEVEL_DEFAULT "${HDF_TEST_EXPRESS}")
+ endif ()
+
+ enable_testing ()
+ include (CTest)
+
+ include (${HDF5_SOURCE_DIR}/CTestConfig.cmake)
+ configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY)
+
+ option (HDF5_TEST_SERIAL "Execute non-parallel tests" ON)
+ mark_as_advanced (HDF5_TEST_SERIAL)
+
+ option (HDF5_TEST_TOOLS "Execute tools tests" ON)
+ mark_as_advanced (HDF5_TEST_TOOLS)
+
+ option (HDF5_TEST_EXAMPLES "Execute tests on examples" ON)
+ mark_as_advanced (HDF5_TEST_EXAMPLES)
+
+ option (HDF5_TEST_SWMR "Execute SWMR tests" ON)
+ mark_as_advanced (HDF5_TEST_SWMR)
+
+ option (HDF5_TEST_PARALLEL "Execute parallel tests" ON)
+ mark_as_advanced (HDF5_TEST_PARALLEL)
+
+ option (HDF5_TEST_FORTRAN "Execute fortran tests" ON)
+ mark_as_advanced (HDF5_TEST_FORTRAN)
+
+ option (HDF5_TEST_CPP "Execute cpp tests" ON)
+ mark_as_advanced (HDF5_TEST_CPP)
+
+ option (HDF5_TEST_JAVA "Execute java tests" ON)
+ mark_as_advanced (HDF5_TEST_JAVA)
+
+ if (NOT HDF5_EXTERNALLY_CONFIGURED)
+ if (EXISTS "${HDF5_TEST_SRC_DIR}" AND IS_DIRECTORY "${HDF5_TEST_SRC_DIR}")
+ add_subdirectory (test)
+ endif ()
+ if (H5_HAVE_PARALLEL)
+ if (EXISTS "${HDF5_TEST_PAR_DIR}" AND IS_DIRECTORY "${HDF5_TEST_PAR_DIR}")
+ add_subdirectory (testpar)
+ endif ()
+ endif ()
+ endif ()
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeVOL.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeVOL.cmake
new file mode 100644
index 00000000000..a6bd3b4adca
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/CMakeVOL.cmake
@@ -0,0 +1,310 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+include (FetchContent)
+
+# Function to retrieve all of the CMake targets generated
+# in a directory and all its subdirectories
+function (get_generated_cmake_targets out_var dir)
+ get_directory_property (dir_targets DIRECTORY "${dir}" BUILDSYSTEM_TARGETS)
+ get_directory_property (dir_subdirs DIRECTORY "${dir}" SUBDIRECTORIES)
+
+ foreach (subdir ${dir_subdirs})
+ get_generated_cmake_targets(subdir_targets "${subdir}")
+ list (APPEND dir_targets "${subdir_targets}")
+ endforeach()
+
+ set (${out_var} "${dir_targets}" PARENT_SCOPE)
+endfunction ()
+
+# Function to apply connector-specify workarounds to build
+# code once a connector has been populated through FetchContent
+function (apply_connector_workarounds connector_name source_dir)
+ # For the cache VOL, remove the call to find_package(ASYNC).
+ # Eventually, the FetchContent OVERRIDE_FIND_PACKAGE should be
+ # able to fulfill this dependency when building the cache VOL,
+ # but for now we have to hack around this until the async and
+ # cache VOLs create CMake .config files
+ if ("${connector_name}" MATCHES "vol-cache")
+ # Remove find_package(ASYNC) call from connector's CMake code
+ file (READ "${source_dir}/CMakeLists.txt" vol_cmake_contents)
+ string (REGEX REPLACE "[ \t]*find_package[ \t]*\\([ \t]*ASYNC[^\r\n\\)]*\\)[ \t]*[\r\n]+" "" vol_cmake_contents "${vol_cmake_contents}")
+ file (WRITE "${source_dir}/CMakeLists.txt" "${vol_cmake_contents}")
+
+ # Remove setting of HDF5_VOL_CONNECTOR and HDF5_PLUGIN_PATH
+ # in connector's external tests CMake code
+ file (STRINGS "${source_dir}/tests/CMakeLists.txt" file_lines)
+ file (WRITE "${source_dir}/tests/CMakeLists.txt" "")
+ foreach (line IN LISTS file_lines)
+ set (stripped_line "${line}")
+ string (REGEX MATCH "^[ \t]*set_tests_properties\\([ \t]*[\r\n]?" match_string "${line}")
+ if (NOT "${match_string}" STREQUAL "")
+ string (REGEX REPLACE "^[ \t]*set_tests_properties\\([ \t]*[\r\n]?" "" stripped_line "${line}")
+ endif ()
+ string (REGEX MATCH "^[ \t]*.\\{test\\}[ \t]*[\r\n]?" match_string "${line}")
+ if (NOT "${match_string}" STREQUAL "")
+ string (REGEX REPLACE "^[ \t]*.\\{[A-Za-z]*\\}[ \t]*[\r\n]?" "" stripped_line "${line}")
+ endif ()
+ string (REGEX MATCH "^[ \t]*PROPERTIES[ \t]*[\r\n]?" match_string "${line}")
+ if (NOT "${match_string}" STREQUAL "")
+ string (REGEX REPLACE "^[ \t]*PROPERTIES[ \t]*[\r\n]?" "" stripped_line "${line}")
+ endif ()
+ string (REGEX MATCH "^[ \t]*ENVIRONMENT[ \t]*.*[\r\n]?" match_string "${line}")
+ if (NOT "${match_string}" STREQUAL "")
+ string (REGEX REPLACE "^[ \t]*ENVIRONMENT[ \t]*.*[\r\n]?" "" stripped_line "${line}")
+ endif ()
+ file (APPEND "${source_dir}/tests/CMakeLists.txt" "${stripped_line}\n")
+ endforeach ()
+ endif ()
+endfunction ()
+
+set (HDF5_VOL_ALLOW_EXTERNAL "NO" CACHE STRING "Allow building of external HDF5 VOL connectors with FetchContent")
+set_property (CACHE HDF5_VOL_ALLOW_EXTERNAL PROPERTY STRINGS NO GIT LOCAL_DIR)
+mark_as_advanced (HDF5_VOL_ALLOW_EXTERNAL)
+if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT" OR HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR")
+ # For compatibility, set some variables that projects would
+ # typically look for after calling find_package(HDF5)
+ set (HDF5_FOUND 1)
+ set (HDF5_LIBRARIES "${HDF5_LIBSH_TARGET};${LINK_LIBS};${LINK_COMP_LIBS};$<$:MPI::MPI_C>")
+ set (HDF5_INCLUDE_DIRS "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>")
+ set (HDF5_IS_PARALLEL ${H5_HAVE_PARALLEL})
+ set (HDF5_VERSION ${HDF5_PACKAGE_VERSION})
+
+ set (HDF5_C_LIBRARIES "${HDF5_LIBRARIES}")
+
+ if (HDF5_BUILD_HL_LIB)
+ set (HDF5_C_HL_LIBRARIES "${HDF5_HL_LIBSH_TARGET}")
+ endif()
+
+ set (HDF5_MAX_EXTERNAL_VOLS 10)
+ set (HDF5_EXTERNAL_VOL_TARGETS "")
+
+ foreach (vol_idx RANGE 1 ${HDF5_MAX_EXTERNAL_VOLS})
+ # Generate fixed-width index number prepended with 0s
+ # so VOL sources come in order from 1 - HDF5_MAX_EXTERNAL_VOLS
+ set (vol_idx_num_digits 2) # Based on HDF5_MAX_EXTERNAL_VOLS
+ set (vol_idx_fixed "${vol_idx}")
+ string (LENGTH "${vol_idx_fixed}" vol_idx_len)
+ while (vol_idx_len LESS vol_idx_num_digits)
+ string (PREPEND vol_idx_fixed "0")
+ math (EXPR vol_idx_len "${vol_idx_len}+1")
+ endwhile ()
+
+ if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT")
+ set (HDF5_VOL_URL${vol_idx_fixed} "" CACHE STRING "Git repository URL of an external HDF5 VOL connector to build")
+ mark_as_advanced (HDF5_VOL_URL${vol_idx_fixed})
+ set (HDF5_VOL_SOURCE "${HDF5_VOL_URL${vol_idx_fixed}}")
+ elseif(HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR")
+ set (HDF5_VOL_PATH${vol_idx_fixed} "" CACHE STRING "Path to the source directory of an external HDF5 VOL connector to build")
+ mark_as_advanced (HDF5_VOL_PATH${vol_idx_fixed})
+ set (HDF5_VOL_SOURCE "${HDF5_VOL_PATH${vol_idx_fixed}}")
+ endif()
+
+ if (NOT "${HDF5_VOL_SOURCE}" STREQUAL "")
+ # Deal with trailing slash in path for LOCAL_DIR case
+ if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR")
+ # Erase trailing slash
+ string (REGEX REPLACE "/$" "" HDF5_VOL_SOURCE ${HDF5_VOL_SOURCE})
+ endif()
+
+ # Extract the name of the VOL connector
+ string (FIND "${HDF5_VOL_SOURCE}" "/" hdf5_vol_name_pos REVERSE)
+ if (hdf5_vol_name_pos EQUAL -1)
+ if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT")
+ message (SEND_ERROR "Invalid URL '${HDF5_VOL_SOURCE}' specified for HDF5_VOL_URL${vol_idx_fixed}")
+ elseif (HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR")
+ message (SEND_ERROR "Invalid source path '${HDF5_VOL_SOURCE}' specified for HDF5_VOL_PATH${vol_idx_fixed}")
+ endif()
+ endif ()
+
+ math (EXPR hdf5_vol_name_pos "${hdf5_vol_name_pos}+1")
+
+ string (SUBSTRING "${HDF5_VOL_SOURCE}" ${hdf5_vol_name_pos} -1 hdf5_vol_name)
+ string (REPLACE ".git" "" hdf5_vol_name "${hdf5_vol_name}")
+ string (STRIP "${hdf5_vol_name}" hdf5_vol_name)
+ string (TOUPPER "${hdf5_vol_name}" hdf5_vol_name_upper)
+ string (TOLOWER "${hdf5_vol_name}" hdf5_vol_name_lower)
+
+ message (VERBOSE "Building VOL connector '${hdf5_vol_name}' with FetchContent from source ${HDF5_VOL_SOURCE}")
+
+ # Set some cache variables that can be set by users when building
+ if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT")
+ set ("HDF5_VOL_${hdf5_vol_name_upper}_BRANCH" "main" CACHE STRING "Git branch (or tag) to use when building VOL connector '${hdf5_vol_name}'")
+ mark_as_advanced ("HDF5_VOL_${hdf5_vol_name_upper}_BRANCH")
+ endif()
+
+ set ("HDF5_VOL_${hdf5_vol_name_upper}_CMAKE_PACKAGE_NAME"
+ "${hdf5_vol_name_lower}"
+ CACHE
+ STRING
+ "CMake package name used by find_package(...) calls for VOL connector '${hdf5_vol_name}'"
+ )
+
+ set ("HDF5_VOL_${hdf5_vol_name_upper}_NAME" "" CACHE STRING "Name of VOL connector to set for the HDF5_VOL_CONNECTOR environment variable")
+ option ("HDF5_VOL_${hdf5_vol_name_upper}_TEST_PARALLEL" "Whether to test VOL connector '${hdf5_vol_name}' against the parallel API tests" OFF)
+
+ mark_as_advanced ("HDF5_VOL_${hdf5_vol_name_upper}_NAME")
+ mark_as_advanced ("HDF5_VOL_${hdf5_vol_name_upper}_TEST_PARALLEL")
+
+ if (HDF5_TEST_API)
+ if ("${HDF5_VOL_${hdf5_vol_name_upper}_NAME}" STREQUAL "")
+ message (SEND_ERROR "HDF5_VOL_${hdf5_vol_name_upper}_NAME must be set to a valid connector name to use VOL connector '${hdf5_vol_name}' for testing")
+ endif ()
+ endif ()
+
+ if ((HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT") AND ("${HDF5_VOL_${hdf5_vol_name_upper}_BRANCH}" STREQUAL ""))
+ message (SEND_ERROR "HDF5_VOL_${hdf5_vol_name_upper}_BRANCH must be set to a valid git branch name (or git tag) to build VOL connector '${hdf5_vol_name}'")
+ endif ()
+
+ if ((HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR")
+ AND NOT (EXISTS ${HDF5_VOL_SOURCE} AND IS_DIRECTORY ${HDF5_VOL_SOURCE}))
+ message (FATAL_ERROR "HDF5_VOL_PATH${vol_idx_fixed} must be an absolute path to a valid directory")
+ endif ()
+
+ # Set internal convenience variables for FetchContent dependency name
+ set (hdf5_vol_depname "${HDF5_VOL_${hdf5_vol_name_upper}_CMAKE_PACKAGE_NAME}")
+ string (TOLOWER "${hdf5_vol_depname}" hdf5_vol_depname_lower)
+
+ if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24")
+ set("OVERRIDE_FIND_PACKAGE_OPT" "OVERRIDE_FIND_PACKAGE")
+ endif()
+
+ if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT")
+ FetchContent_Declare (${hdf5_vol_depname}
+ GIT_REPOSITORY "${HDF5_VOL_SOURCE}"
+ GIT_TAG "${HDF5_VOL_${hdf5_vol_name_upper}_BRANCH}"
+ "${OVERRIDE_FIND_PACKAGE_OPT}"
+ )
+ elseif(HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR")
+ FetchContent_Declare (${hdf5_vol_depname}
+ SOURCE_DIR "${HDF5_VOL_SOURCE}"
+ )
+ endif()
+
+ FetchContent_GetProperties(${hdf5_vol_depname})
+ if (NOT ${hdf5_vol_depname}_POPULATED)
+ FetchContent_Populate(${hdf5_vol_depname})
+
+ # Now that content has been populated, set other internal
+ # convenience variables for FetchContent dependency
+ set (hdf5_vol_depname_source_dir "${${hdf5_vol_depname_lower}_SOURCE_DIR}")
+ set (hdf5_vol_depname_binary_dir "${${hdf5_vol_depname_lower}_BINARY_DIR}")
+
+ if (NOT EXISTS "${hdf5_vol_depname_source_dir}/CMakeLists.txt")
+ if (HDF5_VOL_ALLOW_EXTERNAL MATCHES "GIT")
+ message (SEND_ERROR "The git repository branch '${HDF5_VOL_${hdf5_vol_name_upper}_BRANCH}' for VOL connector '${hdf5_vol_name}' does not appear to contain a CMakeLists.txt file")
+ elseif (HDF5_VOL_ALLOW_EXTERNAL MATCHES "LOCAL_DIR")
+ message(SEND_ERROR "The local directory '${HDF5_VOL_SOURCE}' for VOL connector '${hdf5_vol_name}' does not appear to contain a CMakeLists.txt file")
+ endif()
+ endif ()
+
+ # If there are any calls to find_package(HDF5) in the connector's
+ # CMakeLists.txt files, remove those since any found HDF5 targets
+ # will conflict with targets being generated by this build of HDF5
+ if (EXISTS "${hdf5_vol_depname_source_dir}/CMakeLists.txt")
+ file (READ "${hdf5_vol_depname_source_dir}/CMakeLists.txt" vol_cmake_contents)
+ string (REGEX REPLACE "[ \t]*find_package[ \t]*\\([ \t]*HDF5[^\r\n\\)]*\\)[ \t]*[\r\n]+" "" vol_cmake_contents "${vol_cmake_contents}")
+ file (WRITE "${hdf5_vol_depname_source_dir}/CMakeLists.txt" "${vol_cmake_contents}")
+ endif ()
+ if (EXISTS "${hdf5_vol_depname_source_dir}/src/CMakeLists.txt")
+ file (READ "${hdf5_vol_depname_source_dir}/src/CMakeLists.txt" vol_cmake_contents)
+ string (REGEX REPLACE "[ \t]*find_package[ \t]*\\([ \t]*HDF5[^\r\n\\)]*\\)[ \t]*[\r\n]+" "" vol_cmake_contents "${vol_cmake_contents}")
+ file (WRITE "${hdf5_vol_depname_source_dir}/src/CMakeLists.txt" "${vol_cmake_contents}")
+ endif ()
+
+ # Apply any connector-specific workarounds
+ apply_connector_workarounds ("${hdf5_vol_name_lower}" "${hdf5_vol_depname_source_dir}")
+
+ add_subdirectory (${hdf5_vol_depname_source_dir} ${hdf5_vol_depname_binary_dir})
+
+ # Get list of targets generated by build of connector
+ get_generated_cmake_targets (connector_targets ${hdf5_vol_depname_source_dir})
+
+ # Create a custom target for the connector to encompass all its
+ # targets and other custom properties set by us for later use
+ add_custom_target ("HDF5_VOL_${hdf5_vol_name_lower}")
+
+ # Define and set a custom property on the VOL connector target to
+ # capture all of the connector's generated targets
+ define_property (
+ TARGET
+ PROPERTY HDF5_VOL_TARGETS
+ BRIEF_DOCS "Generated targets of this connector"
+ FULL_DOCS "Generated targets of this connector"
+ )
+
+ set_target_properties (
+ "HDF5_VOL_${hdf5_vol_name_lower}"
+ PROPERTIES
+ HDF5_VOL_TARGETS "${connector_targets}"
+ )
+
+ # Define and set a custom property on the VOL connector target to
+ # capture the connector's name to set for the HDF5_VOL_CONNECTOR
+ # environment variable for testing
+ define_property (
+ TARGET
+ PROPERTY HDF5_VOL_NAME
+ BRIEF_DOCS "VOL connector name to use for the HDF5_VOL_CONNECTOR environment variable when testing"
+ FULL_DOCS "VOL connector name to use for the HDF5_VOL_CONNECTOR environment variable when testing"
+ )
+
+ set_target_properties (
+ "HDF5_VOL_${hdf5_vol_name_lower}"
+ PROPERTIES
+ HDF5_VOL_NAME "${HDF5_VOL_${hdf5_vol_name_upper}_NAME}"
+ )
+
+ # Define and set a custom property on the VOL connector target to
+ # capture whether the connector should be tested with the parallel
+ # API tests
+ define_property (
+ TARGET
+ PROPERTY HDF5_VOL_TEST_PARALLEL
+ BRIEF_DOCS "Whether the VOL connector should be tested with the parallel API tests"
+ FULL_DOCS "Whether the VOL connector should be tested with the parallel API tests"
+ )
+
+ set_target_properties (
+ "HDF5_VOL_${hdf5_vol_name_lower}"
+ PROPERTIES
+ HDF5_VOL_TEST_PARALLEL ${HDF5_VOL_${hdf5_vol_name_upper}_TEST_PARALLEL}
+ )
+
+ # Add this VOL connector's target to the list of external connector targets
+ list (APPEND HDF5_EXTERNAL_VOL_TARGETS "HDF5_VOL_${hdf5_vol_name_lower}")
+
+ # Get the list of library targets from this VOL connector
+ unset (connector_lib_targets)
+ foreach (connector_target ${connector_targets})
+ get_target_property (target_type ${connector_target} TYPE)
+ if (target_type STREQUAL "SHARED_LIBRARY" OR target_type STREQUAL "STATIC_LIBRARY")
+ list (APPEND connector_lib_targets "${connector_target}")
+ endif ()
+ endforeach ()
+
+ # Add all of the previous VOL connector's library targets as
+ # dependencies for the current VOL connector to ensure that
+ # VOL connectors get built serially in case there are dependencies
+ if (DEFINED last_vol_lib_targets)
+ foreach (connector_target ${connector_targets})
+ add_dependencies (${connector_target} ${last_vol_lib_targets})
+ endforeach ()
+ endif ()
+
+ # Use this connector's library targets as dependencies
+ # for the next connector that is built
+ set (last_vol_lib_targets "${connector_lib_targets}")
+ endif ()
+ endif ()
+ endforeach ()
+endif ()
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/COPYING b/Modules/ThirdParty/HDF5/src/itkhdf5/COPYING
index 9d32232bdf2..fd50633d9e7 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/COPYING
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/COPYING
@@ -49,7 +49,7 @@ works thereof, in binary and source code form.
Limited portions of HDF5 were developed by Lawrence Berkeley National
Laboratory (LBNL). LBNL's Copyright Notice and Licensing Terms can be
found here: COPYING_LBNL_HDF5 file in this directory or at
-http://support.hdfgroup.org/ftp/HDF5/releases/COPYING_LBNL_HDF5.
+https://raw.githubusercontent.com/hdfgroup/hdf5/hdf5_1_14/COPYING_LBNL_HDF5.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/CTestConfig.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/CTestConfig.cmake
index d2aad9c3477..dd2ed631a03 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/CTestConfig.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/CTestConfig.cmake
@@ -12,7 +12,7 @@
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
-## # The following are required to uses Dart and the Cdash dashboard
+## # The following are required to use Dart and the CDash dashboard
## ENABLE_TESTING()
## INCLUDE(CTest)
set (CTEST_PROJECT_NAME "HDF5")
@@ -22,20 +22,12 @@ set (CTEST_DROP_METHOD "https")
if (CTEST_DROP_SITE_INIT)
set (CTEST_DROP_SITE "${CTEST_DROP_SITE_INIT}")
else ()
- if (CDASH_LOCAL)
- set (CTEST_DROP_SITE "cdash-internal.hdfgroup.org")
- else ()
- set (CTEST_DROP_SITE "cdash.hdfgroup.org")
- endif ()
+ set (CTEST_DROP_SITE "cdash.hdfgroup.org")
endif ()
if (CTEST_DROP_LOCATION_INIT)
set (CTEST_DROP_LOCATION "${CTEST_DROP_LOCATION_INIT}")
else ()
- if (CDASH_LOCAL)
- set (CTEST_DROP_LOCATION "/submit.php?project=HDF5112")
- else ()
- set (CTEST_DROP_LOCATION "/submit.php?project=HDF5")
- endif ()
+ set (CTEST_DROP_LOCATION "/submit.php?project=HDF5114")
endif ()
set (CTEST_DROP_SITE_CDASH TRUE)
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/README.md b/Modules/ThirdParty/HDF5/src/itkhdf5/README.md
new file mode 100644
index 00000000000..127ac4b2a3a
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/README.md
@@ -0,0 +1,91 @@
+HDF5 version 1.14.5 released on 2024-09-30
+
+![HDF5 Logo](doxygen/img/HDF5.png)
+
+[![1.14 cmake build status](https://img.shields.io/github/actions/workflow/status/HDFGroup/hdf5/cmake.yml?branch=hdf5_1_14&label=HDF5%201.14%20CMake%20CI)](https://github.com/HDFGroup/hdf5/actions/workflows/cmake.yml?query=branch%3Ahdf5_1_14)
+[![1.14 autotools build status](https://img.shields.io/github/actions/workflow/status/HDFGroup/hdf5/autotools.yml?branch=hdf5_1_14&label=HDF5%201.14%20Autotools%20CI)](https://github.com/HDFGroup/hdf5/actions/workflows/autotools.yml?query=branch%3Ahdf5_1_14)
+[![BSD](https://img.shields.io/badge/License-BSD-blue.svg)](https://github.com/HDFGroup/hdf5/blob/hdf5_1_14/COPYING)
+
+[HPC configure/build/test results](https://my.cdash.org/index.php?project=HDF5)
+
+*Please refer to the release_docs/INSTALL file for installation instructions.*
+
+This repository contains a high-performance library's source code and a file format
+specification that implements the HDF5® data model. The model has been adopted across
+many industries, and this implementation has become a de facto data management standard
+in science, engineering, and research communities worldwide.
+
+The HDF Group is the developer, maintainer, and steward of HDF5 software. Find more
+information about The HDF Group, the HDF5 Community, and other HDF5 software projects,
+tools, and services at [The HDF Group's website](https://www.hdfgroup.org/).
+
+DOCUMENTATION
+-------------
+This release is fully functional for the API described in the documentation.
+
+ https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_5/documentation/doxygen/_l_b_a_p_i.html
+
+Full Documentation and Programming Resources for this release can be found at
+
+ https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_5/documentation/doxygen/index.html
+
+The latest doxygen documentation generated on changes to HDF5 1.14.x is available at:
+
+ https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_5/documentation/doxygen
+
+See the [RELEASE.txt](release_docs/RELEASE.txt) file in the [release_docs/](release_docs/) directory for information specific
+to the features and updates included in this release of the library.
+
+Several more files are located within the [release_docs/](release_docs/) directory with specific
+details for several common platforms and configurations.
+
+ INSTALL - Start Here. General instructions for compiling and installing the library
+ INSTALL_CMAKE - instructions for building with CMake (Kitware.com)
+ INSTALL_parallel - instructions for building and configuring Parallel HDF5
+ INSTALL_Windows and INSTALL_Cygwin - MS Windows installations.
+
+
+
+HELP AND SUPPORT
+----------------
+Information regarding Help Desk and Support services is available at
+
+ https://help.hdfgroup.org
+
+
+
+FORUM and NEWS
+--------------
+The [HDF Forum](https://forum.hdfgroup.org) is provided for public announcements and discussions
+of interest to the general HDF5 Community.
+
+ - News and Announcements
+ https://forum.hdfgroup.org/c/news-and-announcements-from-the-hdf-group
+
+ - HDF5 Topics
+ https://forum.hdfgroup.org/c/hdf5
+
+These forums are provided as an open and public service for searching and reading.
+Posting requires completing a simple registration and allows one to join in the
+conversation. Please read the [instructions](https://forum.hdfgroup.org/t/quickstart-guide-welcome-to-the-new-hdf-forum
+) pertaining to the Forum's use and configuration.
+
+
+SNAPSHOTS, PREVIOUS RELEASES AND SOURCE CODE
+--------------------------------------------
+Periodically development code snapshots are provided at the following URL:
+
+ https://github.com/HDFGroup/hdf5/releases/tag/snapshot-1.14
+
+Source packages for current and previous releases are located at:
+
+ hdf5 1.14 releases:
+ https://support.hdfgroup.org/releases/hdf5/v1_14/index.html
+
+ Archived releases:
+ https://support.hdfgroup.org/archive/support/ftp/HDF5/releases/index.html
+
+Development code is available at our Github location:
+
+ https://github.com/HDFGroup/hdf5.git
+
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/README.txt b/Modules/ThirdParty/HDF5/src/itkhdf5/README.txt
deleted file mode 100644
index 1162b5fd802..00000000000
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/README.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-HDF5 version 1.12.1 released on 2021-07-01
-
-------------------------------------------------------------------------------
-Please refer to the release_docs/INSTALL file for installation instructions.
-------------------------------------------------------------------------------
-
-THE HDF GROUP
----------------
-
-The HDF Group is the developer of HDF5®, a high-performance software library and
-data format that has been adopted across multiple industries and has become a
-de facto standard in scientific and research communities.
-
-More information about The HDF Group, the HDF5 Community and the HDF5 software
-project, tools and services can be found at the Group's website.
-
- https://www.hdfgroup.org/
-
-
-DOCUMENTATION
--------------
-This release is fully functional for the API described in the documentation.
- https://portal.hdfgroup.org/display/HDF5/The+HDF5+API
-
-Full Documentation and Programming Resources for this release can be found at
- https://portal.hdfgroup.org/display/HDF5
-
-See the RELEASE.txt file in the release_docs/ directory for information specific
-to the features and updates included in this release of the library.
-
-Several more files are located within the release_docs/ directory with specific
-details for several common platforms and configurations.
-
- INSTALL - Start Here. General instructions for compiling and installing the library
- INSTALL_CMAKE - instructions for building with CMake (Kitware.com)
- INSTALL_parallel - instructions for building and configuring Parallel HDF5
- INSTALL_Windows and INSTALL_Cygwin - MS Windows installations.
-
-
-
-HELP AND SUPPORT
-----------------
-Information regarding Help Desk and Support services is available at
-
- https://portal.hdfgroup.org/display/support/The+HDF+Help+Desk
-
-
-
-FORUM and NEWS
---------------
-The following public forums are provided for public announcements and discussions
-of interest to the general HDF5 Community.
-
- Homepage of the Forum
- https://forum.hdfgroup.org
-
- News and Announcement
- https://forum.hdfgroup.org/c/news-and-announcements-from-the-hdf-group
-
- HDF5 and HDF4 Topics
- https://forum.hdfgroup.org/c/hdf5
-
-These forums are provided as an open and public service for searching and reading.
-Posting requires completing a simple registration and allows one to join in the
-conversation. Please read the following instructions pertaining to the Forum's
-use and configuration
- https://forum.hdfgroup.org/t/quickstart-guide-welcome-to-the-new-hdf-forum
-
-
-SNAPSHOTS, PREVIOUS RELEASES AND SOURCE CODE
---------------------------------------------
-Periodically development code snapshots are provided at the following URL:
- https://gamma.hdfgroup.org/ftp/pub/outgoing/hdf5/snapshots/
-
-Source packages for current and previous releases are located at:
- https://portal.hdfgroup.org/display/support/Downloads
-
-Development code is available at our Github location:
- https://github.com/HDFGroup/hdf5.git
-
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/UserMacros.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/UserMacros.cmake
index 0291dbf56f3..c9162236a8a 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/UserMacros.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/UserMacros.cmake
@@ -23,11 +23,7 @@ macro (MACRO_USER_DEFINED_LIBS)
endmacro ()
#-------------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): hardcode settings
option (BUILD_USER_DEFINED_LIBS "Build With User Defined Values" OFF)
-else ()
-set(BUILD_USER_DEFINED_LIBS OFF)
-endif ()
if (BUILD_USER_DEFINED_LIBS)
MACRO_USER_DEFINED_LIBS ()
endif ()
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/CMakeLists.txt b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/CMakeLists.txt
index f7560cb80e6..5e5b833c401 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/CMakeLists.txt
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/CMakeLists.txt
@@ -1,23 +1,12 @@
-#[[ ITK --start
-cmake_minimum_required (VERSION 3.12)
-# ITK --stop ]]
+cmake_minimum_required (VERSION 3.18)
project (HDF5_CPP CXX)
add_subdirectory (src)
-#-----------------------------------------------------------------------------
-# Build the CPP Examples
-#-----------------------------------------------------------------------------
-if (HDF5_BUILD_EXAMPLES)
- add_subdirectory (examples)
-endif ()
-
#-----------------------------------------------------------------------------
# Build the CPP unit tests
#-----------------------------------------------------------------------------
-# ITK --start
-# ITK removed
-#if (BUILD_TESTING)
-# add_subdirectory (test)
-#endif ()
-# ITK --stop
+
+if (NOT HDF5_EXTERNALLY_CONFIGURED AND BUILD_TESTING)
+ add_subdirectory (test)
+endif ()
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/CMakeLists.txt b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/CMakeLists.txt
index 3822b77d7d1..09546acd451 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/CMakeLists.txt
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/CMakeLists.txt
@@ -1,15 +1,6 @@
-#[[ ITK --start
-cmake_minimum_required (VERSION 3.12)
-# ITK --stop]]
+cmake_minimum_required (VERSION 3.18)
project (HDF5_CPP_SRC CXX)
-#-----------------------------------------------------------------------------
-# Generate configure file
-#-----------------------------------------------------------------------------
-configure_file (${HDF_RESOURCES_DIR}/H5cxx_config.h.in
- ${HDF5_SRC_BINARY_DIR}/H5cxx_pubconf.h
-)
-
#-----------------------------------------------------------------------------
# Define cpp Library
#-----------------------------------------------------------------------------
@@ -86,15 +77,15 @@ set (CPP_HDRS
${HDF5_CPP_SRC_SOURCE_DIR}/H5VarLenType.h
)
-if (NOT ONLY_SHARED_LIBS)
+if (BUILD_STATIC_LIBS)
add_library (${HDF5_CPP_LIB_TARGET} STATIC ${CPP_SOURCES} ${CPP_HDRS})
target_include_directories (${HDF5_CPP_LIB_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>"
+ PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$/include>"
)
target_compile_options(${HDF5_CPP_LIB_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
target_compile_definitions(${HDF5_CPP_LIB_TARGET}
- PRIVATE $<$:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings
+ PRIVATE "$<$:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK>"# Parallel/MPI, prevent spurious cpp/cxx warnings
)
TARGET_C_PROPERTIES (${HDF5_CPP_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_CPP_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
@@ -107,13 +98,13 @@ endif ()
if (BUILD_SHARED_LIBS)
add_library (${HDF5_CPP_LIBSH_TARGET} SHARED ${CPP_SOURCES} ${CPP_HDRS})
target_include_directories (${HDF5_CPP_LIBSH_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>"
+ PRIVATE "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$/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 $<$:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK># Parallel/MPI, prevent spurious cpp/cxx warnings
+ PRIVATE "$<$:MPICH_SKIP_MPICXX;MPICH_IGNORE_CXX_SEEK>"# Parallel/MPI, prevent spurious cpp/cxx warnings
)
TARGET_C_PROPERTIES (${HDF5_CPP_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_CPP_LIBSH_TARGET}
@@ -134,7 +125,7 @@ endif ()
# Add Target to clang-format
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_FORMATTERS)
- if (NOT ONLY_SHARED_LIBS)
+ if (BUILD_STATIC_LIBS)
clang_format (HDF5_CPP_SRC_FORMAT ${HDF5_CPP_LIB_TARGET})
else ()
clang_format (HDF5_CPP_SRC_FORMAT ${HDF5_CPP_LIBSH_TARGET})
@@ -160,7 +151,7 @@ if (HDF5_EXPORTED_TARGETS)
if (BUILD_SHARED_LIBS)
INSTALL_TARGET_PDB (${HDF5_CPP_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} cpplibraries)
endif ()
- if (NOT ONLY_SHARED_LIBS)
+ if (BUILD_STATIC_LIBS)
INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} cpplibraries)
endif ()
@@ -182,22 +173,26 @@ endif ()
#-----------------------------------------------------------------------------
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_CPP_LIB_CORENAME}")
+set (_PKG_CONFIG_LIBDIR \${exec_prefix}/${HDF5_INSTALL_LIB_DIR})
+set (_PKG_CONFIG_INCLUDEDIR \${prefix}/${HDF5_INSTALL_INCLUDE_DIR})
+set (_PKG_CONFIG_LIBNAME "${HDF5_CPP_LIB_NAME}")
set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
+set (PKG_CONFIG_LIBNAME "${HDF5_CPP_LIB_NAME}")
+if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer")
+ set (PKG_CONFIG_LIBNAME "${PKG_CONFIG_LIBNAME}${CMAKE_DEBUG_POSTFIX}")
+endif ()
set (_PKG_CONFIG_LIBS_PRIVATE)
-if (NOT ONLY_SHARED_LIBS)
- set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_CPP_LIB_CORENAME}")
+if (BUILD_STATIC_LIBS)
+ set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${PKG_CONFIG_LIBNAME}")
endif ()
if (BUILD_SHARED_LIBS)
- set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_CPP_LIB_CORENAME}")
+ set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${PKG_CONFIG_LIBNAME}")
endif ()
-set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}")
-set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}")
+set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_NAME} = ${HDF5_PACKAGE_VERSION}")
+set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_NAME} = ${HDF5_PACKAGE_VERSION}")
configure_file (
${HDF_CONFIG_DIR}/libhdf5.pc.in
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AbstractDs.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AbstractDs.cpp
index eeb015584b1..ab3fabaeb69 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AbstractDs.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AbstractDs.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -36,7 +35,6 @@ namespace H5 {
//--------------------------------------------------------------------------
// Function: AbstractDs default constructor
///\brief Default constructor
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AbstractDs::AbstractDs()
{
@@ -45,7 +43,6 @@ AbstractDs::AbstractDs()
//--------------------------------------------------------------------------
// Function: AbstractDs default constructor
///\brief Creates an AbstractDs instance using an existing id.
-// Programmer Binh-Minh Ribler - 2000
//
// *** Deprecation warning ***
// This constructor is no longer appropriate because the data member "id" had
@@ -61,7 +58,6 @@ AbstractDs::AbstractDs()
/// object, which can be a dataset or an attribute.
///\return Datatype class identifier
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_class_t
AbstractDs::getTypeClass() const
@@ -108,7 +104,6 @@ AbstractDs::getTypeClass() const
/// can be a dataset or an attribute.
///\return DataType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType
AbstractDs::getDataType() const
@@ -136,7 +131,6 @@ AbstractDs::getDataType() const
/// can be a dataset or an attribute.
///\return ArrayType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
ArrayType
AbstractDs::getArrayType() const
@@ -166,7 +160,6 @@ AbstractDs::getArrayType() const
/// can be a dataset or an attribute.
///\return CompType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType
AbstractDs::getCompType() const
@@ -194,7 +187,6 @@ AbstractDs::getCompType() const
/// can be a dataset or an attribute.
///\return EnumType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType
AbstractDs::getEnumType() const
@@ -222,7 +214,6 @@ AbstractDs::getEnumType() const
/// can be a dataset or an attribute.
///\return IntType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType
AbstractDs::getIntType() const
@@ -250,7 +241,6 @@ AbstractDs::getIntType() const
/// which can be a dataset or an attribute.
///\return FloatType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType
AbstractDs::getFloatType() const
@@ -278,7 +268,6 @@ AbstractDs::getFloatType() const
/// can be a dataset or an attribute.
///\return StrType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType
AbstractDs::getStrType() const
@@ -302,11 +291,10 @@ AbstractDs::getStrType() const
//--------------------------------------------------------------------------
// Function: AbstractDs::getVarLenType
-///\brief Returns the floating-point datatype of this abstract dataset,
+///\brief Returns the variable length datatype of this abstract dataset,
/// which can be a dataset or an attribute.
///\return VarLenType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
VarLenType
AbstractDs::getVarLenType() const
@@ -328,13 +316,4 @@ AbstractDs::getVarLenType() const
}
}
-//--------------------------------------------------------------------------
-// Function: AbstractDs destructor
-///\brief Noop destructor.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-AbstractDs::~AbstractDs()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AbstractDs.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AbstractDs.h
index b84867b2cb9..d831bd65791 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AbstractDs.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AbstractDs.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -68,7 +67,7 @@ class H5_DLLCPP AbstractDs {
virtual H5std_string fromClass() const = 0;
// Destructor
- virtual ~AbstractDs();
+ virtual ~AbstractDs() = default;
protected:
// Default constructor
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Alltypes.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Alltypes.h
index 7a14774f8ff..b18add8d1fb 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Alltypes.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Alltypes.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5ArrayType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5ArrayType.cpp
index 6999f1bf70e..3a2da2bf39f 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5ArrayType.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5ArrayType.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -32,7 +31,6 @@ namespace H5 {
//--------------------------------------------------------------------------
// Function: ArrayType default constructor
///\brief Default constructor: Creates a stub ArrayType
-// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType() : DataType()
{
@@ -43,7 +41,6 @@ ArrayType::ArrayType() : DataType()
///\brief Creates an ArrayType object using an existing id.
///\param existing_id - IN: Id of an existing datatype
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType(const hid_t existing_id) : DataType(existing_id)
{
@@ -52,7 +49,6 @@ ArrayType::ArrayType(const hid_t existing_id) : DataType(existing_id)
//--------------------------------------------------------------------------
// Function: ArrayType copy constructor
///\brief Copy constructor: same HDF5 object as \a original
-// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType(const ArrayType &original) : DataType(original)
{
@@ -66,12 +62,14 @@ ArrayType::ArrayType(const ArrayType &original) : DataType(original)
///\param ndims - IN: Rank of the array, [0..H5S_MAX_RANK]
///\param dims - IN: Size of each array dimension
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType(const DataType &base_type, int ndims, const hsize_t *dims) : DataType()
{
+ if (ndims < 0 || ndims > H5S_MAX_RANK)
+ throw DataTypeIException("ArrayType constructor", "ndims not in range [0..H5S_MAX_RANK]");
+
// Call C API to create an array data type
- hid_t new_type_id = H5Tarray_create2(base_type.getId(), ndims, dims);
+ hid_t new_type_id = H5Tarray_create2(base_type.getId(), static_cast(ndims), dims);
if (new_type_id < 0)
throw DataTypeIException("ArrayType constructor", "H5Tarray_create2 failed");
@@ -86,7 +84,6 @@ ArrayType::ArrayType(const DataType &base_type, int ndims, const hsize_t *dims)
///\param loc - IN: Location of the type
///\param dtype_name - IN: Array type name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openArrayType(const char*) to
@@ -105,7 +102,6 @@ ArrayType::ArrayType(const H5Location &loc, const char *dtype_name) : DataType()
///\param loc - IN: Location of the type
///\param dtype_name - IN: Array type name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openArrayType(const H5std_string&)
@@ -126,7 +122,6 @@ ArrayType::ArrayType(const H5Location &loc, const H5std_string &dtype_name) : Da
// Description
// Closes the id on the lhs object first with setId, then copies
// each data member from the rhs object. (Issue HDFFV-9562)
-// Programmer Binh-Minh Ribler - Mar 2016
//--------------------------------------------------------------------------
ArrayType &
ArrayType::operator=(const ArrayType &rhs)
@@ -151,7 +146,6 @@ ArrayType::operator=(const ArrayType &rhs)
/// binary object description of this type.
///
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Aug 2017
//--------------------------------------------------------------------------
DataType *
ArrayType::decode() const
@@ -173,7 +167,6 @@ ArrayType::decode() const
///\brief Returns the number of dimensions for an array datatype.
///\return Number of dimensions
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
int
ArrayType::getArrayNDims() const
@@ -193,7 +186,6 @@ ArrayType::getArrayNDims() const
///\param dims - OUT: Sizes of dimensions
///\return Number of dimensions
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
int
ArrayType::getArrayDims(hsize_t *dims) const
@@ -207,13 +199,4 @@ ArrayType::getArrayDims(hsize_t *dims) const
return (ndims);
}
-//--------------------------------------------------------------------------
-// Function: ArrayType destructor
-///\brief Properly terminates access to this array datatype.
-// Programmer Binh-Minh Ribler - May 2004
-//--------------------------------------------------------------------------
-ArrayType::~ArrayType()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5ArrayType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5ArrayType.h
index b93ae4aa33b..e02a3a2a0e8 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5ArrayType.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5ArrayType.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -37,7 +36,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 H5_OVERRIDE;
+ virtual DataType *decode() const override;
// Returns the number of dimensions of this array datatype.
int getArrayNDims() const;
@@ -49,7 +48,7 @@ class H5_DLLCPP ArrayType : public DataType {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("ArrayType");
}
@@ -61,7 +60,7 @@ class H5_DLLCPP ArrayType : public DataType {
ArrayType(const hid_t existing_id);
// Noop destructor
- virtual ~ArrayType() H5_OVERRIDE;
+ virtual ~ArrayType() override = default;
// Default constructor
ArrayType();
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AtomType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AtomType.cpp
index 0b480464c96..f2e037a98bc 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AtomType.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AtomType.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -33,7 +32,6 @@ namespace H5 {
//--------------------------------------------------------------------------
// Function: AtomType default constructor [protected]
// Purpose Default constructor: creates a stub atomic datatype.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType() : DataType()
{
@@ -44,7 +42,6 @@ AtomType::AtomType() : DataType()
// Purpose Creates an AtomType object using an existing id.
// Parameter existing_id - IN: Id of an existing datatype
// Exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType(const hid_t existing_id) : DataType(existing_id)
{
@@ -53,7 +50,6 @@ AtomType::AtomType(const hid_t existing_id) : DataType(existing_id)
//--------------------------------------------------------------------------
// Function: AtomType copy constructor
///\brief Copy constructor: same HDF5 object as \a original
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType(const AtomType &original) : DataType(original)
{
@@ -65,7 +61,6 @@ AtomType::AtomType(const AtomType &original) : DataType(original)
///\brief Sets the total size for an atomic datatype.
///\param size - IN: Size to set
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
AtomType::setSize(size_t size) const
@@ -85,7 +80,6 @@ AtomType::setSize(size_t size) const
/// \li \c H5T_ORDER_BE
/// \li \c H5T_ORDER_VAX
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
H5T_order_t
AtomType::getOrder() const
@@ -115,7 +109,6 @@ AtomType::getOrder() const
/// \li \c H5T_ORDER_BE
/// \li \c H5T_ORDER_VAX
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_order_t
AtomType::getOrder(H5std_string &order_string) const
@@ -141,7 +134,6 @@ AtomType::getOrder(H5std_string &order_string) const
/// \li \c H5T_ORDER_BE
/// \li \c H5T_ORDER_VAX
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
AtomType::setOrder(H5T_order_t order) const
@@ -162,7 +154,6 @@ AtomType::setOrder(H5T_order_t order) const
/// The precision is the number of significant bits which,
/// unless padding is present, is 8 times larger than the
/// value returned by \c DataType::getSize().
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
size_t
AtomType::getPrecision() const
@@ -185,7 +176,6 @@ AtomType::getPrecision() const
///\par Description
/// For information, please refer to the H5Tset_precision API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
AtomType::setPrecision(size_t precision) const
@@ -205,7 +195,6 @@ AtomType::setPrecision(size_t precision) const
///\par Description
/// For information, please refer to the H5Tget_offset API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
// Modification
// 12/05/00: due to C API change
// - return type changed from size_t to int
@@ -231,7 +220,6 @@ AtomType::getOffset() const
///\par Description
/// For information, please refer to the H5Tset_offset API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
AtomType::setOffset(size_t offset) const
@@ -255,7 +243,6 @@ AtomType::setOffset(size_t offset) const
/// \li \c H5T_PAD_ZERO (0) - Set background to zeros.
/// \li \c H5T_PAD_ONE (1) - Set background to ones.
/// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
AtomType::getPad(H5T_pad_t &lsb, H5T_pad_t &msb) const
@@ -278,7 +265,6 @@ AtomType::getPad(H5T_pad_t &lsb, H5T_pad_t &msb) const
/// \li \c H5T_PAD_ZERO (0) - Set background to zeros.
/// \li \c H5T_PAD_ONE (1) - Set background to ones.
/// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
AtomType::setPad(H5T_pad_t lsb, H5T_pad_t msb) const
@@ -290,15 +276,4 @@ AtomType::setPad(H5T_pad_t lsb, H5T_pad_t msb) const
}
}
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-//--------------------------------------------------------------------------
-// Function: AtomType destructor
-///\brief Noop destructor.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-AtomType::~AtomType()
-{
-}
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AtomType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AtomType.h
index e00a3087eac..327604ddd56 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AtomType.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5AtomType.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -58,7 +57,7 @@ class H5_DLLCPP AtomType : public DataType {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("AtomType");
}
@@ -68,7 +67,7 @@ class H5_DLLCPP AtomType : public DataType {
AtomType(const AtomType &original);
// Noop destructor
- virtual ~AtomType() H5_OVERRIDE;
+ virtual ~AtomType() override = default;
#endif // DOXYGEN_SHOULD_SKIP_THIS
protected:
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Attribute.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Attribute.cpp
index 0e37c2b3247..a79d7c3a024 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Attribute.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Attribute.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -11,10 +10,10 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include
#include
#include
-#include "H5private.h" // for HDfree
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -42,7 +41,6 @@ class H5Object; // forward declaration for UserData4Aiterate
//--------------------------------------------------------------------------
// Function: Attribute default constructor
///\brief Default constructor: Creates a stub attribute
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
Attribute::Attribute() : AbstractDs(), H5Location(), id(H5I_INVALID_HID)
{
@@ -52,7 +50,6 @@ Attribute::Attribute() : AbstractDs(), H5Location(), id(H5I_INVALID_HID)
// Function: Attribute copy constructor
///\brief Copy constructor: same HDF5 object as \a original
///\param original - IN: Original Attribute object to copy
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute::Attribute(const Attribute &original) : AbstractDs(), H5Location(), id(original.id)
{
@@ -65,7 +62,6 @@ Attribute::Attribute(const Attribute &original) : AbstractDs(), H5Location(), id
/// attribute.
///\param existing_id - IN: Id of an existing attribute
///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute::Attribute(const hid_t existing_id) : AbstractDs(), H5Location(), id(existing_id)
{
@@ -78,7 +74,6 @@ Attribute::Attribute(const hid_t existing_id) : AbstractDs(), H5Location(), id(e
///\param mem_type - IN: Attribute datatype (in memory)
///\param buf - IN: Data to be written
///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
Attribute::write(const DataType &mem_type, const void *buf) const
@@ -96,7 +91,6 @@ Attribute::write(const DataType &mem_type, const void *buf) const
///\param mem_type - IN: Attribute datatype (in memory)
///\param strg - IN: Data to be written
///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - Apr, 2003
//--------------------------------------------------------------------------
void
Attribute::write(const DataType &mem_type, const H5std_string &strg) const
@@ -131,7 +125,6 @@ Attribute::write(const DataType &mem_type, const H5std_string &strg) const
///\param mem_type - IN: Attribute datatype (in memory)
///\param buf - OUT: Buffer for read data
///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
Attribute::read(const DataType &mem_type, void *buf) const
@@ -149,7 +142,6 @@ Attribute::read(const DataType &mem_type, void *buf) const
///\param mem_type - IN: Attribute datatype (in memory)
///\param strg - IN: Buffer for read string
///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - Apr, 2003
// Modification
// Mar 2008
// Corrected a misunderstanding that H5Aread would allocate
@@ -186,7 +178,6 @@ Attribute::read(const DataType &mem_type, H5std_string &strg) const
///\brief Gets the size in memory of the attribute's data.
///\return Size of data (in memory)
///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - Apr 2009
//--------------------------------------------------------------------------
size_t
Attribute::getInMemDataSize() const
@@ -235,8 +226,9 @@ Attribute::getInMemDataSize() const
}
// Calculate and return the size of the data
- size_t data_size = type_size * num_elements;
- return (data_size);
+ size_t data_size = type_size * static_cast(num_elements);
+
+ return data_size;
}
//--------------------------------------------------------------------------
@@ -244,7 +236,6 @@ Attribute::getInMemDataSize() const
///\brief Gets a copy of the dataspace for this attribute.
///\return Dataspace instance
///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSpace
Attribute::getSpace() const
@@ -278,7 +269,6 @@ Attribute::getSpace() const
/// To get length of the attribute's name for buffer allocation,
/// an application can call this function passing in NULL for the
/// first argument and ignore the second argument.
-// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
ssize_t
Attribute::getName(char *attr_name, size_t buf_size) const
@@ -302,7 +292,6 @@ Attribute::getName(char *attr_name, size_t buf_size) const
///\brief Returns the name of this attribute as an \a H5std_string.
///\return Name of the attribute
///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - May, 2004
// Modification
// Mar 2014 - BMR
// Revised to use the modified getName() above
@@ -313,7 +302,7 @@ Attribute::getName() const
H5std_string attr_name; // attribute name to return
// Preliminary call to get the size of the attribute name
- ssize_t name_size = H5Aget_name(id, static_cast(0), NULL);
+ ssize_t name_size = H5Aget_name(id, 0, NULL);
// If H5Aget_name failed, throw exception
if (name_size < 0) {
@@ -324,11 +313,15 @@ Attribute::getName() const
}
// Attribute's name exists, retrieve it
else if (name_size > 0) {
- char *name_C = new char[name_size + 1]; // temporary C-string
- HDmemset(name_C, 0, name_size + 1); // clear buffer
+ // The actual size is the cast value + 1 for the terminal ASCII NUL
+ // (unfortunate in/out type sign mismatch)
+ size_t actual_name_size = static_cast(name_size) + 1;
+
+ // Create buffer for C string
+ char *name_C = new char[actual_name_size]();
// Use overloaded function
- name_size = getName(name_C, name_size + 1);
+ name_size = getName(name_C, actual_name_size);
// Convert the C attribute name to return
attr_name = name_C;
@@ -336,8 +329,9 @@ Attribute::getName() const
// Clean up resource
delete[] name_C;
}
+
// Return attribute's name
- return (attr_name);
+ return attr_name;
}
//--------------------------------------------------------------------------
@@ -348,7 +342,6 @@ Attribute::getName() const
///\return Name (or part of name) of the attribute
///\param len - IN: Desired length of the name
///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - 2000
// Modification
// Mar 2014 - BMR
// Revised to use the new getName() below
@@ -375,7 +368,6 @@ Attribute::getName(size_t len) const
/// This function retrieves the attribute's name as a string. The
/// buf_size can specify a specific length or default to 0, in
/// which case the entire name will be retrieved.
-// Programmer Binh-Minh Ribler - Nov, 2001
// Modification
// Mar 2014 - BMR
// Added to replace getName(size_t, H5std_string&) so that it'll
@@ -389,12 +381,12 @@ Attribute::getName(H5std_string &attr_name, size_t len) const
// If no length is provided, get the entire attribute name
if (len == 0) {
attr_name = getName();
- name_size = attr_name.length();
+ name_size = static_cast(attr_name.length());
}
// If length is provided, get that number of characters in name
else {
- char *name_C = new char[len + 1]; // temporary C-string
- HDmemset(name_C, 0, len + 1); // clear buffer
+ // Create buffer for C string
+ char *name_C = new char[len + 1]();
// Use overloaded function
name_size = getName(name_C, len + 1);
@@ -408,7 +400,7 @@ Attribute::getName(H5std_string &attr_name, size_t len) const
// Otherwise, keep attr_name intact
// Return name size
- return (name_size);
+ return name_size;
}
//--------------------------------------------------------------------------
@@ -420,7 +412,6 @@ Attribute::getName(H5std_string &attr_name, size_t len) const
// Param attr_name - OUT: Buffer for the name string
// Return Actual length of the attribute name
// Exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - Nov, 2001
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
@@ -438,7 +429,6 @@ Attribute::getName(H5std_string &attr_name, size_t len) const
///\exception H5::AttributeIException
// Note: H5Dget_storage_size returns 0 when there is no data. This
// function should have no failure. (from SLU)
-// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
hsize_t
Attribute::getStorageSize() const
@@ -456,7 +446,6 @@ Attribute::getStorageSize() const
// AbstractDS and Attribute are moved out of H5Object. In
// addition, member IdComponent::id is moved into subclasses, and
// IdComponent::getId now becomes pure virtual function.
-// Programmer Binh-Minh Ribler - May, 2008
// Modification
// Aug 2016 - BMR
// Note that Attribute is now inheriting from H5Location, because
@@ -476,7 +465,6 @@ Attribute::getId() const
// Exception H5::AttributeIException
// Description
// This private function is used in AbstractDs.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hid_t
Attribute::p_get_type() const
@@ -495,7 +483,6 @@ Attribute::p_get_type() const
// param mem_type - IN: Attribute datatype (in memory)
// param strg - IN: Buffer for read string
// exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - Jul, 2009
// Modification
// Jul 2009
// Separated the fixed length case from the original
@@ -511,7 +498,7 @@ Attribute::p_read_fixed_len(const DataType &mem_type, H5std_string &strg) const
// If there is data, allocate buffer and read it.
if (attr_size > 0) {
- char * strg_C = new char[attr_size + 1];
+ char *strg_C = new char[attr_size + 1];
herr_t ret_value = H5Aread(id, mem_type.getId(), strg_C);
if (ret_value < 0) {
delete[] strg_C; // de-allocate for fixed-len string
@@ -530,7 +517,6 @@ Attribute::p_read_fixed_len(const DataType &mem_type, H5std_string &strg) const
// param mem_type - IN: Attribute datatype (in memory)
// param strg - IN: Buffer for read string
// exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - Jul, 2009
// Modification
// Jul 2009
// Separated the variable length case from the original
@@ -551,7 +537,7 @@ Attribute::p_read_variable_len(const DataType &mem_type, H5std_string &strg) con
// Get string from the C char* and release resource allocated by C API
strg = strg_C;
- HDfree(strg_C);
+ free(strg_C);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -562,10 +548,9 @@ Attribute::p_read_variable_len(const DataType &mem_type, H5std_string &strg) con
///\exception H5::IdComponentException when the attempt to close the HDF5
/// object fails
// Description:
-// The underlaying reference counting in the C library ensures
+// The underlying reference counting in the C library ensures
// that the current valid id of this object is properly closed.
// Then the object's id is reset to the new id.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
Attribute::p_setId(const hid_t new_id)
@@ -587,7 +572,6 @@ Attribute::p_setId(const hid_t new_id)
///\brief Closes this attribute.
///
///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - Mar 9, 2005
//--------------------------------------------------------------------------
void
Attribute::close()
@@ -605,7 +589,6 @@ Attribute::close()
//--------------------------------------------------------------------------
// Function: Attribute destructor
///\brief Properly terminates access to this attribute.
-// Programmer Binh-Minh Ribler - 2000
// Modification
// - Replaced resetIdComponent() with decRefCount() to use C
// library ID reference counting mechanism - BMR, Jun 1, 2004
@@ -622,4 +605,14 @@ Attribute::~Attribute()
}
}
+//--------------------------------------------------------------------------
+// Function: Copy assignment operator
+Attribute &
+Attribute::operator=(const Attribute &original)
+{
+ IdComponent::operator=(original);
+
+ return *this;
+}
+
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Attribute.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Attribute.h
index 71bfa141eb5..970110274b4 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Attribute.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Attribute.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -38,7 +37,7 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
Attribute(const hid_t attr_id);
// Closes this attribute.
- virtual void close() H5_OVERRIDE;
+ virtual void close() override;
// Gets the name of this attribute.
ssize_t getName(char *attr_name, size_t buf_size = 0) const;
@@ -50,13 +49,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 H5_OVERRIDE;
+ virtual DataSpace getSpace() const override;
// Returns the amount of storage size required for this attribute.
- virtual hsize_t getStorageSize() const H5_OVERRIDE;
+ virtual hsize_t getStorageSize() const override;
// Returns the in memory size of this attribute's data.
- virtual size_t getInMemDataSize() const H5_OVERRIDE;
+ virtual size_t getInMemDataSize() const override;
// Reads data from this attribute.
void read(const DataType &mem_type, void *buf) const;
@@ -68,21 +67,24 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("Attribute");
}
// Gets the attribute id.
- virtual hid_t getId() const H5_OVERRIDE;
+ virtual hid_t getId() const override;
// Destructor: properly terminates access to this attribute.
- virtual ~Attribute() H5_OVERRIDE;
+ virtual ~Attribute() override;
+
+ // Copy assignment operator.
+ Attribute &operator=(const Attribute &original);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
protected:
// Sets the attribute id.
- virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
+ virtual void p_setId(const hid_t new_id) override;
#endif // DOXYGEN_SHOULD_SKIP_THIS
private:
@@ -92,7 +94,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 H5_OVERRIDE;
+ virtual hid_t p_get_type() const override;
// Reads variable or fixed len strings from this attribute.
void p_read_variable_len(const DataType &mem_type, H5std_string &strg) const;
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Classes.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Classes.h
index 7820ce2564e..b4a0670d468 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Classes.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Classes.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CommonFG.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CommonFG.cpp
index fb602d93319..d26c83fade0 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CommonFG.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CommonFG.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -13,7 +12,6 @@
#include
-#include "H5private.h" // for HDstrcpy
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -53,7 +51,6 @@ namespace H5 {
///\param name - IN: Name of the datatype to open
///\return DataType instance
///\exception H5::FileIException or H5::GroupIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType
CommonFG::openDataType(const char *name) const
@@ -77,7 +74,6 @@ CommonFG::openDataType(const char *name) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType
CommonFG::openDataType(const H5std_string &name) const
@@ -91,7 +87,6 @@ CommonFG::openDataType(const H5std_string &name) const
///\param name - IN: Name of the array datatype to open
///\return ArrayType instance
///\exception H5::FileIException or H5::GroupIException
-// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
ArrayType
CommonFG::openArrayType(const char *name) const
@@ -115,7 +110,6 @@ CommonFG::openArrayType(const char *name) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
ArrayType
CommonFG::openArrayType(const H5std_string &name) const
@@ -129,7 +123,6 @@ CommonFG::openArrayType(const H5std_string &name) const
///\param name - IN: Name of the compound datatype to open
///\return CompType instance
///\exception H5::FileIException or H5::GroupIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType
CommonFG::openCompType(const char *name) const
@@ -153,7 +146,6 @@ CommonFG::openCompType(const char *name) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType
CommonFG::openCompType(const H5std_string &name) const
@@ -167,7 +159,6 @@ CommonFG::openCompType(const H5std_string &name) const
///\param name - IN: Name of the enumeration datatype to open
///\return EnumType instance
///\exception H5::FileIException or H5::GroupIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType
CommonFG::openEnumType(const char *name) const
@@ -191,7 +182,6 @@ CommonFG::openEnumType(const char *name) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType
CommonFG::openEnumType(const H5std_string &name) const
@@ -205,7 +195,6 @@ CommonFG::openEnumType(const H5std_string &name) const
///\param name - IN: Name of the integer datatype to open
///\return IntType instance
///\exception H5::FileIException or H5::GroupIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType
CommonFG::openIntType(const char *name) const
@@ -229,7 +218,6 @@ CommonFG::openIntType(const char *name) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType
CommonFG::openIntType(const H5std_string &name) const
@@ -243,7 +231,6 @@ CommonFG::openIntType(const H5std_string &name) const
///\param name - IN: Name of the floating-point datatype to open
///\return FloatType instance
///\exception H5::FileIException or H5::GroupIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType
CommonFG::openFloatType(const char *name) const
@@ -267,7 +254,6 @@ CommonFG::openFloatType(const char *name) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType
CommonFG::openFloatType(const H5std_string &name) const
@@ -281,7 +267,6 @@ CommonFG::openFloatType(const H5std_string &name) const
///\param name - IN: Name of the string datatype to open
///\return StrType instance
///\exception H5::FileIException or H5::GroupIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType
CommonFG::openStrType(const char *name) const
@@ -305,7 +290,6 @@ CommonFG::openStrType(const char *name) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType
CommonFG::openStrType(const H5std_string &name) const
@@ -319,7 +303,6 @@ CommonFG::openStrType(const H5std_string &name) const
///\param name - IN: Name of the variable length datatype to open
///\return VarLenType instance
///\exception H5::FileIException or H5::GroupIException
-// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
VarLenType
CommonFG::openVarLenType(const char *name) const
@@ -343,7 +326,6 @@ CommonFG::openVarLenType(const char *name) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
VarLenType
CommonFG::openVarLenType(const H5std_string &name) const
@@ -355,21 +337,11 @@ CommonFG::openVarLenType(const H5std_string &name) const
//--------------------------------------------------------------------------
// Function: CommonFG default constructor
///\brief Default constructor.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CommonFG::CommonFG()
{
}
-//--------------------------------------------------------------------------
-// Function: CommonFG destructor
-///\brief Noop destructor.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-CommonFG::~CommonFG()
-{
-}
-
//--------------------------------------------------------------------------
// Function: f_DataType_setId - friend
// Purpose: This function is friend to class H5::DataType so that it
@@ -378,7 +350,6 @@ CommonFG::~CommonFG()
// Applications shouldn't need to use it.
// param dtype - IN/OUT: DataType object to be changed
// param new_id - IN: New id to set
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
void
f_DataType_setId(DataType *dtype, hid_t new_id)
@@ -394,7 +365,6 @@ f_DataType_setId(DataType *dtype, hid_t new_id)
// Applications shouldn't need to use it.
// param dset - IN/OUT: DataSet object to be changed
// param new_id - IN: New id to set
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
void
f_DataSet_setId(DataSet *dset, hid_t new_id)
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CommonFG.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CommonFG.h
index d87f9ca1348..6eb01db3bd1 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CommonFG.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CommonFG.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -73,7 +72,7 @@ class H5_DLLCPP CommonFG {
CommonFG();
// Noop destructor.
- virtual ~CommonFG();
+ virtual ~CommonFG() = default;
protected:
virtual void p_setId(const hid_t new_id) = 0;
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CompType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CompType.cpp
index 3b38c6d81cd..70bbe66556e 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CompType.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CompType.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -35,7 +34,6 @@ namespace H5 {
//--------------------------------------------------------------------------
// Function: CompType default constructor
///\brief Default constructor: Creates a stub compound datatype
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType::CompType() : DataType()
{
@@ -45,7 +43,6 @@ CompType::CompType() : DataType()
// Function: CompType copy constructor
///\brief Copy constructor: same HDF5 object as \a original
///\param original - IN: Original CompType instance
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType::CompType(const CompType &original) : DataType(original)
{
@@ -55,7 +52,6 @@ CompType::CompType(const CompType &original) : DataType(original)
// Function: CompType overloaded constructor
///\brief Creates a CompType object using the id of an existing datatype.
///\param existing_id - IN: Id of an existing compound datatype
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType::CompType(const hid_t existing_id) : DataType(existing_id)
{
@@ -69,7 +65,6 @@ CompType::CompType(const hid_t existing_id) : DataType(existing_id)
// Description
// The DataType constructor calls the C API H5Tcreate to create
// the compound datatype.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType::CompType(size_t size) : DataType(H5T_COMPOUND, size)
{
@@ -81,7 +76,6 @@ CompType::CompType(size_t size) : DataType(H5T_COMPOUND, size)
///\param dataset - IN: Dataset that this enum datatype associates with
///\return CompType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType::CompType(const DataSet &dataset) : DataType()
{
@@ -101,7 +95,6 @@ CompType::CompType(const DataSet &dataset) : DataType()
///\param loc - IN: Location of the type
///\param dtype_name - IN: Compound type name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openCompType(const char*) to
@@ -120,7 +113,6 @@ CompType::CompType(const H5Location &loc, const char *dtype_name) : DataType()
///\param loc - IN: Location of the type
///\param dtype_name - IN: Compound type name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openCompType(const H5Location&)
@@ -138,7 +130,6 @@ CompType::CompType(const H5Location &loc, const H5std_string &dtype_name) : Data
/// binary object description of this datatype.
///
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Aug 2017
//--------------------------------------------------------------------------
DataType *
CompType::decode() const
@@ -160,7 +151,6 @@ CompType::decode() const
///\brief Returns the number of members in this compound datatype.
///\return Number of members
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int
CompType::getNmembers() const
@@ -179,7 +169,6 @@ CompType::getNmembers() const
///\param member_num - IN: Zero-based index of the member
///\return Name of member
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5std_string
CompType::getMemberName(unsigned member_num) const
@@ -205,7 +194,6 @@ CompType::getMemberName(unsigned member_num) const
/// Members are stored in no particular order with numbers 0
/// through N-1, where N is the value returned by the member
/// function \c CompType::getNmembers.
-// Programmer Binh-Minh Ribler - May 16, 2002
//--------------------------------------------------------------------------
int
CompType::getMemberIndex(const char *name) const
@@ -228,7 +216,6 @@ CompType::getMemberIndex(const H5std_string &name) const
/// respect to the beginning of the compound data type datum.
///\param member_num - IN: Zero-based index of the member
///\return Byte offset
-// Programmer Binh-Minh Ribler - 2000
// Description
/// Members are stored in no particular order with numbers 0
/// through N-1, where N is the value returned by the member
@@ -250,7 +237,6 @@ CompType::getMemberOffset(unsigned member_num) const
///\param member_num - IN: Zero-based index of the member
///\return Type class of the member
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
// Modification
// Modified to use H5Tget_member_class instead. - Jul, 2005
//--------------------------------------------------------------------------
@@ -289,7 +275,6 @@ CompType::p_get_member_type(unsigned member_num) const
///\param member_num - IN: Zero-based index of the member
///\return DataType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType
CompType::getMemberDataType(unsigned member_num) const
@@ -311,7 +296,6 @@ CompType::getMemberDataType(unsigned member_num) const
///\param member_num - IN: Zero-based index of the member
///\return ArrayType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
ArrayType
CompType::getMemberArrayType(unsigned member_num) const
@@ -333,7 +317,6 @@ CompType::getMemberArrayType(unsigned member_num) const
///\param member_num - IN: Zero-based index of the member
///\return CompType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType
CompType::getMemberCompType(unsigned member_num) const
@@ -355,7 +338,6 @@ CompType::getMemberCompType(unsigned member_num) const
///\param member_num - IN: Zero-based index of the member
///\return EnumType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType
CompType::getMemberEnumType(unsigned member_num) const
@@ -377,7 +359,6 @@ CompType::getMemberEnumType(unsigned member_num) const
///\param member_num - IN: Zero-based index of the member
///\return IntType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType
CompType::getMemberIntType(unsigned member_num) const
@@ -399,7 +380,6 @@ CompType::getMemberIntType(unsigned member_num) const
///\param member_num - IN: Zero-based index of the member
///\return FloatType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType
CompType::getMemberFloatType(unsigned member_num) const
@@ -421,7 +401,6 @@ CompType::getMemberFloatType(unsigned member_num) const
///\param member_num - IN: Zero-based index of the member
///\return StrType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType
CompType::getMemberStrType(unsigned member_num) const
@@ -443,7 +422,6 @@ CompType::getMemberStrType(unsigned member_num) const
///\param member_num - IN: Zero-based index of the member
///\return VarLenType instance
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
VarLenType
CompType::getMemberVarLenType(unsigned member_num) const
@@ -498,7 +476,6 @@ void CompType::getMemberType(unsigned member_num, StrType& strtype) const
///\param offset - IN: Offset in memory structure of the field to insert
///\param new_member - IN: New member to be inserted
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
CompType::insertMember(const H5std_string &name, size_t offset, const DataType &new_member) const
@@ -521,7 +498,6 @@ CompType::insertMember(const H5std_string &name, size_t offset, const DataType &
///\brief Recursively removes padding from within a compound datatype.
///
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
CompType::pack() const
@@ -540,7 +516,6 @@ CompType::pack() const
///\exception H5::DataTypeIException
// Note
// H5Tset_size works on atom datatypes and compound datatypes only
-// Programmer Binh-Minh Ribler - 2014
//--------------------------------------------------------------------------
void
CompType::setSize(size_t size) const
@@ -552,13 +527,4 @@ CompType::setSize(size_t size) const
}
}
-//--------------------------------------------------------------------------
-// Function: CompType destructor
-///\brief Properly terminates access to this compound datatype.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-CompType::~CompType()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CompType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CompType.h
index 4424d894e8e..a642b0d5143 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CompType.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CompType.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -45,7 +44,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 H5_OVERRIDE;
+ virtual DataType *decode() const override;
// Returns the type class of the specified member of this compound
// datatype. It provides to the user a way of knowing what type
@@ -108,13 +107,13 @@ class H5_DLLCPP CompType : public DataType {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("CompType");
}
// Noop destructor.
- virtual ~CompType() H5_OVERRIDE;
+ virtual ~CompType() override = default;
private:
// Contains common code that is used by the member functions
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Cpp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Cpp.h
index 9272bdb1f5a..34fdef2032d 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Cpp.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Cpp.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -48,14 +47,4 @@
#include "H5File.h"
#include "H5Library.h"
-/* Some C++ compilers do not have offsetof macro; define to bypass the problem
- - BMR- -EIP- 2007/08/01
-*/
-#ifndef H5_CXX_HAVE_OFFSETOF
-#ifdef HOFFSET
-#undef HOFFSET
-#endif
-#define HOFFSET(TYPE, MEMBER) ((size_t) & ((TYPE *)0)->MEMBER)
-#endif
-
#endif // H5Cpp_H
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CppDoc.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CppDoc.h
index 4337a6fe911..37bd8a5cd07 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CppDoc.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5CppDoc.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DaccProp.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DaccProp.cpp
index 35c071ac7c8..ba4c8ef60b0 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DaccProp.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DaccProp.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -41,7 +40,6 @@ DSetAccPropList *DSetAccPropList::DEFAULT_ = 0;
// If DSetAccPropList::DEFAULT_ already points to an allocated
// object, throw a PropListIException. This scenario should
// not happen.
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
DSetAccPropList *
DSetAccPropList::getConstant()
@@ -67,13 +65,11 @@ DSetAccPropList::getConstant()
// Function: DSetAccPropList::deleteConstants
// Purpose: Deletes the constant object that DSetAccPropList::DEFAULT_
// points to.
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
void
DSetAccPropList::deleteConstants()
{
- if (DEFAULT_ != 0)
- delete DEFAULT_;
+ delete DEFAULT_;
}
//--------------------------------------------------------------------------
@@ -86,7 +82,6 @@ const DSetAccPropList &DSetAccPropList::DEFAULT = *getConstant();
//--------------------------------------------------------------------------
// Function: DSetAccPropList default constructor
///\brief Default constructor: creates a stub dataset creation property list
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetAccPropList::DSetAccPropList() : LinkAccPropList(H5P_DATASET_ACCESS)
{
@@ -96,7 +91,6 @@ DSetAccPropList::DSetAccPropList() : LinkAccPropList(H5P_DATASET_ACCESS)
// Function: DSetAccPropList copy constructor
///\brief Copy constructor: same HDF5 object as \a original
/// DSetAccPropList object
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetAccPropList::DSetAccPropList(const DSetAccPropList &orig) : LinkAccPropList(orig)
{
@@ -106,7 +100,6 @@ DSetAccPropList::DSetAccPropList(const DSetAccPropList &orig) : LinkAccPropList(
// Function: DSetAccPropList overloaded constructor
///\brief Creates a DSetAccPropList object using the id of an
/// existing dataset creation property list.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetAccPropList::DSetAccPropList(const hid_t plist_id) : LinkAccPropList(plist_id)
{
@@ -160,13 +153,4 @@ DSetAccPropList::getChunkCache(size_t &rdcc_nslots, size_t &rdcc_nbytes, double
}
}
-//--------------------------------------------------------------------------
-// Function: DSetAccPropList destructor
-///\brief Noop destructor.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-DSetAccPropList::~DSetAccPropList()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DaccProp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DaccProp.h
index 398918df407..3f101f3aa70 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DaccProp.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DaccProp.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -38,7 +37,7 @@ class H5_DLLCPP DSetAccPropList : public LinkAccPropList {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("DSetAccPropList");
}
@@ -51,7 +50,7 @@ class H5_DLLCPP DSetAccPropList : public LinkAccPropList {
DSetAccPropList(const hid_t plist_id);
// Noop destructor.
- virtual ~DSetAccPropList() H5_OVERRIDE;
+ virtual ~DSetAccPropList() override = default;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.cpp
index 47031dbfaec..40b40f2f21e 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -11,10 +10,10 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include
#include
#include
-#include "H5private.h" // for HDfree
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -268,8 +267,10 @@ DataSet::getInMemDataSize() const
}
// Calculate and return the size of the data
- size_t data_size = type_size * num_elements;
- return (data_size);
+ // Note that large datasets can overflow a size_t
+ size_t data_size = type_size * static_cast(num_elements);
+
+ return data_size;
}
//--------------------------------------------------------------------------
@@ -717,8 +718,8 @@ DataSet::p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, con
// If there is data, allocate buffer and read it.
if (data_size > 0) {
- char *strg_C = new char[data_size + 1];
- HDmemset(strg_C, 0, data_size + 1); // clear buffer
+ // Create buffer for C string
+ char *strg_C = new char[data_size + 1]();
herr_t ret_value = H5Dread(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg_C);
@@ -728,7 +729,7 @@ DataSet::p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, con
}
// Get string from the C char* and release resource allocated locally
- strg = strg_C;
+ strg = H5std_string(strg_C, data_size);
delete[] strg_C;
}
}
@@ -759,7 +760,7 @@ DataSet::p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id,
// Get string from the C char* and release resource allocated by C API
strg = strg_C;
- HDfree(strg_C);
+ free(strg_C);
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -770,7 +771,7 @@ DataSet::p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id,
///\exception H5::IdComponentException when the attempt to close the HDF5
/// object fails
// Description:
-// The underlaying reference counting in the C library ensures
+// The underlying reference counting in the C library ensures
// that the current valid id of this object is properly closed.
// Then the object's id is reset to the new id.
//--------------------------------------------------------------------------
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.h
index d50b2c552d8..399235086f6 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSet.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -28,7 +27,7 @@ namespace H5 {
class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
public:
// Close this dataset.
- virtual void close() H5_OVERRIDE;
+ virtual void close() override;
// Extends the dataset with unlimited dimension.
void extend(const hsize_t *size) const;
@@ -53,16 +52,16 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
haddr_t getOffset() const;
// Gets the dataspace of this dataset.
- virtual DataSpace getSpace() const H5_OVERRIDE;
+ virtual DataSpace getSpace() const 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 H5_OVERRIDE;
+ virtual hsize_t getStorageSize() const override;
// Returns the in memory size of this attribute's data.
- virtual size_t getInMemDataSize() const H5_OVERRIDE;
+ virtual size_t getInMemDataSize() const override;
// Returns the number of bytes required to store VL data.
hsize_t getVlenBufSize(const DataType &type, const DataSpace &space) const;
@@ -78,20 +77,20 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
// The memory and file dataspaces and the transferring property list
// can be defaults.
void read(void *buf, const DataType &mem_type, const DataSpace &mem_space = DataSpace::ALL,
- const DataSpace & file_space = DataSpace::ALL,
+ const DataSpace &file_space = DataSpace::ALL,
const DSetMemXferPropList &xfer_plist = DSetMemXferPropList::DEFAULT) const;
void read(H5std_string &buf, const DataType &mem_type, const DataSpace &mem_space = DataSpace::ALL,
- const DataSpace & file_space = DataSpace::ALL,
+ const DataSpace &file_space = DataSpace::ALL,
const DSetMemXferPropList &xfer_plist = DSetMemXferPropList::DEFAULT) const;
// Writes the buffered data to this dataset.
// The memory and file dataspaces and the transferring property list
// can be defaults.
void write(const void *buf, const DataType &mem_type, const DataSpace &mem_space = DataSpace::ALL,
- const DataSpace & file_space = DataSpace::ALL,
+ const DataSpace &file_space = DataSpace::ALL,
const DSetMemXferPropList &xfer_plist = DSetMemXferPropList::DEFAULT) const;
void write(const H5std_string &buf, const DataType &mem_type, const DataSpace &mem_space = DataSpace::ALL,
- const DataSpace & file_space = DataSpace::ALL,
+ const DataSpace &file_space = DataSpace::ALL,
const DSetMemXferPropList &xfer_plist = DSetMemXferPropList::DEFAULT) const;
// Iterates the selected elements in the specified dataspace - not implemented in C++ style yet
@@ -100,7 +99,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("DataSet");
}
@@ -124,15 +123,15 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
DataSet(const hid_t existing_id);
// Gets the dataset id.
- virtual hid_t getId() const H5_OVERRIDE;
+ virtual hid_t getId() const override;
// Destructor: properly terminates access to this dataset.
- virtual ~DataSet() H5_OVERRIDE;
+ virtual ~DataSet() override;
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Sets the dataset id.
- virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
+ virtual void p_setId(const hid_t new_id) override;
#endif // DOXYGEN_SHOULD_SKIP_THIS
private:
@@ -142,7 +141,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 H5_OVERRIDE;
+ virtual hid_t p_get_type() const 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,
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSpace.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSpace.cpp
index 0485530d785..403f9ece67b 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSpace.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSpace.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -39,7 +38,6 @@ DataSpace *DataSpace::ALL_ = 0;
// Description
// If DataSpace::ALL_ already points to an allocated object, throw
// a DataSpaceIException. This scenario should not happen.
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
DataSpace *
DataSpace::getConstant()
@@ -64,13 +62,11 @@ DataSpace::getConstant()
//--------------------------------------------------------------------------
// Function: DataSpace::deleteConstants
// Purpose: Deletes the constant object that DataSpace::ALL_ points to
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
void
DataSpace::deleteConstants()
{
- if (ALL_ != 0)
- delete ALL_;
+ delete ALL_;
}
//--------------------------------------------------------------------------
@@ -87,11 +83,9 @@ const DataSpace &DataSpace::ALL = *getConstant();
/// currently can be either \c H5S_SCALAR or \c H5S_SIMPLE;
/// default to \c H5S_SCALAR.
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataSpace::DataSpace(H5S_class_t type) : IdComponent()
+DataSpace::DataSpace(H5S_class_t type) : IdComponent(), id{H5Screate(type)}
{
- id = H5Screate(type);
if (id < 0) {
throw DataSpaceIException("DataSpace constructor", "H5Screate failed");
}
@@ -104,11 +98,10 @@ DataSpace::DataSpace(H5S_class_t type) : IdComponent()
///\param dims - IN: An array of the size of each dimension.
///\param maxdims - IN: An array of the maximum size of each dimension.
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataSpace::DataSpace(int rank, const hsize_t *dims, const hsize_t *maxdims) : IdComponent()
+DataSpace::DataSpace(int rank, const hsize_t *dims, const hsize_t *maxdims)
+ : IdComponent(), id{H5Screate_simple(rank, dims, maxdims)}
{
- id = H5Screate_simple(rank, dims, maxdims);
if (id < 0) {
throw DataSpaceIException("DataSpace constructor", "H5Screate_simple failed");
}
@@ -120,7 +113,6 @@ DataSpace::DataSpace(int rank, const hsize_t *dims, const hsize_t *maxdims) : Id
/// dataspace.
///\param existing_id - IN: Id of an existing dataspace
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSpace::DataSpace(const hid_t existing_id) : IdComponent(), id(existing_id)
{
@@ -131,7 +123,6 @@ DataSpace::DataSpace(const hid_t existing_id) : IdComponent(), id(existing_id)
// Function: DataSpace copy constructor
///\brief Copy constructor: same HDF5 object as \a original
///\param original - IN: DataSpace object to copy
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSpace::DataSpace(const DataSpace &original) : IdComponent(), id(original.id)
{
@@ -143,7 +134,6 @@ DataSpace::DataSpace(const DataSpace &original) : IdComponent(), id(original.id)
///\brief Makes a copy of an existing dataspace.
///\param like_space - IN: Dataspace to be copied
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
// Modification
// - Replaced resetIdComponent() with decRefCount() to use C
// library ID reference counting mechanism - BMR, Jun 1, 2004
@@ -179,7 +169,6 @@ DataSpace::copy(const DataSpace &like_space)
// Description
// Makes a copy of the type on the right hand side and stores
// the new id in the left hand side object.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataSpace &
DataSpace::operator=(const DataSpace &rhs)
@@ -195,7 +184,6 @@ DataSpace::operator=(const DataSpace &rhs)
///\return \c true if the dataspace is a simple dataspace, and \c false,
/// otherwise
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool
DataSpace::isSimple() const
@@ -220,7 +208,6 @@ DataSpace::isSimple() const
/// an extent, allowing the same shaped selection to be moved
/// to different locations within a dataspace without requiring
/// it to be re-defined.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataSpace::offsetSimple(const hssize_t *offset) const
@@ -239,7 +226,6 @@ DataSpace::offsetSimple(const hssize_t *offset) const
///\return Number of dimensions, the same value as returned by
/// \c DataSpace::getSimpleExtentNdims()
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int
DataSpace::getSimpleExtentDims(hsize_t *dims, hsize_t *maxdims) const
@@ -257,7 +243,6 @@ DataSpace::getSimpleExtentDims(hsize_t *dims, hsize_t *maxdims) const
///\brief Returns the dimensionality of a dataspace.
///\return Number of dimensions
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int
DataSpace::getSimpleExtentNdims() const
@@ -280,7 +265,6 @@ DataSpace::getSimpleExtentNdims() const
// 12/05/00: due to C API change
// return type hssize_t vs. hsize_t
// num_elements = -1 when failure occurs vs. 0
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hssize_t
DataSpace::getSimpleExtentNpoints() const
@@ -300,7 +284,6 @@ DataSpace::getSimpleExtentNpoints() const
///\brief Returns the current class of a dataspace.
///\return Class of the dataspace
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5S_class_t
DataSpace::getSimpleExtentType() const
@@ -318,7 +301,6 @@ DataSpace::getSimpleExtentType() const
///\brief Copies the extent of a dataspace.
///\param dest_space - IN: Dataspace to copy from
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataSpace::extentCopy(const DataSpace &dest_space) const
@@ -337,7 +319,6 @@ DataSpace::extentCopy(const DataSpace &dest_space) const
// misses const. This wrapper will be removed in future release.
// Param dest_space - IN: Dataspace to copy from
// Exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
@@ -355,7 +336,6 @@ DataSpace::extentCopy(const DataSpace &dest_space) const
///\param current_size - IN: Array containing current size of dataspace
///\param maximum_size - IN: Array containing maximum size of dataspace
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataSpace::setExtentSimple(int rank, const hsize_t *current_size, const hsize_t *maximum_size) const
@@ -372,7 +352,6 @@ DataSpace::setExtentSimple(int rank, const hsize_t *current_size, const hsize_t
///\brief Removes the extent from a dataspace.
///
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataSpace::setExtentNone() const
@@ -388,7 +367,6 @@ DataSpace::setExtentNone() const
///\brief Returns the number of elements in a dataspace selection.
///\return Number of elements
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hssize_t
DataSpace::getSelectNpoints() const
@@ -407,7 +385,6 @@ DataSpace::getSelectNpoints() const
///\brief Returns number of hyperslab blocks.
///\return Number of hyperslab blocks
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hssize_t
DataSpace::getSelectHyperNblocks() const
@@ -428,7 +405,6 @@ DataSpace::getSelectHyperNblocks() const
///\param numblocks - IN: Number of hyperslab blocks to get
///\param buf - IN: List of hyperslab blocks selected
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataSpace::getSelectHyperBlocklist(hsize_t startblock, hsize_t numblocks, hsize_t *buf) const
@@ -446,7 +422,6 @@ DataSpace::getSelectHyperBlocklist(hsize_t startblock, hsize_t numblocks, hsize_
///\brief Returns the number of element points in the current selection.
///\return Number of element points
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hssize_t
DataSpace::getSelectElemNpoints() const
@@ -468,7 +443,6 @@ DataSpace::getSelectElemNpoints() const
///\par Description
/// For information, please refer to the C API
/// H5Sget_select_elem_pointlist in the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataSpace::getSelectElemPointlist(hsize_t startpoint, hsize_t numpoints, hsize_t *buf) const
@@ -490,7 +464,6 @@ DataSpace::getSelectElemPointlist(hsize_t startpoint, hsize_t numpoints, hsize_t
///\par Description
/// For information, please refer to the H5Sget_select_bounds API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataSpace::getSelectBounds(hsize_t *start, hsize_t *end) const
@@ -514,7 +487,6 @@ DataSpace::getSelectBounds(hsize_t *start, hsize_t *end) const
///\par Description
/// For information, please refer to the H5Sselect_elements API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataSpace::selectElements(H5S_seloper_t op, const size_t num_elements, const hsize_t *coord) const
@@ -531,7 +503,6 @@ DataSpace::selectElements(H5S_seloper_t op, const size_t num_elements, const hsi
///\brief Selects the entire dataspace.
///
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataSpace::selectAll() const
@@ -547,7 +518,6 @@ DataSpace::selectAll() const
///\brief Resets the selection region to include no elements.
///
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataSpace::selectNone() const
@@ -565,7 +535,6 @@ DataSpace::selectNone() const
///\return \c true if the selection is within the extent of the
/// dataspace, and \c false, otherwise
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool
DataSpace::selectValid() const
@@ -592,7 +561,6 @@ DataSpace::selectValid() const
///\par Description
/// For information, please refer to the H5Sselect_hyperslab API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataSpace::selectHyperslab(H5S_seloper_t op, const hsize_t *count, const hsize_t *start,
@@ -615,7 +583,6 @@ DataSpace::selectHyperslab(H5S_seloper_t op, const hsize_t *count, const hsize_t
// AbstractDS and Attribute are moved out of H5Object. In
// addition, member IdComponent::id is moved into subclasses, and
// IdComponent::getId now becomes pure virtual function.
-// Programmer Binh-Minh Ribler - May, 2008
//--------------------------------------------------------------------------
hid_t
DataSpace::getId() const
@@ -631,10 +598,9 @@ DataSpace::getId() const
///\exception H5::IdComponentException when the attempt to close the HDF5
/// object fails
// Description:
-// The underlaying reference counting in the C library ensures
+// The underlying reference counting in the C library ensures
// that the current valid id of this object is properly closed.
// Then the object's id is reset to the new id.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataSpace::p_setId(const hid_t new_id)
@@ -656,7 +622,6 @@ DataSpace::p_setId(const hid_t new_id)
///\brief Closes this dataspace.
///
///\exception H5::DataSpaceIException
-// Programmer Binh-Minh Ribler - Mar 9, 2005
//--------------------------------------------------------------------------
void
DataSpace::close()
@@ -675,7 +640,6 @@ DataSpace::close()
//--------------------------------------------------------------------------
// Function: DataSpace destructor
///\brief Properly terminates access to this dataspace.
-// Programmer Binh-Minh Ribler - 2000
// Modification
// - Replaced resetIdComponent() with decRefCount() to use C
// library ID reference counting mechanism - BMR, Jun 1, 2004
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSpace.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSpace.h
index 5583baa51b9..136a8ea63b8 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSpace.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataSpace.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -43,7 +42,7 @@ class H5_DLLCPP DataSpace : public IdComponent {
DataSpace &operator=(const DataSpace &rhs);
// Closes this dataspace.
- virtual void close() H5_OVERRIDE;
+ virtual void close() override;
// Makes copy of an existing dataspace.
void copy(const DataSpace &like_space);
@@ -115,25 +114,25 @@ class H5_DLLCPP DataSpace : public IdComponent {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("DataSpace");
}
// Gets the dataspace id.
- virtual hid_t getId() const H5_OVERRIDE;
+ virtual hid_t getId() const override;
// Deletes the global constant
static void deleteConstants();
// Destructor: properly terminates access to this dataspace.
- virtual ~DataSpace() H5_OVERRIDE;
+ virtual ~DataSpace() override;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
protected:
// Sets the dataspace id.
- virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
+ virtual void p_setId(const hid_t new_id) override;
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataType.cpp
index 3228dcbf175..13b0decc022 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataType.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataType.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -11,6 +10,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include
#include
#include
@@ -32,7 +32,6 @@
#include "H5DataType.h"
#include "H5AtomType.h"
#include "H5PredType.h"
-#include "H5private.h"
#include "H5AbstractDs.h"
#include "H5DataSet.h"
#include "H5Attribute.h"
@@ -44,7 +43,6 @@ using std::endl;
//--------------------------------------------------------------------------
// Function: DataType default constructor
///\brief Default constructor: Creates a stub datatype
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType::DataType() : H5Object(), id(H5I_INVALID_HID), encoded_buf(NULL), buf_size(0)
{
@@ -57,7 +55,6 @@ DataType::DataType() : H5Object(), id(H5I_INVALID_HID), encoded_buf(NULL), buf_s
// Description
// Constructor creates a copy of an existing DataType using
// its id.
-// Programmer Binh-Minh Ribler - 2000
// Modification
// Dec, 2005
// Removed second argument, "predefined", after changing to the
@@ -74,12 +71,10 @@ DataType::DataType(const hid_t existing_id) : H5Object(), id(existing_id), encod
///\param type_class - IN: Class of datatype to create
///\param size - IN: Number of bytes in the datatype to create
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-DataType::DataType(const H5T_class_t type_class, size_t size) : H5Object(), encoded_buf(NULL), buf_size(0)
+DataType::DataType(const H5T_class_t type_class, size_t size)
+ : H5Object(), id{H5Tcreate(type_class, size)}, encoded_buf(NULL), buf_size(0)
{
- // Call C routine to create the new datatype
- id = H5Tcreate(type_class, size);
if (id < 0) {
throw DataTypeIException("DataType constructor", "H5Tcreate failed");
}
@@ -94,12 +89,12 @@ DataType::DataType(const H5T_class_t type_class, size_t size) : H5Object(), enco
///\param ref_type - IN: Reference type - default to H5R_OBJECT
///\param plist - IN: Property list - default to PropList::DEFAULT
///\exception H5::ReferenceException
-// Programmer Binh-Minh Ribler - Oct, 2006
//--------------------------------------------------------------------------
DataType::DataType(const H5Location &loc, const void *ref, H5R_type_t ref_type, const PropList &plist)
- : H5Object(), encoded_buf(NULL), buf_size(0)
+ : H5Object(), id{H5Location::p_dereference(loc.getId(), ref, ref_type, plist,
+ "constructor - by dereference")},
+ encoded_buf(NULL), buf_size(0)
{
- id = H5Location::p_dereference(loc.getId(), ref, ref_type, plist, "constructor - by dereference");
}
//--------------------------------------------------------------------------
@@ -111,7 +106,6 @@ DataType::DataType(const H5Location &loc, const void *ref, H5R_type_t ref_type,
// param ref_type - IN: Reference type - default to H5R_OBJECT
// param plist - IN: Property list - default to PropList::DEFAULT
// exception H5::ReferenceException
-// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// Jul, 2008
// Added for application convenience.
@@ -126,7 +120,6 @@ H5Object(), id(H5I_INVALID_HID), encoded_buf(NULL), buf_size(0)
//--------------------------------------------------------------------------
// Function: DataType copy constructor
///\brief Copy constructor: same HDF5 object as \a original
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType::DataType(const DataType &original) : H5Object(), id(original.id), encoded_buf(NULL), buf_size(0)
{
@@ -138,7 +131,6 @@ DataType::DataType(const DataType &original) : H5Object(), id(original.id), enco
///\brief Creates a DataType instance using a predefined type
///\param pred_type - IN: Predefined datatype
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2015
// Description
// Copying the type so that when a predefined type is passed in,
// a copy of it is made, not just a duplicate of the HDF5 id.
@@ -146,10 +138,9 @@ DataType::DataType(const DataType &original) : H5Object(), id(original.id), enco
// unnecessarily and will produce undefined behavior.
// -BMR, Apr 2015
//--------------------------------------------------------------------------
-DataType::DataType(const PredType &pred_type) : H5Object(), encoded_buf(NULL), buf_size(0)
+DataType::DataType(const PredType &pred_type)
+ : H5Object(), id{H5Tcopy(pred_type.getId())}, encoded_buf(NULL), buf_size(0)
{
- // Call C routine to copy the datatype
- id = H5Tcopy(pred_type.getId());
if (id < 0)
throw DataTypeIException("DataType constructor", "H5Tcopy failed");
}
@@ -161,16 +152,15 @@ DataType::DataType(const PredType &pred_type) : H5Object(), encoded_buf(NULL), b
///\param loc - IN: Location of the type
///\param dtype_name - IN: Datatype name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openDataType(const char*) to
// improve usability.
// -BMR, Dec 2016
//--------------------------------------------------------------------------
-DataType::DataType(const H5Location &loc, const char *dtype_name) : H5Object(), encoded_buf(NULL), buf_size(0)
+DataType::DataType(const H5Location &loc, const char *dtype_name)
+ : H5Object(), id{p_opentype(loc, dtype_name)}, encoded_buf(NULL), buf_size(0)
{
- id = p_opentype(loc, dtype_name);
}
//--------------------------------------------------------------------------
@@ -180,7 +170,6 @@ DataType::DataType(const H5Location &loc, const char *dtype_name) : H5Object(),
///\param loc - IN: Location of the type
///\param dtype_name - IN: Datatype name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openDataType(const H5std_string&) to
@@ -188,9 +177,8 @@ DataType::DataType(const H5Location &loc, const char *dtype_name) : H5Object(),
// -BMR, Dec 2016
//--------------------------------------------------------------------------
DataType::DataType(const H5Location &loc, const H5std_string &dtype_name)
- : H5Object(), encoded_buf(NULL), buf_size(0)
+ : H5Object(), id{p_opentype(loc, dtype_name.c_str())}, encoded_buf(NULL), buf_size(0)
{
- id = p_opentype(loc, dtype_name.c_str());
}
//--------------------------------------------------------------------------
@@ -198,7 +186,6 @@ DataType::DataType(const H5Location &loc, const H5std_string &dtype_name)
///\brief Copies an existing datatype to this datatype object
///\param like_type - IN: Datatype to be copied
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
// Modification
// - Replaced resetIdComponent() with decRefCount() to use C
// library ID reference counting mechanism - BMR, Jun 1, 2004
@@ -227,7 +214,6 @@ DataType::copy(const DataType &like_type)
///\brief Copies the datatype of the given dataset to this datatype object
///\param dset - IN: Dataset
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Jan, 2007
///\par Description
/// The resulted dataset will be transient and modifiable.
//--------------------------------------------------------------------------
@@ -254,7 +240,6 @@ DataType::copy(const DataSet &dset)
// Purpose Returns an id of a type by decoding the binary object
/// description of this datatype.
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Aug 2017
//--------------------------------------------------------------------------
hid_t
DataType::p_decode() const
@@ -283,7 +268,6 @@ DataType::p_decode() const
/// description of this datatype.
///
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Aug 2017
//--------------------------------------------------------------------------
DataType *
DataType::decode() const
@@ -305,7 +289,6 @@ DataType::decode() const
///\brief Creates a binary object description of this datatype.
///
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Aug 2017
//--------------------------------------------------------------------------
void
DataType::encode()
@@ -318,8 +301,9 @@ DataType::encode()
// Allocate buffer and call C function again to encode
if (buf_size > 0) {
- encoded_buf = (unsigned char *)HDcalloc((size_t)1, buf_size);
- ret_value = H5Tencode(id, encoded_buf, &buf_size);
+ encoded_buf = new unsigned char[buf_size]();
+
+ ret_value = H5Tencode(id, encoded_buf, &buf_size);
if (ret_value < 0) {
throw DataTypeIException("DataType::encode", "H5Tencode failed");
}
@@ -335,15 +319,11 @@ DataType::encode()
/// description.
///
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Aug 2017
//--------------------------------------------------------------------------
bool
DataType::hasBinaryDesc() const
{
- if (encoded_buf != NULL)
- return true;
- else
- return false;
+ return encoded_buf != NULL;
}
//--------------------------------------------------------------------------
@@ -355,7 +335,6 @@ DataType::hasBinaryDesc() const
// Description
// Makes a copy of the type on the right hand side and stores
// the new id in the left hand side object.
-// Programmer Binh-Minh Ribler - 2000
// Modification
// Changed operator= to simply copy the id of rhs instead of
// calling H5Tcopy because, when the operator= is invoked, a
@@ -381,7 +360,6 @@ DataType::operator=(const DataType &rhs)
///\param compared_type - IN: Reference to the datatype to compare
///\return true if the datatypes are equal, and false, otherwise.
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool
DataType::operator==(const DataType &compared_type) const
@@ -421,7 +399,6 @@ DataType::operator!=(const DataType &compared_type) const
// datatype, or attribute.
//\param name - IN: Name of the datatype
//\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
// Modification:
// Copied from DataType::commit and made into private function
// to be commonly used by several overloads of DataType::commit.
@@ -443,7 +420,6 @@ DataType::p_commit(hid_t loc_id, const char *name)
///\param loc - IN: A location (file, dataset, datatype, or group)
///\param name - IN: Name of the datatype
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Jan, 2007
//--------------------------------------------------------------------------
void
DataType::commit(const H5Location &loc, const char *name)
@@ -459,7 +435,6 @@ DataType::commit(const H5Location &loc, const char *name)
// Param loc - IN: A location (file, dataset, datatype, or group)
// Param name - IN: Name of the datatype
// Exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Jan, 2007
// Modification
// Planned for removal. -BMR, 2014/04/16
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
@@ -475,7 +450,6 @@ DataType::commit(const H5Location &loc, const char *name)
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in the type of the
/// argument \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataType::commit(const H5Location &loc, const H5std_string &name)
@@ -491,7 +465,6 @@ DataType::commit(const H5Location &loc, const H5std_string &name)
// Param loc - IN: A location (file, dataset, datatype, or group)
// Param name - IN: Name of the datatype
// Exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Jan, 2007
// Modification
// Planned for removal. -BMR, 2014/04/16
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
@@ -509,7 +482,6 @@ DataType::commit(const H5Location &loc, const H5std_string &name)
///\return \c true if the datatype is a named type, and \c false,
/// otherwise.
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool
DataType::committed() const
@@ -533,7 +505,6 @@ DataType::committed() const
///\param pcdata - IN: Pointer to type conversion data
///\return Pointer to a suitable conversion function
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_conv_t
DataType::find(const DataType &dest, H5T_cdata_t **pcdata) const
@@ -557,7 +528,6 @@ DataType::find(const DataType &dest, H5T_cdata_t **pcdata) const
///\param plist - IN: Property list - default to PropList::DEFAULT
///\return Pointer to a suitable conversion function
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataType::convert(const DataType &dest, size_t nelmts, void *buf, void *background,
@@ -587,7 +557,6 @@ DataType::convert(const DataType &dest, size_t nelmts, void *buf, void *backgrou
///
/// Once a data type is locked it can never be unlocked unless
/// the entire library is closed.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataType::lock() const
@@ -604,7 +573,6 @@ DataType::lock() const
///\brief Returns the datatype class identifier.
///\return Datatype class identifier
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_class_t
DataType::getClass() const
@@ -623,7 +591,6 @@ DataType::getClass() const
///\brief Returns the size of a datatype.
///\return Datatype size in bytes
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
size_t
DataType::getSize() const
@@ -642,7 +609,6 @@ DataType::getSize() const
///\brief Returns the base datatype from which a datatype is derived.
///\return DataType object
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType
DataType::getSuper() const
@@ -677,7 +643,6 @@ DataType::getSuper() const
///\par Description
/// For information, please refer to the H5Tregister API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataType::registerFunc(H5T_pers_t pers, const char *name, const DataType &dest, H5T_conv_t func) const
@@ -696,7 +661,6 @@ DataType::registerFunc(H5T_pers_t pers, const char *name, const DataType &dest,
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in the type of the
/// argument \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataType::registerFunc(H5T_pers_t pers, const H5std_string &name, const DataType &dest, H5T_conv_t func) const
@@ -715,7 +679,6 @@ DataType::registerFunc(H5T_pers_t pers, const H5std_string &name, const DataType
///\param func - IN: Function to convert between source and
/// destination datatypes.
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataType::unregister(H5T_pers_t pers, const char *name, const DataType &dest, H5T_conv_t func) const
@@ -734,7 +697,6 @@ DataType::unregister(H5T_pers_t pers, const char *name, const DataType &dest, H5
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in the type of the
/// argument \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataType::unregister(H5T_pers_t pers, const H5std_string &name, const DataType &dest, H5T_conv_t func) const
@@ -748,7 +710,6 @@ DataType::unregister(H5T_pers_t pers, const H5std_string &name, const DataType &
///\param tag - IN: Descriptive ASCII string with which the opaque
/// datatype is to be tagged.
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataType::setTag(const char *tag) const
@@ -765,7 +726,6 @@ DataType::setTag(const char *tag) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in the type of the
/// argument \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataType::setTag(const H5std_string &tag) const
@@ -778,7 +738,6 @@ DataType::setTag(const H5std_string &tag) const
///\brief Gets the tag associated with an opaque datatype.
///\return Tag associated with the opaque datatype
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5std_string
DataType::getTag() const
@@ -804,7 +763,6 @@ DataType::getTag() const
///\return true if this datatype contains or is the specified type,
/// and false, otherwise.
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
bool
DataType::detectClass(H5T_class_t cls) const
@@ -825,7 +783,6 @@ DataType::detectClass(H5T_class_t cls) const
///\return true if this predtype is the specified type class, and false,
/// otherwise.
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - August, 2017
//--------------------------------------------------------------------------
bool
DataType::detectClass(const PredType &pred_type, H5T_class_t cls)
@@ -846,7 +803,6 @@ DataType::detectClass(const PredType &pred_type, H5T_class_t cls)
///\return true if this datatype is a variable-length string, and
/// false, otherwise.
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
bool
DataType::isVariableStr() const
@@ -867,7 +823,6 @@ DataType::isVariableStr() const
/// creation.
///\return A property list object
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - March, 2017
// Description
// Currently, there is no datatype creation property list class
// in the C++ API because there is no associated functionality.
@@ -895,7 +850,6 @@ DataType::getCreatePlist() const
// AbstractDS and Attribute are moved out of H5Object. In
// addition, member IdComponent::id is moved into subclasses, and
// IdComponent::getId now becomes pure virtual function.
-// Programmer Binh-Minh Ribler - May, 2008
//--------------------------------------------------------------------------
hid_t
DataType::getId() const
@@ -910,7 +864,6 @@ DataType::getId() const
///\param loc - IN: Location of the type
///\param dtype_name - IN: Datatype name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// This function was introduced in 1.10.1 to be used by the new
// XxxType constructors that open a datatype. -BMR, Dec 2016
@@ -932,10 +885,9 @@ DataType::p_opentype(const H5Location &loc, const char *dtype_name) const
///\exception H5::IdComponentException when the attempt to close the HDF5
/// object fails
// Description:
-// The underlaying reference counting in the C library ensures
+// The underlying reference counting in the C library ensures
// that the current valid id of this object is properly closed.
// Then the object's id is reset to the new id.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DataType::p_setId(const hid_t new_id)
@@ -957,7 +909,6 @@ DataType::p_setId(const hid_t new_id)
///\brief Closes the datatype if it is not a predefined type.
///
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Mar 9, 2005
//--------------------------------------------------------------------------
void
DataType::close()
@@ -972,7 +923,7 @@ DataType::close()
// Free and reset buffer of encoded object description if it's been used
if (encoded_buf != NULL) {
- HDfree(encoded_buf);
+ delete[] encoded_buf;
buf_size = 0;
}
}
@@ -981,14 +932,13 @@ DataType::close()
//--------------------------------------------------------------------------
// Function: DataType destructor
///\brief Properly terminates access to this datatype.
-// Programmer Binh-Minh Ribler - 2000
// Modification
// - Replaced resetIdComponent() with decRefCount() to use C
// library ID reference counting mechanism - BMR, Jun 1, 2004
// - Replaced decRefCount with close() to let the C library
// handle the reference counting - BMR, Jun 1, 2006
// - Added the use of H5CPP_EXITED to terminate the HDF5 library
-// and elimiate previous memory leaks. See comments in the
+// and eliminate previous memory leaks. See comments in the
// header file "H5PredType.h" for details. - BMR, Mar 30, 2012
// - Major re-implementation of the global constants was done
// to avoid relying on the order of the creation and deletion
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataType.h
index 7dd371b2b2f..7cc1d315793 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataType.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DataType.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -47,7 +46,7 @@ class H5_DLLCPP DataType : public H5Object {
// PropList& plist = PropList::DEFAULT);
// Closes this datatype.
- virtual void close() H5_OVERRIDE;
+ virtual void close() override;
// Copies an existing datatype to this datatype object.
void copy(const DataType &like_type);
@@ -133,7 +132,7 @@ class H5_DLLCPP DataType : public H5Object {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("DataType");
}
@@ -148,10 +147,10 @@ class H5_DLLCPP DataType : public H5Object {
bool hasBinaryDesc() const;
// Gets the datatype id.
- virtual hid_t getId() const H5_OVERRIDE;
+ virtual hid_t getId() const override;
// Destructor: properly terminates access to this datatype.
- virtual ~DataType() H5_OVERRIDE;
+ virtual ~DataType() override;
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -162,7 +161,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) H5_OVERRIDE;
+ virtual void p_setId(const hid_t new_id) override;
// Opens a datatype and returns the id.
hid_t p_opentype(const H5Location &loc, const char *dtype_name) const;
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DcreatProp.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DcreatProp.cpp
index 4c71d5ece90..f45b54e8dde 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DcreatProp.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DcreatProp.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -47,7 +46,6 @@ DSetCreatPropList *DSetCreatPropList::DEFAULT_ = 0;
// If DSetCreatPropList::DEFAULT_ already points to an allocated
// object, throw a PropListIException. This scenario should
// not happen.
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
DSetCreatPropList *
DSetCreatPropList::getConstant()
@@ -73,13 +71,11 @@ DSetCreatPropList::getConstant()
// Function: DSetCreatPropList::deleteConstants
// Purpose: Deletes the constant object that DSetCreatPropList::DEFAULT_
// points to.
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
void
DSetCreatPropList::deleteConstants()
{
- if (DEFAULT_ != 0)
- delete DEFAULT_;
+ delete DEFAULT_;
}
//--------------------------------------------------------------------------
@@ -92,7 +88,6 @@ const DSetCreatPropList &DSetCreatPropList::DEFAULT = *getConstant();
//--------------------------------------------------------------------------
// Function: DSetCreatPropList default constructor
///\brief Default constructor: creates a stub dataset creation property list
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetCreatPropList::DSetCreatPropList() : ObjCreatPropList(H5P_DATASET_CREATE)
{
@@ -102,7 +97,6 @@ DSetCreatPropList::DSetCreatPropList() : ObjCreatPropList(H5P_DATASET_CREATE)
// Function: DSetCreatPropList copy constructor
///\brief Copy constructor: same HDF5 object as \a original
/// DSetCreatPropList object
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetCreatPropList::DSetCreatPropList(const DSetCreatPropList &orig) : ObjCreatPropList(orig)
{
@@ -112,7 +106,6 @@ DSetCreatPropList::DSetCreatPropList(const DSetCreatPropList &orig) : ObjCreatPr
// Function: DSetCreatPropList overloaded constructor
///\brief Creates a DSetCreatPropList object using the id of an
/// existing dataset creation property list.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetCreatPropList::DSetCreatPropList(const hid_t plist_id) : ObjCreatPropList(plist_id)
{
@@ -131,7 +124,6 @@ DSetCreatPropList::DSetCreatPropList(const hid_t plist_id) : ObjCreatPropList(pl
/// define the size of the chunks to store the dataset's raw
/// data. As a side-effect, the layout of the dataset will be
/// changed to \c H5D_CHUNKED, if it is not so already.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetCreatPropList::setChunk(int ndims, const hsize_t *dim) const
@@ -149,7 +141,6 @@ DSetCreatPropList::setChunk(int ndims, const hsize_t *dim) const
///\param max_ndims - IN: Size of \a dim array
///\param dim - OUT: Array to store the chunk dimensions
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int
DSetCreatPropList::getChunk(int max_ndims, hsize_t *dim) const
@@ -169,7 +160,6 @@ DSetCreatPropList::getChunk(int max_ndims, hsize_t *dim) const
///\par Description
/// For information, please refer to the H5Pset_layout API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetCreatPropList::setLayout(H5D_layout_t layout) const
@@ -194,7 +184,6 @@ DSetCreatPropList::setLayout(H5D_layout_t layout) const
/// in the file.
///\exception H5::PropListIException
///\par Description
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5D_layout_t
DSetCreatPropList::getLayout() const
@@ -203,7 +192,7 @@ DSetCreatPropList::getLayout() const
if (layout == H5D_LAYOUT_ERROR) {
throw PropListIException("DSetCreatPropList::getLayout", "H5Pget_layout returns H5D_LAYOUT_ERROR");
}
- return (layout);
+ return layout;
}
//--------------------------------------------------------------------------
@@ -216,12 +205,16 @@ DSetCreatPropList::getLayout() const
/// list to \c H5D_COMPRESS_DEFLATE and the compression level to
/// \a level. Lower compression levels are faster but result in
/// less compression.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetCreatPropList::setDeflate(int level) const
{
- herr_t ret_value = H5Pset_deflate(id, level);
+ if (level < 0) {
+ throw PropListIException("DSetCreatPropList::setDeflate", "level can't be negative");
+ }
+
+ herr_t ret_value = H5Pset_deflate(id, static_cast(level));
+
if (ret_value < 0) {
throw PropListIException("DSetCreatPropList::setDeflate", "H5Pset_deflate failed");
}
@@ -241,7 +234,6 @@ DSetCreatPropList::setDeflate(int level) const
/// H5Z_FILTER_SZIP, for a dataset. For more information about
/// SZIP and usage, please refer to the H5Pset_szip API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - Jan, 2007
//--------------------------------------------------------------------------
void
DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_per_block) const
@@ -262,7 +254,6 @@ DSetCreatPropList::setSzip(unsigned int options_mask, unsigned int pixels_per_bl
/// H5Z_FILTER_NBIT, for a dataset. For more information about
/// Nbit compression, please refer to the H5Pset_nbit API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - Apr, 2016
//--------------------------------------------------------------------------
void
DSetCreatPropList::setNbit() const
@@ -288,7 +279,6 @@ DSetCreatPropList::setNbit() const
///\par
/// For information on setting fill value, please refer to the
/// H5Pset_fill_value API in the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetCreatPropList::setFillValue(const DataType &fvalue_type, const void *value) const
@@ -310,7 +300,6 @@ DSetCreatPropList::setFillValue(const DataType &fvalue_type, const void *value)
/// and the memory is allocated by the caller. The fill
/// value will be converted from its current data type to the
/// specified by \a fvalue_type.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetCreatPropList::getFillValue(const DataType &fvalue_type, void *value) const
@@ -329,7 +318,6 @@ DSetCreatPropList::getFillValue(const DataType &fvalue_type, void *value) const
/// \li \c H5D_FILL_VALUE_DEFAULT =1,
/// \li \c H5D_FILL_VALUE_USER_DEFINED =2
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5D_fill_value_t
DSetCreatPropList::isFillValueDefined() const
@@ -362,7 +350,6 @@ DSetCreatPropList::isFillValueDefined() const
/// failed; the filter will not participate in the pipeline
/// during a \c DataSet::read() of the chunk. If this bit is clear
/// and the filter fails then the entire I/O operation fails.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetCreatPropList::setFilter(H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts,
@@ -381,8 +368,7 @@ DSetCreatPropList::setFilter(H5Z_filter_t filter_id, unsigned int flags, size_t
///\exception H5::PropListIException
///\par Description
/// Deletes a filter from the dataset creation property list;
-/// deletes all filters if \a filter_id is \c H5Z_FILTER_NONE.
-// Programmer Binh-Minh Ribler - 2000
+/// deletes all filters if \a filter_id is \c H5Z_FILTER_ALL.
//--------------------------------------------------------------------------
void
DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const
@@ -398,7 +384,6 @@ DSetCreatPropList::removeFilter(H5Z_filter_t filter_id) const
///\brief Returns the number of filters in the pipeline
///\return Number of filters
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int
DSetCreatPropList::getNfilters() const
@@ -437,13 +422,15 @@ DSetCreatPropList::getFilter(int filter_number, unsigned int &flags, size_t &cd_
unsigned int *cd_values, size_t namelen, char name[],
unsigned int &filter_config) const
{
- H5Z_filter_t filter_id;
- filter_id =
- H5Pget_filter2(id, filter_number, &flags, &cd_nelmts, cd_values, namelen, name, &filter_config);
+ if (filter_number < 0)
+ throw PropListIException("DSetCreatPropList::getFilter", "filter_number can't be negative");
+
+ H5Z_filter_t filter_id = H5Pget_filter2(id, static_cast(filter_number), &flags, &cd_nelmts,
+ cd_values, namelen, name, &filter_config);
if (filter_id == H5Z_FILTER_ERROR)
throw PropListIException("DSetCreatPropList::getFilter", "H5Pget_filter2 returned H5Z_FILTER_ERROR");
else
- return (filter_id);
+ return filter_id;
}
//--------------------------------------------------------------------------
@@ -459,7 +446,6 @@ DSetCreatPropList::getFilter(int filter_number, unsigned int &flags, size_t &cd_
///\param name - OUT: Name of the filter
///\param filter_config - OUT: Flags indicating whether filter can encode/decode
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetCreatPropList::getFilterById(H5Z_filter_t filter_id, unsigned int &flags, size_t &cd_nelmts,
@@ -491,7 +477,6 @@ DSetCreatPropList::getFilterById(H5Z_filter_t filter_id, unsigned int &flags, si
/// failed; the filter will not participate in the pipeline
/// during a DataSet::read() of the chunk. If this bit is clear
/// and the filter fails then the entire I/O operation fails.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetCreatPropList::modifyFilter(H5Z_filter_t filter_id, unsigned int flags, size_t cd_nelmts,
@@ -510,7 +495,6 @@ DSetCreatPropList::modifyFilter(H5Z_filter_t filter_id, unsigned int flags, size
///\return true if all filters available, and false if one or more
/// filters not currently available
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool
DSetCreatPropList::allFiltersAvail() const
@@ -535,7 +519,6 @@ DSetCreatPropList::allFiltersAvail() const
///\par Description
/// For information, please refer to the H5Pset_shuffle API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetCreatPropList::setShuffle() const
@@ -553,12 +536,11 @@ DSetCreatPropList::setShuffle() const
///\exception H5::PropListIException
///\par Description
/// The values of space allocation time can be one of the
-/// followings:
+/// following:
/// \li \c H5D_ALLOC_TIME_DEFAULT
/// \li \c H5D_ALLOC_TIME_EARLY
/// \li \c H5D_ALLOC_TIME_LATE
/// \li \c H5D_ALLOC_TIME_INCR
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5D_alloc_time_t
DSetCreatPropList::getAllocTime() const
@@ -581,7 +563,6 @@ DSetCreatPropList::getAllocTime() const
/// Valid values for fill value writing time include
/// \li \c H5D_FILL_TIME_NEVER
/// \li \c H5D_FILL_TIME_ALLOC.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5D_fill_time_t
DSetCreatPropList::getFillTime() const
@@ -606,7 +587,6 @@ DSetCreatPropList::getFillTime() const
/// \li \c H5D_ALLOC_TIME_EARLY
/// \li \c H5D_ALLOC_TIME_LATE
/// \li \c H5D_ALLOC_TIME_INCR
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time) const
@@ -626,7 +606,6 @@ DSetCreatPropList::setAllocTime(H5D_alloc_time_t alloc_time) const
/// Valid values for fill value writing time include
/// \li \c H5D_FILL_TIME_NEVER
/// \li \c H5D_FILL_TIME_ALLOC.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time) const
@@ -642,7 +621,6 @@ DSetCreatPropList::setFillTime(H5D_fill_time_t fill_time) const
///\brief Sets Fletcher32 checksum of EDC for this property list.
///
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetCreatPropList::setFletcher32() const
@@ -667,7 +645,8 @@ DSetCreatPropList::setFletcher32() const
/// the total size is larger than the size of a dataset then the
/// dataset can be extended (provided the data space also allows
/// the extending).
-// Programmer Binh-Minh Ribler - 2000
+///\note On Windows, off_t is typically a 32-bit signed long value, which
+/// limits the valid offset that can be set to 2 GiB.
//--------------------------------------------------------------------------
void
DSetCreatPropList::setExternal(const char *name, off_t offset, hsize_t size) const
@@ -683,7 +662,6 @@ DSetCreatPropList::setExternal(const char *name, off_t offset, hsize_t size) con
///\brief Returns the number of external files for a dataset
///\return Number of external files
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int
DSetCreatPropList::getExternalCount() const
@@ -717,7 +695,8 @@ DSetCreatPropList::getExternalCount() const
/// external file name will not be returned. If \a offset or
/// \a size are null pointers then the corresponding information
/// will not be returned.
-// Programmer Binh-Minh Ribler - 2000
+///\note On Windows, off_t is typically a 32-bit signed long value, which
+/// limits the valid offset that can be returned to 2 GiB.
//--------------------------------------------------------------------------
void
DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char *name, off_t &offset, hsize_t &size) const
@@ -744,7 +723,6 @@ DSetCreatPropList::getExternal(unsigned idx, size_t name_size, char *name, off_t
///\par Description
/// For information, please refer to the H5Pset_virtual API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - Mar, 2017
//--------------------------------------------------------------------------
void
DSetCreatPropList::setVirtual(const DataSpace &vspace, const char *src_fname, const char *src_dsname,
@@ -772,7 +750,6 @@ DSetCreatPropList::setVirtual(const DataSpace &vspace, const char *src_fname, co
///\par Description
/// For information, please refer to the H5Pset_virtual API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - Mar, 2017
//--------------------------------------------------------------------------
void
DSetCreatPropList::setVirtual(const DataSpace &vspace, const H5std_string src_fname,
@@ -781,13 +758,4 @@ DSetCreatPropList::setVirtual(const DataSpace &vspace, const H5std_string src_fn
setVirtual(vspace, src_fname.c_str(), src_dsname.c_str(), sspace);
}
-//--------------------------------------------------------------------------
-// Function: DSetCreatPropList destructor
-///\brief Noop destructor.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-DSetCreatPropList::~DSetCreatPropList()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DcreatProp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DcreatProp.h
index b822c254caa..3c8587dbe6b 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DcreatProp.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DcreatProp.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -128,7 +127,7 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("DSetCreatPropList");
}
@@ -141,7 +140,7 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList {
DSetCreatPropList(const hid_t plist_id);
// Noop destructor.
- virtual ~DSetCreatPropList() H5_OVERRIDE;
+ virtual ~DSetCreatPropList() override = default;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DxferProp.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DxferProp.cpp
index 2b50de42333..1b9d6510580 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DxferProp.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DxferProp.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -13,7 +12,6 @@
#include
-#include "H5private.h" // for HDmemset
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -40,7 +38,6 @@ DSetMemXferPropList *DSetMemXferPropList::DEFAULT_ = 0;
// If DSetMemXferPropList::DEFAULT_ already points to an allocated
// object, throw a PropListIException. This scenario should not
// happen.
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
DSetMemXferPropList *
DSetMemXferPropList::getConstant()
@@ -67,13 +64,11 @@ DSetMemXferPropList::getConstant()
// Function: DSetMemXferPropList::deleteConstants
// Purpose: Deletes the constant object that DSetMemXferPropList::DEFAULT_
// points to.
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
void
DSetMemXferPropList::deleteConstants()
{
- if (DEFAULT_ != 0)
- delete DEFAULT_;
+ delete DEFAULT_;
}
//--------------------------------------------------------------------------
@@ -87,7 +82,6 @@ const DSetMemXferPropList &DSetMemXferPropList::DEFAULT = *getConstant();
// Function DSetMemXferPropList default constructor
///\brief Default constructor: creates a stub dataset memory and
/// transfer property list object.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetMemXferPropList::DSetMemXferPropList() : PropList(H5P_DATASET_XFER)
{
@@ -97,7 +91,6 @@ DSetMemXferPropList::DSetMemXferPropList() : PropList(H5P_DATASET_XFER)
// Function DSetMemXferPropList constructor
///\brief Creates a dataset transfer property list with transform
/// expression.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetMemXferPropList::DSetMemXferPropList(const char *exp) : PropList(H5P_DATASET_XFER)
{
@@ -110,7 +103,6 @@ DSetMemXferPropList::DSetMemXferPropList(const char *exp) : PropList(H5P_DATASET
/// DSetMemXferPropList object
///\param original - IN: Original dataset memory and transfer property
/// list object to copy
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetMemXferPropList::DSetMemXferPropList(const DSetMemXferPropList &original) : PropList(original)
{
@@ -122,7 +114,6 @@ DSetMemXferPropList::DSetMemXferPropList(const DSetMemXferPropList &original) :
/// existing DSetMemXferPropList.
///\param plist_id - IN: Id of an existing dataset memory and transfer
/// property list
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DSetMemXferPropList::DSetMemXferPropList(const hid_t plist_id) : PropList(plist_id)
{
@@ -135,7 +126,6 @@ DSetMemXferPropList::DSetMemXferPropList(const hid_t plist_id) : PropList(plist_
///\param tconv - IN: Pointer to application-allocated type conversion buffer
///\param bkg - IN: Pointer to application-allocated background buffer
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetMemXferPropList::setBuffer(size_t size, void *tconv, void *bkg) const
@@ -153,7 +143,6 @@ DSetMemXferPropList::setBuffer(size_t size, void *tconv, void *bkg) const
///\param bkg - OUT: Pointer to application-allocated background buffer
///\return Buffer size, in bytes
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
size_t
DSetMemXferPropList::getBuffer(void **tconv, void **bkg) const
@@ -171,12 +160,11 @@ DSetMemXferPropList::getBuffer(void **tconv, void **bkg) const
///\brief Sets the dataset transfer property list status to true or false.
///\param status - IN: Status to set, true or false
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetMemXferPropList::setPreserve(bool status) const
{
- herr_t ret_value = H5Pset_preserve(id, (hbool_t)status);
+ herr_t ret_value = H5Pset_preserve(id, static_cast(status));
if (ret_value < 0) {
throw PropListIException("DSetMemXferPropList::setPreserve", "H5Pset_preserve failed");
}
@@ -187,7 +175,6 @@ DSetMemXferPropList::setPreserve(bool status) const
///\brief Checks status of the dataset transfer property list.
///\return Status of the dataset transfer property list
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool
DSetMemXferPropList::getPreserve() const
@@ -210,7 +197,6 @@ DSetMemXferPropList::getPreserve() const
///\param middle - IN: B-tree split ratio for right-most nodes and lone nodes
///\param right - IN: B-tree split ratio for all other nodes
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetMemXferPropList::setBtreeRatios(double left, double middle, double right) const
@@ -228,7 +214,6 @@ DSetMemXferPropList::setBtreeRatios(double left, double middle, double right) co
///\param middle - OUT: B-tree split ratio for right-most nodes and lone nodes
///\param right - OUT: B-tree split ratio for all other nodes
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetMemXferPropList::getBtreeRatios(double &left, double &middle, double &right) const
@@ -244,7 +229,6 @@ DSetMemXferPropList::getBtreeRatios(double &left, double &middle, double &right)
///\brief Sets data transform expression.
///\param expression - IN: null-terminated data transform expression (char*)
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
void
DSetMemXferPropList::setDataTransform(const char *expression) const
@@ -261,7 +245,6 @@ DSetMemXferPropList::setDataTransform(const char *expression) const
/// It takes a reference to a \c H5std_string for the expression.
///\param expression - IN: H5std_string data transform expression
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
void
DSetMemXferPropList::setDataTransform(const H5std_string &expression) const
@@ -276,7 +259,6 @@ DSetMemXferPropList::setDataTransform(const H5std_string &expression) const
///\param buf_size - IN: size of buffer for expression, including the
/// null terminator
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
ssize_t
DSetMemXferPropList::getDataTransform(char *exp, size_t buf_size) const
@@ -305,7 +287,6 @@ DSetMemXferPropList::getDataTransform(char *exp, size_t buf_size) const
/// It takes no parameter and returns a \c H5std_string for the expression.
///
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
H5std_string
DSetMemXferPropList::getDataTransform() const
@@ -315,7 +296,7 @@ DSetMemXferPropList::getDataTransform() const
H5std_string expression;
// Preliminary call to get the expression's length
- ssize_t exp_len = H5Pget_data_transform(id, NULL, (size_t)0);
+ ssize_t exp_len = H5Pget_data_transform(id, NULL, 0);
// If H5Pget_data_transform returns a negative value, raise an exception
if (exp_len < 0) {
@@ -324,12 +305,16 @@ DSetMemXferPropList::getDataTransform() const
// If expression exists, calls C routine again to get it
else if (exp_len > 0) {
+
+ // The actual size is the cast value + 1 for the terminal ASCII NUL
+ // (unfortunate in/out type sign mismatch)
+ size_t actual_exp_len = static_cast(exp_len) + 1;
+
// Temporary buffer for char* expression
- char *exp_C = new char[exp_len + 1];
- HDmemset(exp_C, 0, exp_len + 1); // clear buffer
+ char *exp_C = new char[actual_exp_len]();
// Used overloaded function
- exp_len = getDataTransform(exp_C, exp_len + 1);
+ exp_len = getDataTransform(exp_C, actual_exp_len);
// Convert the C expression to return
expression = exp_C;
@@ -348,7 +333,6 @@ DSetMemXferPropList::getDataTransform() const
///\param op - IN: User's function
///\param user_data - IN: User's data
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
DSetMemXferPropList::setTypeConvCB(H5T_conv_except_func_t op, void *user_data) const
@@ -365,7 +349,6 @@ DSetMemXferPropList::setTypeConvCB(H5T_conv_except_func_t op, void *user_data) c
///\param op - IN: Retrieved user function
///\param user_data - IN: Retrieved user data
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
DSetMemXferPropList::getTypeConvCB(H5T_conv_except_func_t *op, void **user_data) const
@@ -384,7 +367,6 @@ DSetMemXferPropList::getTypeConvCB(H5T_conv_except_func_t *op, void **user_data)
///\param free_func - IN: User's free routine
///\param free_info - IN: User's free parameters
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetMemXferPropList::setVlenMemManager(H5MM_allocate_t alloc_func, void *alloc_info, H5MM_free_t free_func,
@@ -402,7 +384,6 @@ DSetMemXferPropList::setVlenMemManager(H5MM_allocate_t alloc_func, void *alloc_i
/// allocation - system \c malloc and \c free will be used.
///
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetMemXferPropList::setVlenMemManager() const
@@ -418,7 +399,6 @@ DSetMemXferPropList::setVlenMemManager() const
///\param free_func - OUT: User's free routine
///\param free_info - OUT: User's free parameters
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
DSetMemXferPropList::getVlenMemManager(H5MM_allocate_t &alloc_func, void **alloc_info, H5MM_free_t &free_func,
@@ -438,7 +418,6 @@ DSetMemXferPropList::getVlenMemManager(H5MM_allocate_t &alloc_func, void **alloc
///\par Description
/// For detail, please refer to the H5Pset_small_data_block_size
/// API in the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
DSetMemXferPropList::setSmallDataBlockSize(hsize_t size) const
@@ -455,7 +434,6 @@ DSetMemXferPropList::setSmallDataBlockSize(hsize_t size) const
///\brief Returns the current small data block size setting.
///\return Size of the small data block, in bytes
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hsize_t
DSetMemXferPropList::getSmallDataBlockSize() const
@@ -477,7 +455,6 @@ DSetMemXferPropList::getSmallDataBlockSize() const
///\par Description
/// For detail, please refer to the H5Pset_hyper_vector_size
/// API in the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
DSetMemXferPropList::setHyperVectorSize(size_t vector_size) const
@@ -495,7 +472,6 @@ DSetMemXferPropList::setHyperVectorSize(size_t vector_size) const
/// hyperslab I/O.
///\return Number of I/O vectors
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
size_t
DSetMemXferPropList::getHyperVectorSize() const
@@ -525,7 +501,6 @@ DSetMemXferPropList::getHyperVectorSize() const
/// Valid values are as follows:
/// \li \c H5Z_ENABLE_EDC (default)
/// \li \c H5Z_DISABLE_EDC
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
DSetMemXferPropList::setEDCCheck(H5Z_EDC_t check) const
@@ -541,7 +516,6 @@ DSetMemXferPropList::setEDCCheck(H5Z_EDC_t check) const
///\brief Determines whether error-detection is enabled for dataset reads.
///\return \c H5Z_ENABLE_EDC or \c H5Z_DISABLE_EDC
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
H5Z_EDC_t
DSetMemXferPropList::getEDCCheck() const
@@ -553,13 +527,4 @@ DSetMemXferPropList::getEDCCheck() const
return (check);
}
-//--------------------------------------------------------------------------
-// Function: DSetMemXferPropList destructor
-///\brief Noop destructor.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-DSetMemXferPropList::~DSetMemXferPropList()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DxferProp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DxferProp.h
index 3925a57c113..b86202da254 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DxferProp.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5DxferProp.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -100,7 +99,7 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("DSetMemXferPropList");
}
@@ -113,7 +112,7 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
DSetMemXferPropList(const hid_t plist_id);
// Noop destructor
- virtual ~DSetMemXferPropList() H5_OVERRIDE;
+ virtual ~DSetMemXferPropList() override = default;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5EnumType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5EnumType.cpp
index 6c7b53384f5..569e56abf47 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5EnumType.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5EnumType.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -13,7 +12,6 @@
#include
-#include "H5private.h" // for HDmemset
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -39,7 +37,6 @@ namespace H5 {
//--------------------------------------------------------------------------
// Function: EnumType default constructor
///\brief Default constructor: Creates a stub datatype
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType::EnumType() : DataType()
{
@@ -50,7 +47,6 @@ EnumType::EnumType() : DataType()
///\brief Creates an EnumType object using the id of an existing datatype.
///\param existing_id - IN: Id of an existing datatype
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType::EnumType(const hid_t existing_id) : DataType(existing_id)
{
@@ -59,7 +55,6 @@ EnumType::EnumType(const hid_t existing_id) : DataType(existing_id)
//--------------------------------------------------------------------------
// Function: EnumType copy constructor
///\brief Copy constructor: same HDF5 object as \a original
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType::EnumType(const EnumType &original) : DataType(original)
{
@@ -73,7 +68,6 @@ EnumType::EnumType(const EnumType &original) : DataType(original)
// Description
// The DataType constructor calls the C API H5Tcreate to create
// the enum datatype.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType::EnumType(size_t size) : DataType(H5T_ENUM, size)
{
@@ -84,7 +78,6 @@ EnumType::EnumType(size_t size) : DataType(H5T_ENUM, size)
///\brief Gets the enum datatype of the specified dataset.
///\param dataset - IN: Dataset that this enum datatype associates with
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType::EnumType(const DataSet &dataset) : DataType()
{
@@ -102,7 +95,6 @@ EnumType::EnumType(const DataSet &dataset) : DataType()
///\brief Creates a new enum datatype based on an integer datatype.
///\param data_type - IN: Base datatype
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType::EnumType(const IntType &data_type) : DataType()
{
@@ -122,7 +114,6 @@ EnumType::EnumType(const IntType &data_type) : DataType()
///\param dtype_name - IN: Enum datatype name
///\param loc - IN: Location of the type
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openEnumType(const char*) to
@@ -141,7 +132,6 @@ EnumType::EnumType(const H5Location &loc, const char *dtype_name) : DataType()
///\param loc - IN: Location of the type
///\param dtype_name - IN: Enum datatype name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openEnumType(const H5std_string&)
@@ -159,7 +149,6 @@ EnumType::EnumType(const H5Location &loc, const H5std_string &dtype_name) : Data
/// binary object description of this type.
///
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Aug 2017
//--------------------------------------------------------------------------
DataType *
EnumType::decode() const
@@ -182,7 +171,6 @@ EnumType::decode() const
///\param name - IN: Name of the new member
///\param value - IN: Pointer to the value of the new member
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
EnumType::insert(const char *name, void *value) const
@@ -199,7 +187,6 @@ EnumType::insert(const char *name, void *value) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in the type of
/// argument \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
EnumType::insert(const H5std_string &name, void *value) const
@@ -214,13 +201,11 @@ EnumType::insert(const H5std_string &name, void *value) const
///\param value - IN: Pointer to the value of the enum datatype
///\param size - IN: Size for the name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5std_string
EnumType::nameOf(void *value, size_t size) const
{
- char *name_C = new char[size + 1]; // temporary C-string for C API
- HDmemset(name_C, 0, size + 1); // clear buffer
+ char *name_C = new char[size + 1](); // temporary C-string for C API
// Calls C routine H5Tenum_nameof to get the name of the specified enum type
herr_t ret_value = H5Tenum_nameof(id, value, name_C, size);
@@ -243,7 +228,6 @@ EnumType::nameOf(void *value, size_t size) const
///\param name - IN: Name of the queried member
///\param value - OUT: Pointer to the retrieved value
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
EnumType::valueOf(const char *name, void *value) const
@@ -260,7 +244,6 @@ EnumType::valueOf(const char *name, void *value) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in the type of
/// argument \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
EnumType::valueOf(const H5std_string &name, void *value) const
@@ -276,7 +259,6 @@ EnumType::valueOf(const H5std_string &name, void *value) const
/// between 0 and \c N-1, where \c N is the value returned by the
/// member function \c EnumType::getNmembers.
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - May 16, 2002
//--------------------------------------------------------------------------
int
EnumType::getMemberIndex(const char *name) const
@@ -293,7 +275,6 @@ EnumType::getMemberIndex(const char *name) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function only in the type of
/// argument \a name.
-// Programmer Binh-Minh Ribler - May 16, 2002
//--------------------------------------------------------------------------
int
EnumType::getMemberIndex(const H5std_string &name) const
@@ -306,7 +287,6 @@ EnumType::getMemberIndex(const H5std_string &name) const
///\brief Returns the number of members in this enumeration datatype.
///\return Number of members
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
int
EnumType::getNmembers() const
@@ -326,7 +306,6 @@ EnumType::getNmembers() const
///\param memb_no - IN: Index of the queried member
///\param value - OUT: Pointer to the retrieved value
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
EnumType::getMemberValue(unsigned memb_no, void *value) const
@@ -338,13 +317,4 @@ EnumType::getMemberValue(unsigned memb_no, void *value) const
}
}
-//--------------------------------------------------------------------------
-// Function: EnumType destructor
-///\brief Properly terminates access to this enum datatype.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-EnumType::~EnumType()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5EnumType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5EnumType.h
index 2501e4bae4b..a5096fcf905 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5EnumType.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5EnumType.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -41,7 +40,7 @@ class H5_DLLCPP EnumType : public DataType {
// Returns an EnumType object via DataType* by decoding the
// binary object description of this type.
- virtual DataType *decode() const H5_OVERRIDE;
+ virtual DataType *decode() const override;
// Returns the number of members in this enumeration datatype.
int getNmembers() const;
@@ -68,7 +67,7 @@ class H5_DLLCPP EnumType : public DataType {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("EnumType");
}
@@ -82,7 +81,7 @@ class H5_DLLCPP EnumType : public DataType {
// Copy constructor: same as the original EnumType.
EnumType(const EnumType &original);
- virtual ~EnumType() H5_OVERRIDE;
+ virtual ~EnumType() override = default;
}; // end of EnumType
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Exception.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Exception.cpp
index 67694390f11..906bd27e594 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Exception.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Exception.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -23,9 +22,8 @@ const char Exception::DEFAULT_MSG[] = "No detailed information provided";
//--------------------------------------------------------------------------
// Function: Exception default constructor
///\brief Default constructor.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-Exception::Exception()
+Exception::Exception() : detail_message{""}, func_name{""}
{
}
@@ -35,7 +33,6 @@ Exception::Exception()
/// in which the failure occurs, and an optional detailed message.
///\param func - IN: Name of the function where failure occurs
///\param message - IN: Message on the failure
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Exception::Exception(const H5std_string &func, const H5std_string &message)
: detail_message(message), func_name(func)
@@ -46,7 +43,6 @@ Exception::Exception(const H5std_string &func, const H5std_string &message)
// Function: Exception copy constructor
///\brief Copy constructor: same HDF5 object as \a original
///\param orig - IN: Exception instance to copy
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Exception::Exception(const Exception &orig) : detail_message(orig.detail_message), func_name(orig.func_name)
{
@@ -61,7 +57,6 @@ Exception::Exception(const Exception &orig) : detail_message(orig.detail_message
///\par Description
/// In the failure case, the string "Invalid major error number"
/// will be returned.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5std_string
Exception::getMajorString(hid_t err_major) const
@@ -73,9 +68,14 @@ Exception::getMajorString(hid_t err_major) const
if (mesg_size < 0)
throw IdComponentException("Exception::getMajorString", "H5Eget_msg failed");
+ // The actual message size is the cast value + 1 for the terminal ASCII NUL
+ // (unfortunate in/out type sign mismatch)
+ size_t actual_mesg_size = static_cast(mesg_size) + 1;
+
// Call H5Eget_msg again to get the actual message
- char *mesg_C = new char[mesg_size + 1]; // temporary C-string for C API
- mesg_size = H5Eget_msg(err_major, NULL, mesg_C, mesg_size + 1);
+ char *mesg_C = new char[actual_mesg_size]; // temporary C-string for C API
+
+ mesg_size = H5Eget_msg(err_major, NULL, mesg_C, actual_mesg_size);
// Check for failure again
if (mesg_size < 0) {
@@ -98,7 +98,6 @@ Exception::getMajorString(hid_t err_major) const
///\par Description
/// In the failure case, the string "Invalid minor error number"
/// will be returned.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5std_string
Exception::getMinorString(hid_t err_minor) const
@@ -110,9 +109,14 @@ Exception::getMinorString(hid_t err_minor) const
if (mesg_size < 0)
throw IdComponentException("Exception::getMinorString", "H5Eget_msg failed");
+ // The actual message size is the cast value + 1 for the terminal ASCII NUL
+ // (unfortunate in/out type sign mismatch)
+ size_t actual_mesg_size = static_cast(mesg_size) + 1;
+
// Call H5Eget_msg again to get the actual message
- char *mesg_C = new char[mesg_size + 1]; // temporary C-string for C API
- mesg_size = H5Eget_msg(err_minor, NULL, mesg_C, mesg_size + 1);
+ char *mesg_C = new char[actual_mesg_size]; // temporary C-string for C API
+
+ mesg_size = H5Eget_msg(err_minor, NULL, mesg_C, actual_mesg_size);
// Check for failure again
if (mesg_size < 0) {
@@ -140,7 +144,6 @@ Exception::getMinorString(hid_t err_minor) const
///\par
/// Users are encouraged to write their own more specific error
/// handlers
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
Exception::setAutoPrint(H5E_auto2_t &func, void *client_data)
@@ -155,7 +158,6 @@ Exception::setAutoPrint(H5E_auto2_t &func, void *client_data)
//--------------------------------------------------------------------------
// Function: Exception::dontPrint
///\brief Turns off the automatic error printing from the C library.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
Exception::dontPrint()
@@ -175,7 +177,6 @@ Exception::dontPrint()
/// called upon an error condition
///\param client_data - OUT: Current setting for the data passed to
/// the error function
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
Exception::getAutoPrint(H5E_auto2_t &func, void **client_data)
@@ -193,7 +194,6 @@ Exception::getAutoPrint(H5E_auto2_t &func, void **client_data)
///\par Description
/// The stack is also cleared whenever a C API function is
/// called, with certain exceptions (for instance, \c H5Eprint).
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
Exception::clearErrorStack()
@@ -243,7 +243,6 @@ Exception::clearErrorStack()
/// const char *desc; //optional supplied description
/// } H5E_error2_t;
///\endcode
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
Exception::walkErrorStack(H5E_direction_t direction, H5E_walk2_t func, void *client_data)
@@ -259,7 +258,6 @@ Exception::walkErrorStack(H5E_direction_t direction, H5E_walk2_t func, void *cli
///\brief Returns the detailed message set at the time the exception
/// is thrown.
///\return Text message - \c H5std_string
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5std_string
Exception::getDetailMsg() const
@@ -272,7 +270,6 @@ Exception::getDetailMsg() const
///\brief Returns the detailed message set at the time the exception
/// is thrown.
///\return Text message - \c char pointer
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
const char *
Exception::getCDetailMsg() const
@@ -284,7 +281,6 @@ Exception::getCDetailMsg() const
// Function: Exception::getFuncName
///\brief Returns the name of the function, where the exception is thrown.
///\return Text message - \c H5std_string
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5std_string
Exception::getFuncName() const
@@ -296,7 +292,6 @@ Exception::getFuncName() const
// Function: Exception::getCFuncName
///\brief Returns the name of the function, where the exception is thrown.
///\return Text message - \c char pointer
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
const char *
Exception::getCFuncName() const
@@ -309,7 +304,6 @@ Exception::getCFuncName() const
///\brief Prints the error stack in a default manner.
///\param stream - IN: File pointer, default to stderr
///\param err_stack - IN: Error stack ID, default to H5E_DEFAULT(0)
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
Exception::printErrorStack(FILE *stream, hid_t err_stack)
@@ -325,7 +319,6 @@ Exception::printErrorStack(FILE *stream, hid_t err_stack)
// function is replaced by the static function printErrorStack
// and will be removed from the next major release.
// Parameter stream - IN: File pointer
-// Programmer Binh-Minh Ribler - 2000
// Description:
// This function can be removed in next major release.
// -BMR, 2014/04/24
@@ -337,18 +330,8 @@ Exception::printErrorStack(FILE *stream, hid_t err_stack)
// Exception::printErrorStack(stream, H5E_DEFAULT);
//}
-//--------------------------------------------------------------------------
-// Function: Exception destructor
-///\brief Noop destructor
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-Exception::~Exception() throw()
-{
-}
-
//--------------------------------------------------------------------------
// Subclass: FileIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: FileIException default constructor
@@ -368,17 +351,9 @@ FileIException::FileIException(const H5std_string &func, const H5std_string &mes
: Exception(func, message)
{
}
-//--------------------------------------------------------------------------
-// Function: FileIException destructor
-///\brief Noop destructor.
-//--------------------------------------------------------------------------
-FileIException::~FileIException() throw()
-{
-}
//--------------------------------------------------------------------------
// Subclass: GroupIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: GroupIException default constructor
@@ -398,17 +373,8 @@ GroupIException::GroupIException(const H5std_string &func, const H5std_string &m
: Exception(func, message)
{
}
-//--------------------------------------------------------------------------
-// Function: GroupIException destructor
-///\brief Noop destructor.
-//--------------------------------------------------------------------------
-GroupIException::~GroupIException() throw()
-{
-}
-
//--------------------------------------------------------------------------
// Subclass: DataSpaceIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: DataSpaceIException default constructor
@@ -428,17 +394,9 @@ DataSpaceIException::DataSpaceIException(const H5std_string &func, const H5std_s
: Exception(func, message)
{
}
-//--------------------------------------------------------------------------
-// Function: DataSpaceIException destructor
-///\brief Noop destructor.
-//--------------------------------------------------------------------------
-DataSpaceIException::~DataSpaceIException() throw()
-{
-}
//--------------------------------------------------------------------------
// Subclass: DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: DataTypeIException default constructor
@@ -458,17 +416,9 @@ DataTypeIException::DataTypeIException(const H5std_string &func, const H5std_str
: Exception(func, message)
{
}
-//--------------------------------------------------------------------------
-// Function: DataTypeIException destructor
-///\brief Noop destructor.
-//--------------------------------------------------------------------------
-DataTypeIException::~DataTypeIException() throw()
-{
-}
//--------------------------------------------------------------------------
// Subclass: ObjHeaderIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: ObjHeaderIException default constructor
@@ -488,17 +438,9 @@ ObjHeaderIException::ObjHeaderIException(const H5std_string &func, const H5std_s
: Exception(func, message)
{
}
-//--------------------------------------------------------------------------
-// Function: ObjHeaderIException destructor
-///\brief Noop destructor.
-//--------------------------------------------------------------------------
-ObjHeaderIException::~ObjHeaderIException() throw()
-{
-}
//--------------------------------------------------------------------------
// Subclass: PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: PropListIException default constructor
@@ -518,17 +460,9 @@ PropListIException::PropListIException(const H5std_string &func, const H5std_str
: Exception(func, message)
{
}
-//--------------------------------------------------------------------------
-// Function: PropListIException destructor
-///\brief Noop destructor.
-//--------------------------------------------------------------------------
-PropListIException::~PropListIException() throw()
-{
-}
//--------------------------------------------------------------------------
// Subclass: DataSetIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: DataSetIException default constructor
@@ -548,17 +482,9 @@ DataSetIException::DataSetIException(const H5std_string &func, const H5std_strin
: Exception(func, message)
{
}
-//--------------------------------------------------------------------------
-// Function: DataSetIException destructor
-///\brief Noop destructor.
-//--------------------------------------------------------------------------
-DataSetIException::~DataSetIException() throw()
-{
-}
//--------------------------------------------------------------------------
// Subclass: AttributeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: AttributeIException default constructor
@@ -578,17 +504,9 @@ AttributeIException::AttributeIException(const H5std_string &func, const H5std_s
: Exception(func, message)
{
}
-//--------------------------------------------------------------------------
-// Function: AttributeIException destructor
-///\brief Noop destructor.
-//--------------------------------------------------------------------------
-AttributeIException::~AttributeIException() throw()
-{
-}
//--------------------------------------------------------------------------
// Subclass: ReferenceException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: ReferenceException default constructor
@@ -608,17 +526,9 @@ ReferenceException::ReferenceException(const H5std_string &func, const H5std_str
: Exception(func, message)
{
}
-//--------------------------------------------------------------------------
-// Function: ReferenceException destructor
-///\brief Noop destructor.
-//--------------------------------------------------------------------------
-ReferenceException::~ReferenceException() throw()
-{
-}
//--------------------------------------------------------------------------
// Subclass: LibraryIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: LibraryIException default constructor
@@ -638,17 +548,9 @@ LibraryIException::LibraryIException(const H5std_string &func, const H5std_strin
: Exception(func, message)
{
}
-//--------------------------------------------------------------------------
-// Function: LibraryIException destructor
-///\brief Noop destructor.
-//--------------------------------------------------------------------------
-LibraryIException::~LibraryIException() throw()
-{
-}
//--------------------------------------------------------------------------
// Subclass: LocationException
-// Programmer Binh-Minh Ribler - 2014
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: LocationException default constructor
@@ -668,17 +570,9 @@ LocationException::LocationException(const H5std_string &func, const H5std_strin
: Exception(func, message)
{
}
-//--------------------------------------------------------------------------
-// Function: LocationException destructor
-///\brief Noop destructor.
-//--------------------------------------------------------------------------
-LocationException::~LocationException() throw()
-{
-}
//--------------------------------------------------------------------------
// Subclass: IdComponentException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Function: IdComponentException default constructor
@@ -698,12 +592,5 @@ IdComponentException::IdComponentException(const H5std_string &func, const H5std
: Exception(func, message)
{
}
-//--------------------------------------------------------------------------
-// Function: IdComponentException destructor
-///\brief Noop destructor.
-//--------------------------------------------------------------------------
-IdComponentException::~IdComponentException() throw()
-{
-}
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Exception.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Exception.h
index 9970d2229b0..6bf51ef893b 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Exception.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Exception.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -41,9 +40,9 @@ class H5_DLLCPP Exception {
// Returns the detailed message set at the time the exception is thrown
H5std_string getDetailMsg() const;
- const char * getCDetailMsg() const; // C string of detailed message
+ const char *getCDetailMsg() const; // C string of detailed message
H5std_string getFuncName() const; // function name as a string object
- const char * getCFuncName() const; // function name as a char string
+ const char *getCFuncName() const; // function name as a char string
// Turns on the automatic error printing.
static void setAutoPrint(H5E_auto2_t &func, void *client_data);
@@ -75,7 +74,7 @@ class H5_DLLCPP Exception {
Exception(const Exception &orig);
// virtual Destructor
- virtual ~Exception() throw();
+ virtual ~Exception() = default;
protected:
// Default value for detail_message
@@ -90,84 +89,84 @@ class H5_DLLCPP FileIException : public Exception {
public:
FileIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
FileIException();
- virtual ~FileIException() throw() H5_OVERRIDE;
+ virtual ~FileIException() override = default;
};
class H5_DLLCPP GroupIException : public Exception {
public:
GroupIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
GroupIException();
- virtual ~GroupIException() throw() H5_OVERRIDE;
+ virtual ~GroupIException() override = default;
};
class H5_DLLCPP DataSpaceIException : public Exception {
public:
DataSpaceIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
DataSpaceIException();
- virtual ~DataSpaceIException() throw() H5_OVERRIDE;
+ virtual ~DataSpaceIException() override = default;
};
class H5_DLLCPP DataTypeIException : public Exception {
public:
DataTypeIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
DataTypeIException();
- virtual ~DataTypeIException() throw() H5_OVERRIDE;
+ virtual ~DataTypeIException() override = default;
};
class H5_DLLCPP ObjHeaderIException : public Exception {
public:
ObjHeaderIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
ObjHeaderIException();
- virtual ~ObjHeaderIException() throw() H5_OVERRIDE;
+ virtual ~ObjHeaderIException() override = default;
};
class H5_DLLCPP PropListIException : public Exception {
public:
PropListIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
PropListIException();
- virtual ~PropListIException() throw() H5_OVERRIDE;
+ virtual ~PropListIException() override = default;
};
class H5_DLLCPP DataSetIException : public Exception {
public:
DataSetIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
DataSetIException();
- virtual ~DataSetIException() throw() H5_OVERRIDE;
+ virtual ~DataSetIException() override = default;
};
class H5_DLLCPP AttributeIException : public Exception {
public:
AttributeIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
AttributeIException();
- virtual ~AttributeIException() throw() H5_OVERRIDE;
+ virtual ~AttributeIException() override = default;
};
class H5_DLLCPP ReferenceException : public Exception {
public:
ReferenceException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
ReferenceException();
- virtual ~ReferenceException() throw() H5_OVERRIDE;
+ virtual ~ReferenceException() override = default;
};
class H5_DLLCPP LibraryIException : public Exception {
public:
LibraryIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
LibraryIException();
- virtual ~LibraryIException() throw() H5_OVERRIDE;
+ virtual ~LibraryIException() override = default;
};
class H5_DLLCPP LocationException : public Exception {
public:
LocationException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
LocationException();
- virtual ~LocationException() throw() H5_OVERRIDE;
+ virtual ~LocationException() override = default;
};
class H5_DLLCPP IdComponentException : public Exception {
public:
IdComponentException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG);
IdComponentException();
- virtual ~IdComponentException() throw() H5_OVERRIDE;
+ virtual ~IdComponentException() override = default;
}; // end of IdComponentException
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FaccProp.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FaccProp.cpp
index 005e5997c01..dc4b949b5b3 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FaccProp.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FaccProp.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -17,8 +16,6 @@
using std::cerr;
using std::endl;
-//#include
-
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -44,7 +41,6 @@ FileAccPropList *FileAccPropList::DEFAULT_ = 0;
// If FileAccPropList::DEFAULT_ already points to an allocated
// object, throw a PropListIException. This scenario should not
// happen.
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
FileAccPropList *
FileAccPropList::getConstant()
@@ -71,13 +67,11 @@ FileAccPropList::getConstant()
// Purpose Deletes the constant object that FileAccPropList::DEFAULT_
// points to.
// exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
void
FileAccPropList::deleteConstants()
{
- if (DEFAULT_ != 0)
- delete DEFAULT_;
+ delete DEFAULT_;
}
//--------------------------------------------------------------------------
@@ -90,7 +84,6 @@ const FileAccPropList &FileAccPropList::DEFAULT = *getConstant();
//--------------------------------------------------------------------------
// Function: Default Constructor
///\brief Creates a file access property list
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileAccPropList::FileAccPropList() : PropList(H5P_FILE_ACCESS)
{
@@ -100,7 +93,6 @@ FileAccPropList::FileAccPropList() : PropList(H5P_FILE_ACCESS)
// Function: FileAccPropList copy constructor
///\brief Copy constructor: same HDF5 object as \a original
///\param original - IN: FileAccPropList instance to copy
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileAccPropList::FileAccPropList(const FileAccPropList &original) : PropList(original)
{
@@ -110,7 +102,6 @@ FileAccPropList::FileAccPropList(const FileAccPropList &original) : PropList(ori
// Function: FileAccPropList overloaded constructor
///\brief Creates a file access property list using the id of an
/// existing one.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileAccPropList::FileAccPropList(const hid_t plist_id) : PropList(plist_id)
{
@@ -121,7 +112,6 @@ FileAccPropList::FileAccPropList(const hid_t plist_id) : PropList(plist_id)
///\brief Modifies this property list to use the \c H5FD_STDIO driver.
///
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
FileAccPropList::setStdio() const
@@ -141,7 +131,6 @@ FileAccPropList::setStdio() const
/// For detail on valid driver identifiers, please refer to the
/// H5Pget_driver API in the HDF5 C Reference Manual.
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hid_t
FileAccPropList::getDriver() const
@@ -157,12 +146,11 @@ FileAccPropList::getDriver() const
// Function: FileAccPropList::setDriver
///\brief Set file driver for this property list.
///\param new_driver_id - IN: File driver
-///\param new_driver_info - IN: Struct containing the driver-specific properites
+///\param new_driver_info - IN: Struct containing the driver-specific properties
///\exception H5::PropListIException
///\par Description
/// For information, please refer to the H5Pset_driver API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
FileAccPropList::setDriver(hid_t new_driver_id, const void *new_driver_info) const
@@ -178,7 +166,6 @@ FileAccPropList::setDriver(hid_t new_driver_id, const void *new_driver_info) con
///\brief Sets offset for family driver.
///\param offset - IN: offset value
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
FileAccPropList::setFamilyOffset(hsize_t offset) const
@@ -194,7 +181,6 @@ FileAccPropList::setFamilyOffset(hsize_t offset) const
///\brief Get offset for family driver.
///\return Offset for family driver
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hsize_t
FileAccPropList::getFamilyOffset() const
@@ -219,7 +205,6 @@ FileAccPropList::getFamilyOffset() const
///\par Description
/// For more details on the use of \c H5FD_CORE driver, please
/// refer to the H5Pset_fapl_core API in the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
FileAccPropList::setCore(size_t increment, hbool_t backing_store) const
@@ -237,7 +222,6 @@ FileAccPropList::setCore(size_t increment, hbool_t backing_store) const
///\param backing_store - OUT: Indicating whether to write the file
/// contents to disk when the file is closed
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
FileAccPropList::getCore(size_t &increment, hbool_t &backing_store) const
@@ -257,7 +241,6 @@ FileAccPropList::getCore(size_t &increment, hbool_t &backing_store) const
///\exception H5::PropListIException
///\par Description
/// Note that \a memb_size is used only when creating a new file.
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
FileAccPropList::setFamily(hsize_t memb_size, const FileAccPropList &memb_plist) const
@@ -276,7 +259,6 @@ FileAccPropList::setFamily(hsize_t memb_size, const FileAccPropList &memb_plist)
///\param memb_plist - OUT: Retrieved file access property list for each
/// file member
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
FileAccPropList::getFamily(hsize_t &memb_size, FileAccPropList &memb_plist) const
@@ -297,7 +279,6 @@ FileAccPropList::getFamily(hsize_t &memb_size, FileAccPropList &memb_plist) cons
///\param memb_size - OUT: Size in bytes of each file member
///\return The file access property list for each file member
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
FileAccPropList
FileAccPropList::getFamily(hsize_t &memb_size) const
@@ -323,7 +304,6 @@ FileAccPropList::getFamily(hsize_t &memb_size) const
///\par Description
/// For information, please refer to the H5Pset_fapl_split API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
FileAccPropList::setSplit(const FileAccPropList &meta_plist, const FileAccPropList &raw_plist,
@@ -346,7 +326,6 @@ FileAccPropList::setSplit(const FileAccPropList &meta_plist, const FileAccPropLi
///\param meta_ext - IN: Metadata filename extension as \c H5std_string
///\param raw_ext - IN: Raw data filename extension as \c H5std_string
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
FileAccPropList::setSplit(const FileAccPropList &meta_plist, const FileAccPropList &raw_plist,
@@ -365,7 +344,6 @@ FileAccPropList::setSplit(const FileAccPropList &meta_plist, const FileAccPropLi
/// property from this property list.
///\return Data sieve buffer size, in bytes
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
size_t
FileAccPropList::getSieveBufSize() const
@@ -386,7 +364,6 @@ FileAccPropList::getSieveBufSize() const
///\par Description
/// For more detail, please refer to the H5Pset_sieve_buf_size
/// API in the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
FileAccPropList::setSieveBufSize(size_t bufsize) const
@@ -406,7 +383,6 @@ FileAccPropList::setSieveBufSize(size_t bufsize) const
///\par Description
/// For information, please refer to the H5Pset_meta_block_size
/// API in the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
FileAccPropList::setMetaBlockSize(hsize_t &block_size) const
@@ -422,7 +398,6 @@ FileAccPropList::setMetaBlockSize(hsize_t &block_size) const
///\brief Returns the current metadata block size setting.
///\return Metadata block size
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hsize_t
FileAccPropList::getMetaBlockSize() const
@@ -446,7 +421,6 @@ FileAccPropList::getMetaBlockSize() const
///\par Description
/// For information, please refer to the H5Pset_fapl_log API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
FileAccPropList::setLog(const char *logfile, unsigned flags, size_t buf_size) const
@@ -465,7 +439,6 @@ FileAccPropList::setLog(const char *logfile, unsigned flags, size_t buf_size) co
///\param logfile - IN: Name of the log file - string
///\param flags - IN: Flags specifying the types of logging activity
///\param buf_size - IN: Size of the logging buffer
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
FileAccPropList::setLog(const H5std_string &logfile, unsigned flags, size_t buf_size) const
@@ -479,7 +452,6 @@ FileAccPropList::setLog(const H5std_string &logfile, unsigned flags, size_t buf_
/// driver.
///
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
FileAccPropList::setSec2() const
@@ -504,7 +476,6 @@ FileAccPropList::setSec2() const
///
/// For more detail, please refer to the H5Pset_alignment API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FileAccPropList::setAlignment(hsize_t threshold, hsize_t alignment) const
@@ -522,7 +493,6 @@ FileAccPropList::setAlignment(hsize_t threshold, hsize_t alignment) const
///\param threshold - OUT: Retrieved threshold value for file object size
///\param alignment - OUT: Retrieved alignment value
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FileAccPropList::getAlignment(hsize_t &threshold, hsize_t &alignment) const
@@ -541,7 +511,6 @@ FileAccPropList::getAlignment(hsize_t &threshold, hsize_t &alignment) const
///\par Description
/// For information, please refer to the H5Pset_multi_type API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
FileAccPropList::setMultiType(H5FD_mem_t dtype) const
@@ -560,7 +529,6 @@ FileAccPropList::setMultiType(H5FD_mem_t dtype) const
///\par Description
/// For information, please refer to the H5Pget_multi_type API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
H5FD_mem_t
FileAccPropList::getMultiType() const
@@ -588,7 +556,6 @@ FileAccPropList::getMultiType() const
/// means fully read chunks are treated no differently than other
/// chunks (the preemption is strictly LRU) while a value of one
/// means fully read chunks are always preempted before other chunks.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FileAccPropList::setCache(int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes, double rdcc_w0) const
@@ -607,7 +574,6 @@ FileAccPropList::setCache(int mdc_nelmts, size_t rdcc_nelmts, size_t rdcc_nbytes
///\param rdcc_nbytes - OUT: Total size of the raw data chunk cache, in bytes
///\param rdcc_w0 - OUT: Preemption policy
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FileAccPropList::getCache(int &mdc_nelmts, size_t &rdcc_nelmts, size_t &rdcc_nbytes, double &rdcc_w0) const
@@ -623,7 +589,6 @@ FileAccPropList::getCache(int &mdc_nelmts, size_t &rdcc_nelmts, size_t &rdcc_nby
///\brief Sets the degree for the file close behavior.
///\param degree - IN:
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
FileAccPropList::setFcloseDegree(H5F_close_degree_t degree) const
@@ -639,7 +604,6 @@ FileAccPropList::setFcloseDegree(H5F_close_degree_t degree) const
///\brief Returns the degree for the file close behavior.
///\return The degree for the file close behavior
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
H5F_close_degree_t
FileAccPropList::getFcloseDegree() const
@@ -661,7 +625,6 @@ FileAccPropList::getFcloseDegree() const
///\par Description
/// For information, please refer to the H5Pset_gc_references API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FileAccPropList::setGcReferences(unsigned gc_ref) const
@@ -677,7 +640,6 @@ FileAccPropList::setGcReferences(unsigned gc_ref) const
///\brief Returns the garbage collecting references setting.
///\return Garbage collecting references setting, 0 (off) or 1 (on)
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
unsigned
FileAccPropList::getGcReferences() const
@@ -703,7 +665,6 @@ FileAccPropList::getGcReferences() const
///\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
@@ -726,7 +687,6 @@ FileAccPropList::setFileLocking(hbool_t use_file_locking, hbool_t ignore_when_di
///\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
@@ -752,17 +712,18 @@ FileAccPropList::getFileLocking(hbool_t &use_file_locking, hbool_t &ignore_when_
/// \li \c H5F_LIBVER_18
/// \li \c H5F_LIBVER_110
/// \li \c H5F_LIBVER_112
+/// \li \c H5F_LIBVER_114
/// \li \c H5F_LIBVER_LATEST
///
/// Valid values of \a libver_high are as follows:
/// \li \c H5F_LIBVER_18
/// \li \c H5F_LIBVER_110
/// \li \c H5F_LIBVER_112
+/// \li \c H5F_LIBVER_114
/// \li \c H5F_LIBVER_LATEST (Default)
///
/// For more detail, please refer to the H5Pset_libver_bounds API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - March, 2015
//--------------------------------------------------------------------------
void
FileAccPropList::setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_high) const
@@ -789,14 +750,15 @@ FileAccPropList::setLibverBounds(H5F_libver_t libver_low, H5F_libver_t libver_hi
/// \li \c H5F_LIBVER_18
/// \li \c H5F_LIBVER_110
/// \li \c H5F_LIBVER_112
+/// \li \c H5F_LIBVER_114
/// \li \c H5F_LIBVER_LATEST
///
/// and \a libver_high:
/// \li \c H5F_LIBVER_18
/// \li \c H5F_LIBVER_110
/// \li \c H5F_LIBVER_112
+/// \li \c H5F_LIBVER_114
/// \li \c H5F_LIBVER_LATEST
-// Programmer Binh-Minh Ribler - March, 2015
//--------------------------------------------------------------------------
void
FileAccPropList::getLibverBounds(H5F_libver_t &libver_low, H5F_libver_t &libver_high) const
@@ -807,13 +769,4 @@ FileAccPropList::getLibverBounds(H5F_libver_t &libver_low, H5F_libver_t &libver_
}
}
-//--------------------------------------------------------------------------
-// Function: FileAccPropList destructor
-///\brief Noop destructor
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-FileAccPropList::~FileAccPropList()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FaccProp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FaccProp.h
index 53c7799a1ca..67394f1c3a5 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FaccProp.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FaccProp.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -137,7 +136,7 @@ class H5_DLLCPP FileAccPropList : public PropList {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("FileAccPropList");
}
@@ -150,7 +149,7 @@ class H5_DLLCPP FileAccPropList : public PropList {
FileAccPropList(const hid_t plist_id);
// Noop destructor
- virtual ~FileAccPropList() H5_OVERRIDE;
+ virtual ~FileAccPropList() override = default;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FcreatProp.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FcreatProp.cpp
index b9be5634f27..66e4ceb886b 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FcreatProp.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FcreatProp.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -37,7 +36,6 @@ FileCreatPropList *FileCreatPropList::DEFAULT_ = 0;
// Description
// If FileCreatPropList::DEFAULT_ already points to an allocated
// object, throw a PropListIException. This scenario should not happen.
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
FileCreatPropList *
FileCreatPropList::getConstant()
@@ -63,13 +61,11 @@ FileCreatPropList::getConstant()
// Function: FileCreatPropList::deleteConstants
// Purpose Deletes the constant object that FileCreatPropList::DEFAULT_
// points to.
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
void
FileCreatPropList::deleteConstants()
{
- if (DEFAULT_ != 0)
- delete DEFAULT_;
+ delete DEFAULT_;
}
//--------------------------------------------------------------------------
@@ -82,7 +78,6 @@ const FileCreatPropList &FileCreatPropList::DEFAULT = *getConstant();
//--------------------------------------------------------------------------
// Function: FileCreatPropList default constructor
///\brief Default constructor: Creates a file create property list
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileCreatPropList::FileCreatPropList() : PropList(H5P_FILE_CREATE)
{
@@ -93,7 +88,6 @@ FileCreatPropList::FileCreatPropList() : PropList(H5P_FILE_CREATE)
///\brief Copy constructor: same HDF5 object as \a original
/// FileCreatPropList object.
///\param original - IN: FileCreatPropList instance to copy
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileCreatPropList::FileCreatPropList(const FileCreatPropList &original) : PropList(original)
{
@@ -104,7 +98,6 @@ FileCreatPropList::FileCreatPropList(const FileCreatPropList &original) : PropLi
///\brief Creates a file creation property list using the id of an
/// existing one.
///\param plist_id - IN: FileCreatPropList id to use
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FileCreatPropList::FileCreatPropList(const hid_t plist_id) : PropList(plist_id)
{
@@ -121,7 +114,6 @@ FileCreatPropList::FileCreatPropList(const hid_t plist_id) : PropList(plist_id)
///\exception H5::PropListIException
///\par Description
/// Any (or even all) of the output arguments can be null pointers.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FileCreatPropList::getVersion(unsigned &super, unsigned &freelist, unsigned &stab, unsigned &shhdr) const
@@ -141,7 +133,6 @@ FileCreatPropList::getVersion(unsigned &super, unsigned &freelist, unsigned &sta
///\par Description
/// The default user block size is 0; it may be set to any power
/// of 2 equal to 512 or greater (512, 1024, 2048, etc.)
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FileCreatPropList::setUserblock(hsize_t size) const
@@ -157,7 +148,6 @@ FileCreatPropList::setUserblock(hsize_t size) const
///\brief Returns the user block size of this file creation property list.
///\return User block size
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
hsize_t
FileCreatPropList::getUserblock() const
@@ -180,7 +170,6 @@ FileCreatPropList::getUserblock() const
///\par Description
/// For information, please refer to the H5Pset_sizes API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FileCreatPropList::setSizes(size_t sizeof_addr, size_t sizeof_size) const
@@ -197,7 +186,6 @@ FileCreatPropList::setSizes(size_t sizeof_addr, size_t sizeof_size) const
/// HDF5 file.
///
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FileCreatPropList::getSizes(size_t &sizeof_addr, size_t &sizeof_size) const
@@ -218,7 +206,6 @@ FileCreatPropList::getSizes(size_t &sizeof_addr, size_t &sizeof_size) const
///\par Description
/// For information, please refer to the H5Pset_sym_k API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FileCreatPropList::setSymk(unsigned ik, unsigned lk) const
@@ -238,7 +225,6 @@ FileCreatPropList::setSymk(unsigned ik, unsigned lk) const
///\par Description
/// For information, please refer to the H5Pget_sym_k API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FileCreatPropList::getSymk(unsigned &ik, unsigned &lk) const
@@ -258,7 +244,6 @@ FileCreatPropList::getSymk(unsigned &ik, unsigned &lk) const
///\par Description
/// For information, please refer to the H5Pset_istore_k API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FileCreatPropList::setIstorek(unsigned ik) const
@@ -277,7 +262,6 @@ FileCreatPropList::setIstorek(unsigned ik) const
///\par Description
/// For information, please refer to the H5Pget_istore_k API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
unsigned
FileCreatPropList::getIstorek() const
@@ -306,7 +290,6 @@ FileCreatPropList::getIstorek() const
/// changed and the existing threshold will be retained.
/// For information, please refer to the H5Pset_file_space_strategy
/// API in the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - Feb, 2017
//--------------------------------------------------------------------------
void
FileCreatPropList::setFileSpaceStrategy(H5F_fspace_strategy_t strategy, hbool_t persist,
@@ -327,7 +310,6 @@ FileCreatPropList::setFileSpaceStrategy(H5F_fspace_strategy_t strategy, hbool_t
///\param persist - OUT: Whether to persist free-space
///\param threshold - OUT: Free-space section threshold
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - Feb, 2017
//--------------------------------------------------------------------------
void
FileCreatPropList::getFileSpaceStrategy(H5F_fspace_strategy_t &strategy, hbool_t &persist,
@@ -345,7 +327,6 @@ FileCreatPropList::getFileSpaceStrategy(H5F_fspace_strategy_t &strategy, hbool_t
///\brief Sets the file space page size for paged aggregation.
///\param fsp_psize - IN: Filespace's page size
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - Feb, 2017
//--------------------------------------------------------------------------
void
FileCreatPropList::setFileSpacePagesize(hsize_t fsp_psize) const
@@ -363,7 +344,6 @@ FileCreatPropList::setFileSpacePagesize(hsize_t fsp_psize) const
/// metadata or raw data.
///\return File space page size
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - Feb, 2017
//--------------------------------------------------------------------------
hsize_t
FileCreatPropList::getFileSpacePagesize() const
@@ -377,13 +357,4 @@ FileCreatPropList::getFileSpacePagesize() const
return (fsp_psize);
}
-//--------------------------------------------------------------------------
-// Function: FileCreatPropList destructor
-///\brief Noop destructor.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-FileCreatPropList::~FileCreatPropList()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FcreatProp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FcreatProp.h
index 65daf8f2e72..76c2ae5b952 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FcreatProp.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FcreatProp.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -78,7 +77,7 @@ class H5_DLLCPP FileCreatPropList : public PropList {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("FileCreatPropList");
}
@@ -91,7 +90,7 @@ class H5_DLLCPP FileCreatPropList : public PropList {
FileCreatPropList(const hid_t plist_id);
// Noop destructor
- virtual ~FileCreatPropList() H5_OVERRIDE;
+ virtual ~FileCreatPropList() override = default;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5File.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5File.cpp
index 9a6f191f70f..9c390f9c73f 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5File.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5File.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -119,6 +118,52 @@ H5File::H5File(const H5std_string &name, unsigned int flags, const FileCreatProp
}
}
+//--------------------------------------------------------------------------
+// Function: H5File overloaded constructor
+///\brief Opens an HDF5 file using a non-default access property list
+///\param name - IN: Name of the file
+///\param flags - IN: File access flags
+///\param access_plist - IN: File access property list.
+///\par Description
+/// Valid values of \a flags include:
+/// \li \c H5F_ACC_RDONLY - Open file as read-only, if it already
+/// exists, and fail, otherwise
+/// \li \c H5F_ACC_RDWR - Open file for read/write, if it already
+/// exists, and fail, otherwise
+// Notes With a PGI compiler (~2012-2013,) the exception thrown by
+// p_get_file could not be caught in the applications. Added try
+// block here to catch then re-throw it. -BMR 2013/03/21
+//--------------------------------------------------------------------------
+H5File::H5File(const char *name, unsigned int flags, const FileAccPropList &access_plist)
+ : Group(), id(H5I_INVALID_HID)
+{
+ try {
+ p_get_file(name, flags, FileCreatPropList::DEFAULT, access_plist);
+ }
+ catch (FileIException &open_file) {
+ throw open_file;
+ }
+}
+
+//--------------------------------------------------------------------------
+// Function: H5File overloaded constructor
+///\brief This is another overloaded constructor. It differs from the
+/// above constructor only in the type of the \a name argument.
+///\param name - IN: Name of the file - \c H5std_string
+///\param flags - IN: File access flags
+///\param access_plist - IN: File access property list
+//--------------------------------------------------------------------------
+H5File::H5File(const H5std_string &name, unsigned int flags, const FileAccPropList &access_plist)
+ : Group(), id(H5I_INVALID_HID)
+{
+ try {
+ p_get_file(name.c_str(), flags, FileCreatPropList::DEFAULT, access_plist);
+ }
+ catch (FileIException &open_file) {
+ throw open_file;
+ }
+}
+
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// This function is private and contains common code between the
@@ -165,9 +210,8 @@ H5File::p_get_file(const char *name, unsigned int flags, const FileCreatPropList
// constructor is needed by the library in order to return
// an object, H5File doesn't need it. -BMR (HDFFV-8766 partially)
//--------------------------------------------------------------------------
-H5File::H5File(hid_t existing_id) : Group()
+H5File::H5File(hid_t existing_id) : Group(), id{existing_id}
{
- id = existing_id;
incRefCount(); // increment number of references to this id
}
@@ -180,9 +224,8 @@ H5File::H5File(hid_t existing_id) : Group()
///\param original - IN: H5File instance to copy
// December 2000
//--------------------------------------------------------------------------
-H5File::H5File(const H5File &original) : Group(original)
+H5File::H5File(const H5File &original) : Group(original), id{original.getId()}
{
- id = original.getId();
incRefCount(); // increment number of references to this id
}
@@ -575,7 +618,6 @@ H5File::getVFDHandle(void **file_handle) const
///\par Description
/// This function is called after an existing file is opened in
/// order to learn the true size of the underlying file.
-// Programmer Raymond Lu - June 24, 2004
//--------------------------------------------------------------------------
hsize_t
H5File::getFileSize() const
@@ -596,7 +638,6 @@ H5File::getFileSize() const
///\par Description
/// This function is called after an existing file is opened in
/// order to retrieve the unique 'file number' for the file.
-// Programmer Quincey Koziol - April 13, 2019
//--------------------------------------------------------------------------
unsigned long
H5File::getFileNum() const
@@ -667,7 +708,7 @@ H5File::getLocId() const
///\exception H5::IdComponentException when the attempt to close the HDF5
/// object fails
// Description
-// The underlaying reference counting in the C library ensures
+// The underlying reference counting in the C library ensures
// that the current valid id of this object is properly closed.
// Then the object's id is reset to the new id.
// December 2000
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5File.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5File.h
index bdd7b84734f..617adaadb4d 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5File.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5File.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -27,10 +26,12 @@ class H5_DLLCPP H5File : public Group {
// Creates or opens an HDF5 file.
H5File(const char *name, unsigned int flags,
const FileCreatPropList &create_plist = FileCreatPropList::DEFAULT,
- const FileAccPropList & access_plist = FileAccPropList::DEFAULT);
+ const FileAccPropList &access_plist = FileAccPropList::DEFAULT);
H5File(const H5std_string &name, unsigned int flags,
const FileCreatPropList &create_plist = FileCreatPropList::DEFAULT,
- const FileAccPropList & access_plist = FileAccPropList::DEFAULT);
+ const FileAccPropList &access_plist = FileAccPropList::DEFAULT);
+ H5File(const char *name, unsigned int flags, const FileAccPropList &access_plist);
+ H5File(const H5std_string &name, unsigned int flags, const FileAccPropList &access_plist);
// Open the file
void openFile(const H5std_string &name, unsigned int flags,
@@ -39,7 +40,7 @@ class H5_DLLCPP H5File : public Group {
const FileAccPropList &access_plist = FileAccPropList::DEFAULT);
// Close this file.
- virtual void close() H5_OVERRIDE;
+ virtual void close() override;
// Gets a copy of the access property list of this file.
FileAccPropList getAccessPlist() const;
@@ -77,9 +78,9 @@ class H5_DLLCPP H5File : public Group {
static bool isHdf5(const H5std_string &name);
// Determines if a file, specified by its name, can be accessed as HDF5
- static bool isAccessible(const char * name,
+ static bool isAccessible(const char *name,
const FileAccPropList &access_plist = FileAccPropList::DEFAULT);
- static bool isAccessible(const H5std_string & name,
+ static bool isAccessible(const H5std_string &name,
const FileAccPropList &access_plist = FileAccPropList::DEFAULT);
// Reopens this file.
@@ -96,16 +97,16 @@ class H5_DLLCPP H5File : public Group {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("H5File");
}
// Throw file exception.
- virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const H5_OVERRIDE;
+ virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const override;
// For CommonFG to get the file id.
- virtual hid_t getLocId() const H5_OVERRIDE;
+ virtual hid_t getLocId() const override;
// Default constructor
H5File();
@@ -114,15 +115,15 @@ class H5_DLLCPP H5File : public Group {
H5File(const H5File &original);
// Gets the HDF5 file id.
- virtual hid_t getId() const H5_OVERRIDE;
+ virtual hid_t getId() const override;
// H5File destructor.
- virtual ~H5File() H5_OVERRIDE;
+ virtual ~H5File() override;
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Sets the HDF5 file id.
- virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
+ virtual void p_setId(const hid_t new_id) override;
#endif // DOXYGEN_SHOULD_SKIP_THIS
private:
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FloatType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FloatType.cpp
index 33f83770844..41ee8a850bc 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FloatType.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FloatType.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -38,7 +37,6 @@ namespace H5 {
//--------------------------------------------------------------------------
// Function: FloatType default constructor
///\brief Default constructor: Creates a stub floating-point datatype
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType::FloatType()
{
@@ -49,7 +47,6 @@ FloatType::FloatType()
///\brief Creates a floating-point datatype using a predefined type.
///\param pred_type - IN: Predefined datatype
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType::FloatType(const PredType &pred_type) : AtomType()
{
@@ -63,7 +60,6 @@ FloatType::FloatType(const PredType &pred_type) : AtomType()
/// datatype.
///\param existing_id - IN: Id of an existing datatype
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType::FloatType(const hid_t existing_id) : AtomType(existing_id)
{
@@ -72,7 +68,6 @@ FloatType::FloatType(const hid_t existing_id) : AtomType(existing_id)
//--------------------------------------------------------------------------
// Function: FloatType copy constructor
///\brief Copy constructor: same HDF5 object as \a original
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType::FloatType(const FloatType &original) : AtomType(original)
{
@@ -84,7 +79,6 @@ FloatType::FloatType(const FloatType &original) : AtomType(original)
///\param dataset - IN: Dataset that this floating-point datatype
/// associates with
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType::FloatType(const DataSet &dataset) : AtomType()
{
@@ -103,7 +97,6 @@ FloatType::FloatType(const DataSet &dataset) : AtomType()
///\param loc - IN: Location of the type
///\param dtype_name - IN: Float type name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openFloatType(const char*)
@@ -122,7 +115,6 @@ FloatType::FloatType(const H5Location &loc, const char *dtype_name) : AtomType()
///\param loc - IN: Location of the type
///\param dtype_name - IN: Float type name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openFloatType(const H5std_string&)
@@ -140,7 +132,6 @@ FloatType::FloatType(const H5Location &loc, const H5std_string &dtype_name) : At
/// binary object description of this type.
///
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Aug 2017
//--------------------------------------------------------------------------
DataType *
FloatType::decode() const
@@ -166,7 +157,6 @@ FloatType::decode() const
///\param mpos - OUT: Retrieved mantissa bit-position
///\param msize - OUT: Retrieved size of mantissa, in bits
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FloatType::getFields(size_t &spos, size_t &epos, size_t &esize, size_t &mpos, size_t &msize) const
@@ -187,7 +177,6 @@ FloatType::getFields(size_t &spos, size_t &epos, size_t &esize, size_t &mpos, si
///\param mpos - OUT: Mantissa bit-position
///\param msize - OUT: Size of mantissa, in bits
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FloatType::setFields(size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize) const
@@ -203,7 +192,6 @@ FloatType::setFields(size_t spos, size_t epos, size_t esize, size_t mpos, size_t
///\brief Retrieves the exponent bias of a floating-point type.
///\return Exponent bias
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
size_t
FloatType::getEbias() const
@@ -221,7 +209,6 @@ FloatType::getEbias() const
///\brief Sets the exponent bias of a floating-point type.
///\param ebias - Exponent bias value
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FloatType::setEbias(size_t ebias) const
@@ -245,7 +232,6 @@ FloatType::setEbias(size_t ebias) const
/// For your convenience, this function also provides the text
/// string of the returned normalization type, via parameter
/// \a norm_string.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_norm_t
FloatType::getNorm(H5std_string &norm_string) const
@@ -274,7 +260,6 @@ FloatType::getNorm(H5std_string &norm_string) const
/// \li \c H5T_NORM_IMPLIED (0) - MSB of mantissa is not stored
/// \li \c H5T_NORM_MSBSET (1) - MSB of mantissa is always 1
/// \li \c H5T_NORM_NONE (2) - Mantissa is not normalized
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FloatType::setNorm(H5T_norm_t norm) const
@@ -298,7 +283,6 @@ FloatType::setNorm(H5T_norm_t norm) const
/// For your convenience, this function also provides the text
/// string of the returned internal padding type, via parameter
/// \a pad_string.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_pad_t
FloatType::getInpad(H5std_string &pad_string) const
@@ -332,7 +316,6 @@ FloatType::getInpad(H5std_string &pad_string) const
/// \li \c H5T_PAD_ZERO (0) - Set background to zeros
/// \li \c H5T_PAD_ONE (1) - Set background to ones
/// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
FloatType::setInpad(H5T_pad_t inpad) const
@@ -343,13 +326,4 @@ FloatType::setInpad(H5T_pad_t inpad) const
}
}
-//--------------------------------------------------------------------------
-// Function: FloatType destructor
-///\brief Noop destructor.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-FloatType::~FloatType()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FloatType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FloatType.h
index e8df757c3b5..b804892b0a8 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FloatType.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5FloatType.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -36,7 +35,7 @@ class H5_DLLCPP FloatType : public AtomType {
// Returns an FloatType object via DataType* by decoding the
// binary object description of this type.
- virtual DataType *decode() const H5_OVERRIDE;
+ virtual DataType *decode() const override;
// Retrieves the exponent bias of a floating-point type.
size_t getEbias() const;
@@ -64,7 +63,7 @@ class H5_DLLCPP FloatType : public AtomType {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("FloatType");
}
@@ -79,7 +78,7 @@ class H5_DLLCPP FloatType : public AtomType {
FloatType(const FloatType &original);
// Noop destructor.
- virtual ~FloatType() H5_OVERRIDE;
+ virtual ~FloatType() override = default;
}; // end of FloatType
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Group.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Group.cpp
index fe791dae9df..48358b3a5cb 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Group.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Group.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -44,7 +43,6 @@ using std::endl;
//--------------------------------------------------------------------------
// Function: Group default constructor
///\brief Default constructor: creates a stub Group.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group::Group() : H5Object(), CommonFG(), id(H5I_INVALID_HID)
{
@@ -54,7 +52,6 @@ Group::Group() : H5Object(), CommonFG(), id(H5I_INVALID_HID)
// Function: Group copy constructor
///\brief Copy constructor: same HDF5 object as \a original
///\param original - IN: Original group to copy
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group::Group(const Group &original) : H5Object(), CommonFG(), id(original.id)
{
@@ -66,7 +63,6 @@ Group::Group(const Group &original) : H5Object(), CommonFG(), id(original.id)
///\brief Closes an object, which was opened with Group::getObjId
///
///\exception H5::FileIException or H5::GroupIException
-// Programmer Binh-Minh Ribler - March, 2017
//--------------------------------------------------------------------------
void
Group::closeObjId(hid_t obj_id) const
@@ -80,7 +76,6 @@ Group::closeObjId(hid_t obj_id) const
//--------------------------------------------------------------------------
// Function: Group::getLocId
// Purpose: Get the id of this group
-// Programmer Binh-Minh Ribler - 2000
// Description
// This function is a redefinition of CommonFG::getLocId. It
// is used by CommonFG member functions to get the file id.
@@ -99,7 +94,6 @@ Group::getLocId() const
// Function: Group overloaded constructor
///\brief Creates a Group object using the id of an existing group.
///\param existing_id - IN: Id of an existing group
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group::Group(const hid_t existing_id) : H5Object(), CommonFG(), id(existing_id)
{
@@ -117,7 +111,6 @@ Group::Group(const hid_t existing_id) : H5Object(), CommonFG(), id(existing_id)
///\par Description
/// \c obj can be DataSet, Group, or named DataType, that
/// is a datatype that has been named by DataType::commit.
-// Programmer Binh-Minh Ribler - Oct, 2006
//--------------------------------------------------------------------------
Group::Group(const H5Location &loc, const void *ref, H5R_type_t ref_type, const PropList &plist)
: H5Object(), CommonFG(), id(H5I_INVALID_HID)
@@ -130,7 +123,6 @@ Group::Group(const H5Location &loc, const void *ref, H5R_type_t ref_type, const
///\brief Returns the number of objects in this group.
///\return Number of objects
///\exception H5::FileIException or H5::GroupIException
-// Programmer Binh-Minh Ribler - January, 2003
//--------------------------------------------------------------------------
hsize_t
Group::getNumObjs() const
@@ -154,7 +146,6 @@ Group::getNumObjs() const
/// This function opens an object in a group or file, using
/// H5Oopen. Thus, an object can be opened without knowing
/// the object's type.
-// Programmer Binh-Minh Ribler - March, 2017
//--------------------------------------------------------------------------
hid_t
Group::getObjId(const char *obj_name, const PropList &plist) const
@@ -174,7 +165,6 @@ Group::getObjId(const char *obj_name, const PropList &plist) const
///\param plist - IN: Access property list for the link pointing to
/// the object
///\exception H5::FileIException or H5::GroupIException
-// Programmer Binh-Minh Ribler - March, 2017
//--------------------------------------------------------------------------
hid_t
Group::getObjId(const H5std_string &obj_name, const PropList &plist) const
@@ -192,7 +182,6 @@ Group::getObjId(const H5std_string &obj_name, const PropList &plist) const
// AbstractDS and Attribute are moved out of H5Object. In
// addition, member IdComponent::id is moved into subclasses, and
// IdComponent::getId now becomes pure virtual function.
-// Programmer Binh-Minh Ribler - May, 2008
//--------------------------------------------------------------------------
hid_t
Group::getId() const
@@ -208,10 +197,9 @@ Group::getId() const
///\exception H5::IdComponentException when the attempt to close the HDF5
/// object fails
// Description:
-// The underlaying reference counting in the C library ensures
+// The underlying reference counting in the C library ensures
// that the current valid id of this object is properly closed.
// Then the object's id is reset to the new id.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
Group::p_setId(const hid_t new_id)
@@ -233,7 +221,6 @@ Group::p_setId(const hid_t new_id)
///\brief Closes this group.
///
///\exception H5::GroupIException
-// Programmer Binh-Minh Ribler - Mar 9, 2005
//--------------------------------------------------------------------------
void
Group::close()
@@ -259,7 +246,6 @@ Group::close()
// proper exception can be thrown for file or group. The
// "Group::" will be inserted to indicate the function called is
// an implementation of Group.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
Group::throwException(const H5std_string &func_name, const H5std_string &msg) const
@@ -272,7 +258,6 @@ Group::throwException(const H5std_string &func_name, const H5std_string &msg) co
//--------------------------------------------------------------------------
// Function: Group destructor
///\brief Properly terminates access to this group.
-// Programmer Binh-Minh Ribler - 2000
// Modification
// - Replaced resetIdComponent() with decRefCount() to use C
// library ID reference counting mechanism - BMR, Feb 20, 2005
@@ -289,4 +274,14 @@ Group::~Group()
}
}
+//--------------------------------------------------------------------------
+// Function: Copy assignment operator
+Group &
+Group::operator=(const Group &original)
+{
+ IdComponent::operator=(original);
+
+ return *this;
+}
+
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Group.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Group.h
index b5f7e51110d..9c89dd1599a 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Group.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Group.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -24,20 +23,20 @@ namespace H5 {
class H5_DLLCPP Group : public H5Object, public CommonFG {
public:
// Close this group.
- virtual void close() H5_OVERRIDE;
+ virtual void close() override;
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("Group");
}
// Throw group exception.
- virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const H5_OVERRIDE;
+ virtual void throwException(const H5std_string &func_name, const H5std_string &msg) const override;
// for CommonFG to get the file id.
- virtual hid_t getLocId() const H5_OVERRIDE;
+ virtual hid_t getLocId() const override;
// Creates a group by way of dereference.
Group(const H5Location &loc, const void *ref, H5R_type_t ref_type = H5R_OBJECT,
@@ -63,10 +62,13 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
Group(const Group &original);
// Gets the group id.
- virtual hid_t getId() const H5_OVERRIDE;
+ virtual hid_t getId() const override;
// Destructor
- virtual ~Group() H5_OVERRIDE;
+ virtual ~Group() override;
+
+ // Copy assignment operator.
+ Group &operator=(const Group &original);
// Creates a copy of an existing group using its id.
Group(const hid_t group_id);
@@ -74,7 +76,7 @@ class H5_DLLCPP Group : public H5Object, public CommonFG {
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Sets the group id.
- virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
+ virtual void p_setId(const hid_t new_id) override;
#endif // DOXYGEN_SHOULD_SKIP_THIS
private:
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IdComponent.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IdComponent.cpp
index 18bcbd3c870..0d15aac7fb9 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IdComponent.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IdComponent.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -13,7 +12,6 @@
#include
-#include "H5private.h" // for HDmemset
#include "H5Include.h"
#include "H5Exception.h"
#include "H5Library.h"
@@ -36,7 +34,6 @@ bool IdComponent::H5dontAtexit_called = false;
//--------------------------------------------------------------------------
// Function: IdComponent::incRefCount
///\brief Increment reference counter for a given id.
-// Programmer Binh-Minh Ribler - May 2005
//--------------------------------------------------------------------------
void
IdComponent::incRefCount(const hid_t obj_id) const
@@ -49,7 +46,6 @@ IdComponent::incRefCount(const hid_t obj_id) const
//--------------------------------------------------------------------------
// Function: IdComponent::incRefCount
///\brief Increment reference counter for the id of this object.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
IdComponent::incRefCount() const
@@ -60,7 +56,6 @@ IdComponent::incRefCount() const
//--------------------------------------------------------------------------
// Function: IdComponent::decRefCount
///\brief Decrement reference counter for a given id.
-// Programmer Binh-Minh Ribler - May 2005
// Modification:
// Added the check for ref counter to give a little more info
// on why H5Idec_ref fails in some cases - BMR 5/19/2005
@@ -80,7 +75,6 @@ IdComponent::decRefCount(const hid_t obj_id) const
//--------------------------------------------------------------------------
// Function: IdComponent::decRefCount
///\brief Decrement reference counter for the id of this object.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
IdComponent::decRefCount() const
@@ -92,7 +86,6 @@ IdComponent::decRefCount() const
// Function: IdComponent::getCounter
///\brief Returns the reference counter for a given id.
///\return Reference count
-// Programmer Binh-Minh Ribler - May 2005
//--------------------------------------------------------------------------
int
IdComponent::getCounter(const hid_t obj_id) const
@@ -111,7 +104,6 @@ IdComponent::getCounter(const hid_t obj_id) const
// Function: IdComponent::getCounter
///\brief Returns the reference counter for the id of this object.
///\return Reference count
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int
IdComponent::getCounter() const
@@ -131,7 +123,6 @@ IdComponent::getCounter() const
/// \li \c H5I_ATTR
/// \li or \c H5I_BADID, if no valid type can be determined or the
/// input object id is invalid.
-// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
H5I_type_t
IdComponent::getHDFObjType(const hid_t obj_id)
@@ -158,7 +149,6 @@ IdComponent::getHDFObjType(const hid_t obj_id)
/// \li \c H5I_ATTR
/// \li or \c H5I_BADID, if no valid type can be determined or the
/// input object id is invalid.
-// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
H5I_type_t
IdComponent::getHDFObjType() const
@@ -186,7 +176,6 @@ IdComponent::getHDFObjType() const
/// \li \c H5I_ERROR_CLASS
/// \li \c H5I_ERROR_MSG
/// \li \c H5I_ERROR_STACK
-// Programmer Binh-Minh Ribler - Feb, 2017
//--------------------------------------------------------------------------
hsize_t
IdComponent::getNumMembers(H5I_type_t type)
@@ -206,7 +195,6 @@ IdComponent::getNumMembers(H5I_type_t type)
///\par Description
/// A valid ID is one that is in use and has an application
/// reference count of at least 1.
-// Programmer Binh-Minh Ribler - Mar 1, 2017
//--------------------------------------------------------------------------
bool
IdComponent::isValid(hid_t an_id)
@@ -241,7 +229,6 @@ IdComponent::isValid(hid_t an_id)
/// \li \c H5I_ERROR_CLASS
/// \li \c H5I_ERROR_MSG
/// \li \c H5I_ERROR_STACK
-// Programmer Binh-Minh Ribler - Feb, 2017
//--------------------------------------------------------------------------
bool
IdComponent::typeExists(H5I_type_t type)
@@ -272,7 +259,6 @@ IdComponent::typeExists(H5I_type_t type)
// 2010/5/9 - BMR
// Removed close() and incRefCount() because setId/p_setId takes
// care of close() and setId takes care incRefCount().
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IdComponent &
IdComponent::operator=(const IdComponent &rhs)
@@ -300,7 +286,6 @@ IdComponent::operator=(const IdComponent &rhs)
// Description:
// p_setId ensures that the current valid id of this object is
// properly closed before resetting the object's id to the new id.
-// Programmer Binh-Minh Ribler - 2000
// Modification
// 2008/7/23 - BMR
// Changed all subclasses' setId to p_setId and put back setId
@@ -322,15 +307,6 @@ IdComponent::setId(const hid_t new_id)
incRefCount();
}
-//--------------------------------------------------------------------------
-// Function: IdComponent destructor
-///\brief Noop destructor.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-IdComponent::~IdComponent()
-{
-}
-
//
// Implementation of protected functions for HDF5 Reference Interface
// and miscellaneous helpers.
@@ -347,7 +323,6 @@ IdComponent::~IdComponent()
/// where the failure occurs. The class-name is provided by
/// fromClass(). This string will be used by a base class when
/// an exception is thrown.
-// Programmer Binh-Minh Ribler - Aug 6, 2005
//--------------------------------------------------------------------------
H5std_string
IdComponent::inMemFunc(const char *func_name) const
@@ -361,7 +336,6 @@ IdComponent::inMemFunc(const char *func_name) const
//--------------------------------------------------------------------------
// Function: IdComponent default constructor - private
///\brief Default constructor.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IdComponent::IdComponent()
{
@@ -383,7 +357,6 @@ IdComponent::IdComponent()
// September 2017
// This function should be moved to H5Location now that Attribute
// inherits from H5Location.
-// Programmer Binh-Minh Ribler - Jul, 2004
//--------------------------------------------------------------------------
H5std_string
IdComponent::p_get_file_name() const
@@ -398,11 +371,14 @@ IdComponent::p_get_file_name() const
throw IdComponentException("", "H5Fget_name failed");
}
+ // The actual message size is the cast value + 1 for the terminal ASCII NUL
+ // (unfortunate in/out type sign mismatch)
+ size_t actual_name_size = static_cast(name_size) + 1;
+
// Call H5Fget_name again to get the actual file name
- char *name_C = new char[name_size + 1]; // temporary C-string for C API
- HDmemset(name_C, 0, name_size + 1); // clear buffer
+ char *name_C = new char[actual_name_size]();
- name_size = H5Fget_name(temp_id, name_C, name_size + 1);
+ name_size = H5Fget_name(temp_id, name_C, actual_name_size);
// Check for failure again
if (name_size < 0) {
@@ -413,7 +389,8 @@ IdComponent::p_get_file_name() const
// Convert the C file name and return
H5std_string file_name(name_C);
delete[] name_C;
- return (file_name);
+
+ return file_name;
}
//
@@ -425,7 +402,6 @@ IdComponent::p_get_file_name() const
// Purpose Verifies that the given id is a valid id so it can be passed
// into an H5I C function.
// Return true if id is valid, false, otherwise
-// Programmer Binh-Minh Ribler - May, 2005
//--------------------------------------------------------------------------
bool
IdComponent::p_valid_id(const hid_t obj_id)
@@ -434,10 +410,7 @@ IdComponent::p_valid_id(const hid_t obj_id)
return false;
H5I_type_t id_type = H5Iget_type(obj_id);
- if (id_type <= H5I_BADID || id_type >= H5I_NTYPES)
- return false;
- else
- return true;
+ return (id_type > H5I_BADID && id_type < H5I_NTYPES);
}
// Notes about IdComponent::id
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IdComponent.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IdComponent.h
index 383d42d333f..2fef96f4137 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IdComponent.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IdComponent.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -82,7 +81,7 @@ class H5_DLLCPP IdComponent {
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Destructor
- virtual ~IdComponent();
+ virtual ~IdComponent() = default;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Include.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Include.h
index ee8ca6d33eb..1a97e0a2944 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Include.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Include.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -25,10 +24,3 @@
* magic number as prefix and checksum as suffix for all chunks.
*/
#define H5O_VERSION_2 2
-
-// Define H5_OVERRIDE to override for C++11.
-#if defined(__cplusplus) && (201103L <= __cplusplus)
-#define H5_OVERRIDE override
-#else
-#define H5_OVERRIDE
-#endif
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IntType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IntType.cpp
index 27c449165bb..7c8b7d36ff9 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IntType.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IntType.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -38,7 +37,6 @@ namespace H5 {
//--------------------------------------------------------------------------
// Function: IntType default constructor
///\brief Default constructor: Creates a stub integer datatype
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType::IntType()
{
@@ -47,7 +45,6 @@ IntType::IntType()
//--------------------------------------------------------------------------
// Function: IntType copy constructor
///\brief Copy constructor: same HDF5 object as \a original
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType::IntType(const IntType &original) : AtomType(original)
{
@@ -58,7 +55,6 @@ IntType::IntType(const IntType &original) : AtomType(original)
///\brief Creates a integer type using a predefined type
///\param pred_type - IN: Predefined datatype
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType::IntType(const PredType &pred_type) : AtomType()
{
@@ -72,7 +68,6 @@ IntType::IntType(const PredType &pred_type) : AtomType()
/// datatype.
///\param existing_id - IN: Id of an existing datatype
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType::IntType(const hid_t existing_id) : AtomType(existing_id)
{
@@ -83,7 +78,6 @@ IntType::IntType(const hid_t existing_id) : AtomType(existing_id)
///\brief Gets the integer datatype of the specified dataset.
///\param dataset - IN: Dataset that this integer datatype associates with
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType::IntType(const DataSet &dataset) : AtomType()
{
@@ -102,7 +96,6 @@ IntType::IntType(const DataSet &dataset) : AtomType()
///\param loc - IN: Location of the type
///\param dtype_name - IN: Integer type name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openIntType(const char*) to
@@ -121,7 +114,6 @@ IntType::IntType(const H5Location &loc, const char *dtype_name) : AtomType()
///\param loc - IN: Location of the type
///\param dtype_name - IN: Integer type name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openIntType(const H5std_string&)
@@ -139,7 +131,6 @@ IntType::IntType(const H5Location &loc, const H5std_string &dtype_name) : AtomTy
/// binary object description of this type.
///
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Aug 2017
//--------------------------------------------------------------------------
DataType *
IntType::decode() const
@@ -161,7 +152,6 @@ IntType::decode() const
///\brief Retrieves the sign type for an integer type.
///\return Valid sign type
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_sign_t
IntType::getSign() const
@@ -181,7 +171,6 @@ IntType::getSign() const
///\brief Sets the sign property for an integer type.
///\param sign - IN: Sign type
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
IntType::setSign(H5T_sign_t sign) const
@@ -193,13 +182,4 @@ IntType::setSign(H5T_sign_t sign) const
}
}
-//--------------------------------------------------------------------------
-// Function: IntType destructor
-///\brief Noop destructor.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-IntType::~IntType()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IntType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IntType.h
index f0f30ac132e..1ca0ab147d2 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IntType.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5IntType.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -36,17 +35,17 @@ class H5_DLLCPP IntType : public AtomType {
// Returns an IntType object via DataType* by decoding the
// binary object description of this type.
- virtual DataType *decode() const H5_OVERRIDE;
+ virtual DataType *decode() const override;
// Retrieves the sign type for an integer type
H5T_sign_t getSign() const;
- // Sets the sign proprety for an integer type.
+ // Sets the sign property for an integer type.
void setSign(H5T_sign_t sign) const;
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("IntType");
}
@@ -61,7 +60,7 @@ class H5_DLLCPP IntType : public AtomType {
IntType(const IntType &original);
// Noop destructor.
- virtual ~IntType() H5_OVERRIDE;
+ virtual ~IntType() override = default;
}; // end of IntType
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LaccProp.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LaccProp.cpp
index feaa555255b..7a66c13d323 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LaccProp.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LaccProp.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -38,7 +37,6 @@ LinkAccPropList *LinkAccPropList::DEFAULT_ = 0;
// If LinkAccPropList::DEFAULT_ already points to an allocated
// object, throw a PropListIException. This scenario should not
// happen.
-// Programmer Binh-Minh Ribler - December, 2016
//--------------------------------------------------------------------------
LinkAccPropList *
LinkAccPropList::getConstant()
@@ -65,13 +63,11 @@ LinkAccPropList::getConstant()
// Purpose: Deletes the constant object that LinkAccPropList::DEFAULT_
// points to.
// exception H5::PropListIException
-// Programmer Binh-Minh Ribler - December, 2016
//--------------------------------------------------------------------------
void
LinkAccPropList::deleteConstants()
{
- if (DEFAULT_ != 0)
- delete DEFAULT_;
+ delete DEFAULT_;
}
//--------------------------------------------------------------------------
@@ -84,7 +80,6 @@ const LinkAccPropList &LinkAccPropList::DEFAULT = *getConstant();
//--------------------------------------------------------------------------
// Function: Default Constructor
///\brief Creates a file access property list
-// Programmer Binh-Minh Ribler - December, 2016
//--------------------------------------------------------------------------
LinkAccPropList::LinkAccPropList() : PropList(H5P_LINK_ACCESS)
{
@@ -94,7 +89,6 @@ LinkAccPropList::LinkAccPropList() : PropList(H5P_LINK_ACCESS)
// Function: LinkAccPropList copy constructor
///\brief Copy Constructor: same HDF5 object as \a original
///\param original - IN: LinkAccPropList instance to copy
-// Programmer Binh-Minh Ribler - December, 2016
//--------------------------------------------------------------------------
LinkAccPropList::LinkAccPropList(const LinkAccPropList &original) : PropList(original)
{
@@ -104,7 +98,6 @@ LinkAccPropList::LinkAccPropList(const LinkAccPropList &original) : PropList(ori
// Function: LinkAccPropList overloaded constructor
///\brief Creates a file access property list using the id of an
/// existing one.
-// Programmer Binh-Minh Ribler - December, 2016
//--------------------------------------------------------------------------
LinkAccPropList::LinkAccPropList(const hid_t plist_id) : PropList(plist_id)
{
@@ -117,7 +110,6 @@ LinkAccPropList::LinkAccPropList(const hid_t plist_id) : PropList(plist_id)
/// traversal.
///
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - March 1, 2017
//--------------------------------------------------------------------------
void
LinkAccPropList::setNumLinks(size_t nlinks) const
@@ -135,7 +127,6 @@ LinkAccPropList::setNumLinks(size_t nlinks) const
/// traversed before a failure occurs.
///
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - March 1, 2017
//--------------------------------------------------------------------------
size_t
LinkAccPropList::getNumLinks() const
@@ -149,13 +140,4 @@ LinkAccPropList::getNumLinks() const
return (nlinks);
}
-//--------------------------------------------------------------------------
-// Function: LinkAccPropList destructor
-///\brief Noop destructor
-// Programmer Binh-Minh Ribler - December, 2016
-//--------------------------------------------------------------------------
-LinkAccPropList::~LinkAccPropList()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LaccProp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LaccProp.h
index 65a96735f1d..6f4b9190f06 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LaccProp.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LaccProp.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -32,7 +31,7 @@ class H5_DLLCPP LinkAccPropList : public PropList {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("LinkAccPropList");
}
@@ -52,7 +51,7 @@ class H5_DLLCPP LinkAccPropList : public PropList {
size_t getNumLinks() const;
// Noop destructor
- virtual ~LinkAccPropList() H5_OVERRIDE;
+ virtual ~LinkAccPropList() override = default;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LcreatProp.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LcreatProp.cpp
index 29721c18090..0dbb0b275c0 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LcreatProp.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LcreatProp.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -70,8 +69,7 @@ LinkCreatPropList::getConstant()
void
LinkCreatPropList::deleteConstants()
{
- if (DEFAULT_ != 0)
- delete DEFAULT_;
+ delete DEFAULT_;
}
//--------------------------------------------------------------------------
@@ -122,7 +120,7 @@ LinkCreatPropList::LinkCreatPropList(const hid_t plist_id) : PropList(plist_id)
void
LinkCreatPropList::setCreateIntermediateGroup(bool crt_intmd_group) const
{
- herr_t ret_value = H5Pset_create_intermediate_group(id, (unsigned)crt_intmd_group);
+ herr_t ret_value = H5Pset_create_intermediate_group(id, static_cast(crt_intmd_group));
// Throw exception if H5Pset_create_intermediate_group returns failure
if (ret_value < 0) {
throw PropListIException("setCreateIntermediateGroup", "H5Pset_create_intermediate_group failed");
@@ -147,7 +145,7 @@ LinkCreatPropList::getCreateIntermediateGroup() const
throw PropListIException("getCreateIntermediateGroup", "H5Pget_create_intermediate_group failed");
}
- return ((bool)crt_intmd_group);
+ return static_cast(crt_intmd_group);
}
//--------------------------------------------------------------------------
@@ -186,13 +184,4 @@ LinkCreatPropList::getCharEncoding() const
return (encoding);
}
-//--------------------------------------------------------------------------
-// Function: LinkCreatPropList destructor
-///\brief Noop destructor
-// December, 2016
-//--------------------------------------------------------------------------
-LinkCreatPropList::~LinkCreatPropList()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LcreatProp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LcreatProp.h
index c0c66a43fcc..272f260b253 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LcreatProp.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5LcreatProp.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -32,7 +31,7 @@ class H5_DLLCPP LinkCreatPropList : public PropList {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("LinkCreatPropList");
}
@@ -59,7 +58,7 @@ class H5_DLLCPP LinkCreatPropList : public PropList {
H5T_cset_t getCharEncoding() const;
// Noop destructor
- virtual ~LinkCreatPropList() H5_OVERRIDE;
+ virtual ~LinkCreatPropList() override = default;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Library.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Library.cpp
index 37516be9f43..c16bd819268 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Library.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Library.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -11,8 +10,8 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include
#include
+#include
#include "H5CppDoc.h" // included only for Doxygen to generate part of RM
#include "H5Include.h"
@@ -42,7 +41,6 @@ namespace H5 {
///\brief Initializes the HDF5 library.
///
///\exception H5::LibraryIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
H5Library::open()
@@ -58,7 +56,6 @@ H5Library::open()
///\brief Flushes all data to disk, closes files, and cleans up memory.
///
///\exception H5::LibraryIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
H5Library::close()
@@ -74,7 +71,6 @@ H5Library::close()
///\brief Instructs library not to install the C \c atexit cleanup routine
///
///\exception H5::LibraryIException
-// Programmer Binh-Minh Ribler - 2000
// Modification
// Removed the check for failure returned from H5dont_atexit.
// will be fixed to not fail (HDFFV-9540)
@@ -92,7 +88,6 @@ H5Library::dontAtExit()
///\param minnum - OUT: Minor version of the library
///\param relnum - OUT: Release number of the library
///\exception H5::LibraryIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
H5Library::getLibVersion(unsigned &majnum, unsigned &minnum, unsigned &relnum)
@@ -114,7 +109,6 @@ H5Library::getLibVersion(unsigned &majnum, unsigned &minnum, unsigned &relnum)
///\par Description
/// For information about library version, please refer to
/// the H5check_version API in the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
H5Library::checkVersion(unsigned majnum, unsigned minnum, unsigned relnum)
@@ -143,7 +137,6 @@ H5Library::checkVersion(unsigned majnum, unsigned minnum, unsigned relnum)
///\par
/// The library automatically garbage collects all the free
/// lists when the application ends.
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void
H5Library::garbageCollect()
@@ -167,7 +160,6 @@ H5Library::garbageCollect()
// for global constants
///\exception H5::LibraryIException
//
-// Programmer Binh-Minh Ribler - September, 2015
//--------------------------------------------------------------------------
void
H5Library::initH5cpp()
@@ -237,7 +229,6 @@ H5Library::initH5cpp()
///\brief Sends request for the C layer to terminate.
///\par Description
/// If the C library fails to terminate, exit with a failure.
-// Programmer Binh-Minh Ribler - September, 2015
//--------------------------------------------------------------------------
void
H5Library::termH5cpp()
@@ -262,7 +253,6 @@ H5Library::termH5cpp()
/// Setting a value of -1 for a limit means no limit of that type.
/// For more information on free list limits, please refer to
/// the H5set_free_list_limits API in the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void
H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim, int arr_global_lim, int arr_list_lim,
@@ -279,20 +269,10 @@ H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim, int arr_globa
//--------------------------------------------------------------------------
// Function: H5Library default constructor - private
///\brief Default constructor: Creates a stub H5Library object
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5Library::H5Library()
{
}
-
-//--------------------------------------------------------------------------
-// Function: H5Library destructor
-///\brief Noop destructor
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-H5Library::~H5Library()
-{
-}
#endif // DOXYGEN_SHOULD_SKIP_THIS
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Library.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Library.h
index 3df8d56d9b3..10e5536bc14 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Library.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Library.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -63,7 +62,7 @@ class H5_DLLCPP H5Library {
H5Library();
// Destructor
- ~H5Library();
+ ~H5Library() = default;
#endif // DOXYGEN_SHOULD_SKIP_THIS
}; // end of H5Library
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Location.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Location.cpp
index 065de0c09bc..87eac679238 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Location.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Location.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -11,11 +10,10 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include
#include
+#include
using namespace std;
-#include "H5private.h" // for HDmemset
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -43,7 +41,6 @@ namespace H5 {
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function: H5Location default constructor (protected)
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5Location::H5Location() : IdComponent()
{
@@ -54,7 +51,6 @@ H5Location::H5Location() : IdComponent()
// Purpose Creates an H5Location object using the id of an existing HDF5
// object.
// Parameters object_id - IN: Id of an existing HDF5 object
-// Programmer Binh-Minh Ribler - 2000
// *** Deprecation warning ***
// This constructor is no longer appropriate because the data member "id" had
@@ -70,7 +66,6 @@ H5Location::H5Location() : IdComponent()
// Purpose This noop copy constructor is removed as a result of the data
// member "id" being moved down to sub-classes. (Mar 2015)
///\param original - IN: H5Location instance to copy
-// Programmer Binh-Minh Ribler - 2000
//
// *** Deprecation warning ***
// This constructor is no longer appropriate because the data member "id" had
@@ -126,7 +121,6 @@ H5Location::nameExists(const H5std_string &name, const LinkAccPropList &lapl) co
///\param name - IN: Searched name
///\param lapl - IN: Link access property list
///\exception H5::LocationException
-// Programmer Binh-Minh Ribler - Nov, 2016
// Modification
// Renamed to nameExists() in 1.10.2 -BMR
//--------------------------------------------------------------------------
@@ -143,7 +137,6 @@ H5Location::exists(const char *name, const LinkAccPropList &lapl) const
///\param name - IN: Searched name
///\param lapl - IN: Link access property list
///\exception H5::LocationException
-// Programmer Binh-Minh Ribler - Dec, 2016
// Modification
// Renamed to nameExists() in 1.10.2 -BMR
//--------------------------------------------------------------------------
@@ -163,7 +156,6 @@ H5Location::exists(const H5std_string &name, const LinkAccPropList &lapl) const
///\exception H5::LocationException
///\par Description
/// This location is used to identify the file to be flushed.
-// Programmer Binh-Minh Ribler - 2012
// Modification
// Sep 2012 - BMR
// Moved from H5File/H5Object
@@ -183,7 +175,6 @@ H5Location::flush(H5F_scope_t scope) const
/// location belongs.
///\return File name
///\exception H5::LocationException
-// Programmer Binh-Minh Ribler - Jul, 2004
//--------------------------------------------------------------------------
H5std_string
H5Location::getFileName() const
@@ -209,7 +200,6 @@ H5Location::getFileName() const
/// strings. They can be attached to any object that has an
/// object header, e.g., data sets, groups, named data types,
/// and data spaces, but not symbolic links.
-// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013)
// Modification
// 2007: QAK modified to use H5O APIs; however the first parameter is
// no longer just file or group, this function should be moved
@@ -229,7 +219,6 @@ H5Location::setComment(const char *name, const char *comment) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name and \a comment.
-// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013)
//--------------------------------------------------------------------------
void
H5Location::setComment(const H5std_string &name, const H5std_string &comment) const
@@ -242,7 +231,6 @@ H5Location::setComment(const H5std_string &name, const H5std_string &comment) co
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it doesn't take
/// an object name.
-// Programmer Binh-Minh Ribler - Sep 2013
//--------------------------------------------------------------------------
void
H5Location::setComment(const char *comment) const
@@ -257,7 +245,6 @@ H5Location::setComment(const char *comment) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a comment.
-// Programmer Binh-Minh Ribler - Sep 2013
//--------------------------------------------------------------------------
void
H5Location::setComment(const H5std_string &comment) const
@@ -270,7 +257,6 @@ H5Location::setComment(const H5std_string &comment) const
///\brief Removes the comment from an object specified by its name.
///\param name - IN: Name of the object
///\exception H5::LocationException
-// Programmer Binh-Minh Ribler - May 2005 (moved from CommonFG, Sep 2013)
// 2007: QAK modified to use H5O APIs; however the first parameter is
// no longer just file or group, this function should be moved
// to another class to accommodate attribute, dataset, and named
@@ -289,7 +275,6 @@ H5Location::removeComment(const char *name) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - May 2005 (moved from CommonFG, Sep 2013)
//--------------------------------------------------------------------------
void
H5Location::removeComment(const H5std_string &name) const
@@ -310,7 +295,6 @@ H5Location::removeComment(const H5std_string &name) const
/// including the null terminator. Thus, if the actual length
/// of the comment is more than buf_size-1, the retrieved comment
/// will be truncated to accommodate the null terminator.
-// Programmer Binh-Minh Ribler - Mar 2014
//--------------------------------------------------------------------------
ssize_t
H5Location::getComment(const char *name, size_t buf_size, char *comment) const
@@ -341,7 +325,6 @@ H5Location::getComment(const char *name, size_t buf_size, char *comment) const
///\param buf_size - IN: Length of the comment to retrieve, default to 0
///\return Comment string
///\exception H5::LocationException
-// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013)
//--------------------------------------------------------------------------
H5std_string
H5Location::getComment(const char *name, size_t buf_size) const
@@ -351,7 +334,7 @@ H5Location::getComment(const char *name, size_t buf_size) const
H5std_string comment;
// Preliminary call to get the comment's length
- ssize_t comment_len = H5Oget_comment_by_name(getId(), name, NULL, (size_t)0, H5P_DEFAULT);
+ ssize_t comment_len = H5Oget_comment_by_name(getId(), name, NULL, 0, H5P_DEFAULT);
// If H5Oget_comment_by_name returns a negative value, raise an exception
if (comment_len < 0) {
@@ -364,11 +347,10 @@ H5Location::getComment(const char *name, size_t buf_size) const
// If buffer size is not provided, use comment length
if (tmp_len == 0)
- tmp_len = comment_len;
+ tmp_len = static_cast(comment_len);
// Temporary buffer for char* comment
- char *comment_C = new char[tmp_len + 1];
- HDmemset(comment_C, 0, tmp_len + 1); // clear buffer
+ char *comment_C = new char[tmp_len + 1]();
// Used overloaded function
ssize_t temp_len = getComment(name, tmp_len + 1, comment_C);
@@ -393,7 +375,6 @@ H5Location::getComment(const char *name, size_t buf_size) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000 (moved from CommonFG, Sep 2013)
//--------------------------------------------------------------------------
H5std_string
H5Location::getComment(const H5std_string &name, size_t buf_size) const
@@ -411,7 +392,6 @@ H5Location::getComment(const H5std_string &name, size_t buf_size) const
// dataspace - IN: Dataspace with selection
// ref_type - IN: Type of reference; default to \c H5R_DATASET_REGION
// Exception H5::ReferenceException
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void
H5Location::p_reference(void *ref, const char *name, hid_t space_id, H5R_type_t ref_type) const
@@ -436,7 +416,6 @@ H5Location::p_reference(void *ref, const char *name, hid_t space_id, H5R_type_t
/// reference. (default)
///\exception H5::ReferenceException
///\note This method is more suitable for a dataset region reference.
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void
H5Location::reference(void *ref, const char *name, const DataSpace &dataspace, H5R_type_t ref_type) const
@@ -463,7 +442,6 @@ H5Location::reference(void *ref, const char *name, const DataSpace &dataspace, H
/// reference. (default)
///\exception H5::ReferenceException
///\note This method is more suitable for a dataset region reference.
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void
H5Location::reference(void *ref, const H5std_string &name, const DataSpace &dataspace,
@@ -489,7 +467,6 @@ H5Location::reference(void *ref, const H5std_string &name, const DataSpace &data
/// \li \c H5R_DATASET_REGION - Reference is a dataset region
///\exception H5::ReferenceException
///\note This method is more suitable for an object reference.
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void
H5Location::reference(void *ref, const char *name, H5R_type_t ref_type) const
@@ -513,7 +490,6 @@ H5Location::reference(void *ref, const char *name, H5R_type_t ref_type) const
/// \li \c H5R_OBJECT - Reference is an object reference (default)
/// \li \c H5R_DATASET_REGION - Reference is a dataset region
///\note This method is more suitable for an object reference.
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
void
H5Location::reference(void *ref, const H5std_string &name, H5R_type_t ref_type) const
@@ -533,7 +509,6 @@ H5Location::reference(void *ref, const H5std_string &name, H5R_type_t ref_type)
// plist - IN: Property list - default to PropList::DEFAULT
// from_func - IN: Name of the calling function
// Exception H5::ReferenceException
-// Programmer Binh-Minh Ribler - Oct, 2006
//--------------------------------------------------------------------------
hid_t
H5Location::p_dereference(hid_t loc_id, const void *ref, H5R_type_t ref_type, const PropList &plist,
@@ -562,7 +537,6 @@ H5Location::p_dereference(hid_t loc_id, const void *ref, H5R_type_t ref_type, co
///\param ref_type - IN: Reference type
///\param plist - IN: Property list - default to PropList::DEFAULT
///\exception H5::ReferenceException
-// Programmer Binh-Minh Ribler - Oct, 2006
//--------------------------------------------------------------------------
void
H5Location::dereference(const H5Location &loc, const void *ref, H5R_type_t ref_type, const PropList &plist)
@@ -578,7 +552,6 @@ H5Location::dereference(const H5Location &loc, const void *ref, H5R_type_t ref_t
// param ref_type - IN: Reference type
// param plist - IN: Property list - default to PropList::DEFAULT
// exception H5::ReferenceException
-// Programmer Binh-Minh Ribler - Oct, 2006
// Modification
// Mar, 2017
// Removed in 1.10.1 because H5Location is Attribute's baseclass
@@ -607,7 +580,6 @@ plist)
/// \li \c H5G_LINK - Object is a symbolic link.
/// \li \c H5G_UDLINK - Object is a user-defined link.
///\exception H5::ReferenceException
-// Programmer Binh-Minh Ribler - May, 2004
// Modification
// Sep 2012: Moved up from H5File, Group, DataSet, and DataType
//--------------------------------------------------------------------------
@@ -637,7 +609,6 @@ H5Location::getObjType(void *ref, H5R_type_t ref_type) const
// H5G_LINK \tObject is a symbolic link.
// H5G_UDLINK \tObject is a user-defined link.
// Exception H5::ReferenceException
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
H5G_obj_t
H5Location::p_get_obj_type(void *ref, H5R_type_t ref_type) const
@@ -666,7 +637,6 @@ H5Location::p_get_obj_type(void *ref, H5R_type_t ref_type) const
/// \li \c H5O_TYPE_NAMED_DATATYPE - Object is a named datatype
/// \li \c H5O_TYPE_NTYPES - Number of different object types
///\exception H5::ReferenceException
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
H5O_type_t
H5Location::getRefObjType(void *ref, H5R_type_t ref_type) const
@@ -693,7 +663,6 @@ H5Location::getRefObjType(void *ref, H5R_type_t ref_type) const
// H5O_TYPE_NAMED_DATATYPE - Object is a named datatype
// H5O_TYPE_NTYPES - Number of object types
// Exception H5::ReferenceException
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
H5O_type_t
H5Location::p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const
@@ -718,7 +687,6 @@ H5Location::p_get_ref_obj_type(void *ref, H5R_type_t ref_type) const
// to H5R_DATASET_REGION
///\return DataSpace object
///\exception H5::ReferenceException
-// Programmer Binh-Minh Ribler - May, 2004
// Modification
// Mar 29, 2015
// Used friend function to set id for DataSpace instead of the
@@ -788,7 +756,6 @@ H5Location::getRegion(void *ref, H5R_type_t ref_type) const
/// reserve for storing the names that will appear in this new
/// group. If a non-positive value is provided for the \a size_hint
/// then a default size is chosen.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group
H5Location::createGroup(const char *name, const LinkCreatPropList &lcpl) const
@@ -813,7 +780,6 @@ H5Location::createGroup(const char *name, const LinkCreatPropList &lcpl) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group
H5Location::createGroup(const H5std_string &name, const LinkCreatPropList &lcpl) const
@@ -835,7 +801,6 @@ H5Location::createGroup(const H5std_string &name, const LinkCreatPropList &lcpl)
/// reserve for storing the names that will appear in this new
/// group. If a non-positive value is provided for the \a size_hint
/// then a default size is chosen.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group
H5Location::createGroup(const char *name, size_t size_hint) const
@@ -879,7 +844,6 @@ H5Location::createGroup(const char *name, size_t size_hint) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group
H5Location::createGroup(const H5std_string &name, size_t size_hint) const
@@ -894,7 +858,6 @@ H5Location::createGroup(const H5std_string &name, size_t size_hint) const
///\param name - IN: Name of the group to open
///\return Group instance
///\exception H5::FileIException/H5::GroupIException/H5::LocationException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group
H5Location::openGroup(const char *name) const
@@ -920,7 +883,6 @@ H5Location::openGroup(const char *name) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Group
H5Location::openGroup(const H5std_string &name) const
@@ -1187,7 +1149,6 @@ H5Location::link(const H5std_string &curr_name, const hid_t same_loc, const H5st
/// For information on creating hard link and soft link, please
/// refer to the H5Lcreate_hard and H5Lcreate_soft APIs in the
/// HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
// Modification
// 2007: QAK modified to use H5L APIs - BMR
// Mar 2018: Inadequate functionality, new hard link is only in
@@ -1225,7 +1186,6 @@ H5Location::link(H5L_type_t link_type, const char *curr_name, const char *new_na
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a curr_name and \a new_name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
H5Location::link(H5L_type_t link_type, const H5std_string &curr_name, const H5std_string &new_name) const
@@ -1735,7 +1695,6 @@ H5Location::getObjinfo(const char *name, hbool_t follow_link, H5G_stat_t &statbu
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
H5Location::getObjinfo(const H5std_string &name, hbool_t follow_link, H5G_stat_t &statbuf) const
@@ -1747,7 +1706,7 @@ H5Location::getObjinfo(const H5std_string &name, hbool_t follow_link, H5G_stat_t
// Function: H5Location::getObjinfo
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above functions in that it doesn't have
-/// the paramemter \a follow_link.
+/// the parameter \a follow_link.
// Nov, 2005
//--------------------------------------------------------------------------
void
@@ -1763,7 +1722,6 @@ H5Location::getObjinfo(const char *name, H5G_stat_t &statbuf) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - Nov, 2005
//--------------------------------------------------------------------------
void
H5Location::getObjinfo(const H5std_string &name, H5G_stat_t &statbuf) const
@@ -1819,7 +1777,7 @@ H5std_string
H5Location::getLinkval(const char *name, size_t size) const
{
H5L_info2_t linkinfo;
- char * value_C; // value in C string
+ char *value_C; // value in C string
size_t val_size = size;
H5std_string value;
herr_t ret_value;
@@ -1835,8 +1793,8 @@ H5Location::getLinkval(const char *name, size_t size) const
// if link has value, retrieve the value, otherwise, return null string
if (val_size > 0) {
- value_C = new char[val_size + 1]; // temporary C-string for C API
- HDmemset(value_C, 0, val_size + 1); // clear buffer
+ // Create buffer for C string
+ value_C = new char[val_size + 1]();
ret_value = H5Lget_val(getId(), name, value_C, val_size, H5P_DEFAULT);
if (ret_value < 0) {
@@ -1855,7 +1813,6 @@ H5Location::getLinkval(const char *name, size_t size) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5std_string
H5Location::getLinkval(const H5std_string &name, size_t size) const
@@ -1870,7 +1827,6 @@ H5Location::getLinkval(const H5std_string &name, size_t size) const
///\param child - IN: File to mount
///\param plist - IN: Property list to use
///\exception H5::FileIException or H5::GroupIException
-// Programmer Binh-Minh Ribler - 2014 (original 2000)
//--------------------------------------------------------------------------
void
H5Location::mount(const char *name, const H5File &child, const PropList &plist) const
@@ -1896,7 +1852,6 @@ H5Location::mount(const char *name, const H5File &child, const PropList &plist)
// Param child - IN: File to mount
// Param plist - IN: Property list to use
// Exception H5::FileIException or H5::GroupIException
-// Programmer Binh-Minh Ribler - 2000
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
@@ -1911,7 +1866,6 @@ H5Location::mount(const char *name, const H5File &child, const PropList &plist)
// Function: H5Location::mount
///\brief This is an overloaded member function, provided for convenience.
/// It takes an \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
H5Location::mount(const H5std_string &name, const H5File &child, const PropList &plist) const
@@ -1924,7 +1878,6 @@ H5Location::mount(const H5std_string &name, const H5File &child, const PropList
// Purpose This is an overloaded member function, kept for backward
// compatibility. It differs from the above function in that it
// misses const's. This wrapper will be removed in future release.
-// Programmer Binh-Minh Ribler - 2014
// Modification
// Modified to call its replacement. -BMR, 2014/04/16
// Removed from documentation. -BMR, 2016/03/07 1.8.17 and 1.10.0
@@ -1940,7 +1893,6 @@ H5Location::mount(const H5std_string &name, const H5File &child, const PropList
///\brief Unmounts the specified file.
///\param name - IN: Name of the file to unmount
///\exception H5::FileIException/H5::GroupIException/H5::LocationException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
H5Location::unmount(const char *name) const
@@ -1958,7 +1910,6 @@ H5Location::unmount(const char *name) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
H5Location::unmount(const H5std_string &name) const
@@ -1978,7 +1929,6 @@ H5Location::unmount(const H5std_string &name) const
/// or zero if all members were processed with no operator
/// returning non-zero.
///\exception H5::FileIException/H5::GroupIException/H5::LocationException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int
H5Location::iterateElems(const char *name, int *idx, H5G_iterate_t op, void *op_data)
@@ -1995,7 +1945,6 @@ H5Location::iterateElems(const char *name, int *idx, H5G_iterate_t op, void *op_
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int
H5Location::iterateElems(const H5std_string &name, int *idx, H5G_iterate_t op, void *op_data)
@@ -2009,7 +1958,6 @@ H5Location::iterateElems(const H5std_string &name, int *idx, H5G_iterate_t op, v
///\brief Deprecated - moved to H5::Group in 1.10.2.
///\return Deprecated
///\exception Deprecated
-// Programmer Binh-Minh Ribler - January, 2003
//--------------------------------------------------------------------------
hsize_t
H5Location::getNumObjs() const
@@ -2035,7 +1983,6 @@ H5Location::getNumObjs() const
/// the function \c H5Location::getNumObjs. Note that this is a
/// transient index; thus, an object may have a different index
/// each time the group is opened.
-// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
H5std_string
H5Location::getObjnameByIdx(hsize_t idx) const
@@ -2046,12 +1993,15 @@ H5Location::getObjnameByIdx(hsize_t idx) const
if (name_len < 0)
throwException("getObjnameByIdx", "H5Lget_name_by_idx failed");
- // now, allocate C buffer to get the name
- char *name_C = new char[name_len + 1];
- HDmemset(name_C, 0, name_len + 1); // clear buffer
+ // The actual size is the cast value + 1 for the terminal ASCII NUL
+ // (unfortunate in/out type sign mismatch)
+ size_t actual_name_len = static_cast(name_len) + 1;
- name_len =
- H5Lget_name_by_idx(getId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name_C, name_len + 1, H5P_DEFAULT);
+ // Create buffer for C string
+ char *name_C = new char[actual_name_len]();
+
+ name_len = H5Lget_name_by_idx(getId(), ".", H5_INDEX_NAME, H5_ITER_INC, idx, name_C, actual_name_len,
+ H5P_DEFAULT);
if (name_len < 0) {
delete[] name_C;
@@ -2079,7 +2029,6 @@ H5Location::getObjnameByIdx(hsize_t idx) const
/// the function \c H5Location::getNumObjs. Note that this is a
/// transient index; thus, an object may have a different index
/// each time the group is opened.
-// Programmer Binh-Minh Ribler - January, 2003
//--------------------------------------------------------------------------
ssize_t
H5Location::getObjnameByIdx(hsize_t idx, char *name, size_t size) const
@@ -2097,13 +2046,12 @@ H5Location::getObjnameByIdx(hsize_t idx, char *name, size_t size) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes an
/// \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - January, 2003
//--------------------------------------------------------------------------
ssize_t
H5Location::getObjnameByIdx(hsize_t idx, H5std_string &name, size_t size) const
{
- char *name_C = new char[size + 1]; // temporary C-string for object name
- HDmemset(name_C, 0, size + 1); // clear buffer
+ // Create buffer for C string
+ char *name_C = new char[size + 1]();
// call overloaded function to get the name
ssize_t name_len = getObjnameByIdx(idx, name_C, size + 1);
@@ -2134,7 +2082,6 @@ H5Location::getObjnameByIdx(hsize_t idx, H5std_string &name, size_t size) const
/// Exception will be thrown when:
/// - an error returned by the C API
/// - object type is not one of the valid values above
-// Programmer Binh-Minh Ribler - April, 2014
//--------------------------------------------------------------------------
H5O_type_t
H5Location::childObjType(const char *objname) const
@@ -2173,7 +2120,6 @@ H5Location::childObjType(const char *objname) const
/// object's name.
///\param objname - IN: Name of the object (H5std_string&)
///\exception H5::FileIException/H5::GroupIException/H5::LocationException
-// Programmer Binh-Minh Ribler - April, 2014
//--------------------------------------------------------------------------
H5O_type_t
H5Location::childObjType(const H5std_string &objname) const
@@ -2210,7 +2156,6 @@ H5Location::childObjType(const H5std_string &objname) const
// fully specified
// - Leave property list out for now because C API is not using it, it
// can be added later when needed.
-// Programmer Binh-Minh Ribler - April, 2014
//--------------------------------------------------------------------------
H5O_type_t
H5Location::childObjType(hsize_t index, H5_index_t index_type, H5_iter_order_t order,
@@ -2256,7 +2201,6 @@ H5Location::childObjType(hsize_t index, H5_index_t index_type, H5_iter_order_t o
/// Exception will be thrown when:
/// - an error returned by the C API
/// - version number is not one of the valid values above
-// Programmer Binh-Minh Ribler - April, 2014
//--------------------------------------------------------------------------
unsigned
H5Location::childObjVersion(const char *objname) const
@@ -2288,7 +2232,6 @@ H5Location::childObjVersion(const char *objname) const
/// object's name.
///\param objname - IN: Name of the object (H5std_string&)
///\exception H5::FileIException/H5::GroupIException/H5::LocationException
-// Programmer Binh-Minh Ribler - April, 2014
//--------------------------------------------------------------------------
unsigned
H5Location::childObjVersion(const H5std_string &objname) const
@@ -2306,7 +2249,6 @@ H5Location::childObjVersion(const H5std_string &objname) const
///\param idx - IN: Transient index of the object
///\return Object type
///\exception H5::FileIException/H5::GroupIException/H5::LocationException
-// Programmer Binh-Minh Ribler - January, 2003
//--------------------------------------------------------------------------
H5G_obj_t
H5Location::getObjTypeByIdx(hsize_t idx) const
@@ -2327,7 +2269,6 @@ H5Location::getObjTypeByIdx(hsize_t idx) const
///\param type_name - OUT: Object type in text
///\return Object type
///\exception H5::FileIException/H5::GroupIException/H5::LocationException
-// Programmer Binh-Minh Ribler - May, 2010
// Modification
// Modified to use the other function. -BMR, 2016/03/07
//--------------------------------------------------------------------------
@@ -2346,7 +2287,6 @@ H5Location::getObjTypeByIdx(hsize_t idx, char *type_name) const
///\param type_name - OUT: Object type in text
///\return Object type
///\exception H5::FileIException/H5::GroupIException/H5::LocationException
-// Programmer Binh-Minh Ribler - January, 2003
//--------------------------------------------------------------------------
H5G_obj_t
H5Location::getObjTypeByIdx(hsize_t idx, H5std_string &type_name) const
@@ -2384,7 +2324,6 @@ H5Location::getObjTypeByIdx(hsize_t idx, H5std_string &type_name) const
///\param func_name - Name of the function where failure occurs
///\param msg - Message describing the failure
///\exception H5::GroupIException
-// Programmer Binh-Minh Ribler - 2000
// Modification
// August 2017 - BMR
// Keep H5Location::throwException and H5File::throwException to
@@ -2421,7 +2360,6 @@ H5Location::throwException(const H5std_string &func_name, const H5std_string &ms
// Applications shouldn't need to use it.
// param dspace - IN/OUT: DataSpace object to be changed
// param new_id - IN: New id to set
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
void
f_DataSpace_setId(DataSpace *dspace, hid_t new_id)
@@ -2429,13 +2367,4 @@ f_DataSpace_setId(DataSpace *dspace, hid_t new_id)
dspace->p_setId(new_id);
}
-//--------------------------------------------------------------------------
-// Function: H5Location destructor
-///\brief Noop destructor.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-H5Location::~H5Location()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Location.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Location.h
index 2a5015939d6..f10a00531f0 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Location.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Location.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -15,7 +14,7 @@
#ifndef H5Location_H
#define H5Location_H
-#include "H5Classes.h" // constains forward class declarations
+#include "H5Classes.h" // contains forward class declarations
namespace H5 {
@@ -108,11 +107,11 @@ class H5_DLLCPP H5Location : public IdComponent {
// Creates a new dataset in this location.
DataSet createDataSet(const char *name, const DataType &data_type, const DataSpace &data_space,
const DSetCreatPropList &create_plist = DSetCreatPropList::DEFAULT,
- const DSetAccPropList & dapl = DSetAccPropList::DEFAULT,
+ const DSetAccPropList &dapl = DSetAccPropList::DEFAULT,
const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT) const;
DataSet createDataSet(const H5std_string &name, const DataType &data_type, const DataSpace &data_space,
const DSetCreatPropList &create_plist = DSetCreatPropList::DEFAULT,
- const DSetAccPropList & dapl = DSetAccPropList::DEFAULT,
+ const DSetAccPropList &dapl = DSetAccPropList::DEFAULT,
const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT) const;
// Deprecated to add LinkCreatPropList and DSetAccPropList - 1.10.3
@@ -124,12 +123,12 @@ class H5_DLLCPP H5Location : public IdComponent {
// Opens an existing dataset at this location.
// DSetAccPropList is added - 1.10.3
DataSet openDataSet(const char *name, const DSetAccPropList &dapl = DSetAccPropList::DEFAULT) const;
- DataSet openDataSet(const H5std_string & name,
+ DataSet openDataSet(const H5std_string &name,
const DSetAccPropList &dapl = DSetAccPropList::DEFAULT) const;
- H5L_info2_t getLinkInfo(const char * link_name,
+ H5L_info2_t getLinkInfo(const char *link_name,
const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
- H5L_info2_t getLinkInfo(const H5std_string & link_name,
+ H5L_info2_t getLinkInfo(const H5std_string &link_name,
const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
// Returns the value of a symbolic link.
@@ -216,26 +215,26 @@ class H5_DLLCPP H5Location : public IdComponent {
// Creates a soft link from link_name to target_name.
void link(const char *target_name, const char *link_name,
const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
void link(const H5std_string &target_name, const H5std_string &link_name,
const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
// Creates a hard link from new_name to curr_name.
void link(const char *curr_name, const Group &new_loc, const char *new_name,
const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
void link(const H5std_string &curr_name, const Group &new_loc, const H5std_string &new_name,
const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
// Creates a hard link from new_name to curr_name in same location.
void link(const char *curr_name, const hid_t same_loc, const char *new_name,
const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
void link(const H5std_string &curr_name, const hid_t same_loc, const H5std_string &new_name,
const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
// Creates a link of the specified type from new_name to current_name;
// both names are interpreted relative to the specified location id.
@@ -258,34 +257,34 @@ class H5_DLLCPP H5Location : public IdComponent {
// Copies a link from a group to another.
void copyLink(const char *src_name, const Group &dst, const char *dst_name,
const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
void copyLink(const H5std_string &src_name, const Group &dst, const H5std_string &dst_name,
const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
// Makes a copy of a link in the same group.
void copyLink(const char *src_name, const char *dst_name,
const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
void copyLink(const H5std_string &src_name, const H5std_string &dst_name,
const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
// Renames a link in this group and moves to a new location.
void moveLink(const char *src_name, const Group &dst, const char *dst_name,
const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
void moveLink(const H5std_string &src_name, const Group &dst, const H5std_string &dst_name,
const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
// Renames a link in this group.
void moveLink(const char *src_name, const char *dst_name,
const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
void moveLink(const H5std_string &src_name, const H5std_string &dst_name,
const LinkCreatPropList &lcpl = LinkCreatPropList::DEFAULT,
- const LinkAccPropList & lapl = LinkAccPropList::DEFAULT) const;
+ const LinkAccPropList &lapl = LinkAccPropList::DEFAULT) const;
// Renames an object at this location.
// Deprecated due to inadequate functionality.
@@ -334,7 +333,7 @@ class H5_DLLCPP H5Location : public IdComponent {
#endif // DOXYGEN_SHOULD_SKIP_THIS
// Noop destructor.
- virtual ~H5Location() H5_OVERRIDE;
+ virtual ~H5Location() override = default;
}; // end of H5Location
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Object.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Object.cpp
index 71109d3db1f..54114378e85 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Object.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Object.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -13,7 +12,6 @@
#include
-#include "H5private.h" // for HDmemset
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -45,9 +43,12 @@ namespace H5 {
extern "C" {
static herr_t
-userAttrOpWrpr(H5_ATTR_UNUSED hid_t loc_id, const char *attr_name, H5_ATTR_UNUSED const H5A_info_t *ainfo,
- void *op_data)
+userAttrOpWrpr(hid_t loc_id, const char *attr_name, const H5A_info_t *ainfo, void *op_data)
{
+ // Unused
+ (void)loc_id;
+ (void)ainfo;
+
H5std_string s_attr_name = H5std_string(attr_name);
UserData4Aiterate *myData = reinterpret_cast(op_data);
myData->op(*myData->location, s_attr_name, myData->opData);
@@ -57,9 +58,11 @@ userAttrOpWrpr(H5_ATTR_UNUSED hid_t loc_id, const char *attr_name, H5_ATTR_UNUSE
// userVisitOpWrpr interfaces between the user's function and the
// C library function H5Ovisit3
static herr_t
-userVisitOpWrpr(H5_ATTR_UNUSED hid_t obj_id, const char *attr_name, const H5O_info2_t *obj_info,
- void *op_data)
+userVisitOpWrpr(hid_t obj_id, const char *attr_name, const H5O_info2_t *obj_info, void *op_data)
{
+ // Unused
+ (void)obj_id;
+
H5std_string s_attr_name = H5std_string(attr_name);
UserData4Visit *myData = reinterpret_cast(op_data);
int status = myData->op(*myData->obj, s_attr_name, obj_info, myData->opData);
@@ -70,7 +73,6 @@ userVisitOpWrpr(H5_ATTR_UNUSED hid_t obj_id, const char *attr_name, const H5O_in
//--------------------------------------------------------------------------
// Function: H5Object default constructor (protected)
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5Object::H5Object() : H5Location()
{
@@ -84,7 +86,6 @@ H5Object::H5Object() : H5Location()
// Applications shouldn't need to use it.
// param attr - IN/OUT: Attribute object to be changed
// param new_id - IN: New id to set
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
void
f_Attribute_setId(Attribute *attr, hid_t new_id)
@@ -112,7 +113,6 @@ f_Attribute_setId(Attribute *attr, hid_t new_id)
/// attribute with a new attribute of the same name, first
/// delete the existing one with \c H5Object::removeAttr, then
/// recreate it with this function.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute
H5Object::createAttribute(const char *name, const DataType &data_type, const DataSpace &data_space,
@@ -138,7 +138,6 @@ H5Object::createAttribute(const char *name, const DataType &data_type, const Dat
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute
H5Object::createAttribute(const H5std_string &name, const DataType &data_type, const DataSpace &data_space,
@@ -153,7 +152,6 @@ H5Object::createAttribute(const H5std_string &name, const DataType &data_type, c
///\param name - IN: Name of the attribute
///\return Attribute instance
///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute
H5Object::openAttribute(const char *name) const
@@ -174,7 +172,6 @@ H5Object::openAttribute(const char *name) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute
H5Object::openAttribute(const H5std_string &name) const
@@ -188,7 +185,6 @@ H5Object::openAttribute(const H5std_string &name) const
///\param idx - IN: Index of the attribute, a 0-based, non-negative integer
///\return Attribute instance
///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
Attribute
H5Object::openAttribute(const unsigned int idx) const
@@ -218,7 +214,6 @@ H5Object::openAttribute(const unsigned int idx) const
///\par Description
/// The signature of user_op is
/// void (*)(H5::H5Location&, H5std_string, void*).
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int
H5Object::iterateAttrs(attr_operator_t user_op, unsigned *_idx, void *op_data)
@@ -278,7 +273,6 @@ H5Object::iterateAttrs(attr_operator_t user_op, unsigned *_idx, void *op_data)
///\par Description
/// For information, please refer to the H5Ovisit3 API in the HDF5
/// C Reference Manual.
-// Programmer Binh-Minh Ribler - Feb, 2019
//--------------------------------------------------------------------------
void
H5Object::visit(H5_index_t idx_type, H5_iter_order_t order, visit_operator_t user_op, void *op_data,
@@ -313,7 +307,6 @@ H5Object::visit(H5_index_t idx_type, H5_iter_order_t order, visit_operator_t use
/// Exception will be thrown when:
/// - an error returned by the C API
/// - version number is not one of the valid values above
-// Programmer Binh-Minh Ribler - December, 2016
//--------------------------------------------------------------------------
unsigned
H5Object::objVersion() const
@@ -341,7 +334,6 @@ H5Object::objVersion() const
///\brief Returns the number of attributes attached to this HDF5 object.
///\return Number of attributes
///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
int
H5Object::getNumAttrs() const
@@ -359,7 +351,6 @@ H5Object::getNumAttrs() const
///\brief Checks whether the named attribute exists at this location.
///\param name - IN: Name of the attribute to be queried
///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - 2013
//--------------------------------------------------------------------------
bool
H5Object::attrExists(const char *name) const
@@ -381,7 +372,6 @@ H5Object::attrExists(const char *name) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
bool
H5Object::attrExists(const H5std_string &name) const
@@ -394,7 +384,6 @@ H5Object::attrExists(const H5std_string &name) const
///\brief Removes the named attribute from this object.
///\param name - IN: Name of the attribute to be removed
///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
H5Object::removeAttr(const char *name) const
@@ -409,7 +398,6 @@ H5Object::removeAttr(const char *name) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for \a name.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
H5Object::removeAttr(const H5std_string &name) const
@@ -423,7 +411,6 @@ H5Object::removeAttr(const H5std_string &name) const
///\param oldname - IN: Name of the attribute to be renamed
///\param newname - IN: New name ame of the attribute
///\exception H5::AttributeIException
-// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
void
H5Object::renameAttr(const char *oldname, const char *newname) const
@@ -438,7 +425,6 @@ H5Object::renameAttr(const char *oldname, const char *newname) const
///\brief This is an overloaded member function, provided for convenience.
/// It differs from the above function in that it takes
/// a reference to an \c H5std_string for the names.
-// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
void
H5Object::renameAttr(const H5std_string &oldname, const H5std_string &newname) const
@@ -450,7 +436,6 @@ H5Object::renameAttr(const H5std_string &oldname, const H5std_string &newname) c
// Function: getObjName
///\brief Given an id, returns the type of the object.
///\return The name of the object
-// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
ssize_t
H5Object::getObjName(char *obj_name, size_t buf_size) const
@@ -474,7 +459,6 @@ H5Object::getObjName(char *obj_name, size_t buf_size) const
///\brief Returns the name of this object as an \a H5std_string.
///\return Name of the object
///\exception H5::Exception
-// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
H5std_string
H5Object::getObjName() const
@@ -482,7 +466,7 @@ H5Object::getObjName() const
H5std_string obj_name; // object name to return
// Preliminary call to get the size of the object name
- ssize_t name_size = H5Iget_name(getId(), NULL, static_cast(0));
+ ssize_t name_size = H5Iget_name(getId(), NULL, 0);
// If H5Iget_name failed, throw exception
if (name_size < 0) {
@@ -493,11 +477,16 @@ H5Object::getObjName() const
}
// Object's name exists, retrieve it
else if (name_size > 0) {
- char *name_C = new char[name_size + 1]; // temporary C-string
- HDmemset(name_C, 0, name_size + 1); // clear buffer
+
+ // The actual size is the cast value + 1 for the terminal ASCII NUL
+ // (unfortunate in/out type sign mismatch)
+ size_t actual_name_size = static_cast(name_size) + 1;
+
+ // Create buffer for C string
+ char *name_C = new char[actual_name_size]();
// Use overloaded function
- name_size = getObjName(name_C, name_size + 1);
+ name_size = getObjName(name_C, actual_name_size);
// Convert the C object name to return
obj_name = name_C;
@@ -505,8 +494,9 @@ H5Object::getObjName() const
// Clean up resource
delete[] name_C;
}
+
// Return object's name
- return (obj_name);
+ return obj_name;
}
//--------------------------------------------------------------------------
@@ -520,7 +510,6 @@ H5Object::getObjName() const
/// This function retrieves the object's name as an std string.
/// buf_size can specify a specific length or default to 0, in
/// which case the entire name will be retrieved.
-// Programmer Binh-Minh Ribler - Mar, 2014
//--------------------------------------------------------------------------
ssize_t
H5Object::getObjName(H5std_string &obj_name, size_t len) const
@@ -530,12 +519,12 @@ H5Object::getObjName(H5std_string &obj_name, size_t len) const
// If no length is provided, get the entire object name
if (len == 0) {
obj_name = getObjName();
- name_size = obj_name.length();
+ name_size = static_cast(obj_name.length());
}
// If length is provided, get that number of characters in name
else {
- char *name_C = new char[len + 1]; // temporary C-string
- HDmemset(name_C, 0, len + 1); // clear buffer
+ // Create buffer for C string
+ char *name_C = new char[len + 1]();
// Use overloaded function
name_size = getObjName(name_C, len + 1);
@@ -549,18 +538,7 @@ H5Object::getObjName(H5std_string &obj_name, size_t len) const
// Otherwise, keep obj_name intact
// Return name size
- return (name_size);
-}
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-//--------------------------------------------------------------------------
-// Function: H5Object destructor
-///\brief Noop destructor.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-H5Object::~H5Object()
-{
+ return name_size;
}
-#endif // DOXYGEN_SHOULD_SKIP_THIS
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Object.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Object.h
index bc2f14a1860..b2905842ad7 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Object.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5Object.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -50,16 +49,16 @@ typedef int (*visit_operator_t)(H5Object &obj, const H5std_string attr_name, con
class UserData4Aiterate {
public:
attr_operator_t op;
- void * opData;
- H5Object * location; // Consider changing to H5Location
+ void *opData;
+ H5Object *location; // Consider changing to H5Location
};
// User data for visit iteration
class UserData4Visit {
public:
visit_operator_t op;
- void * opData;
- H5Object * obj;
+ void *opData;
+ H5Object *obj;
};
class H5_DLLCPP H5Object : public H5Location {
@@ -106,7 +105,7 @@ class H5_DLLCPP H5Object : public H5Location {
void removeAttr(const H5std_string &name) const;
// Returns an identifier.
- virtual hid_t getId() const H5_OVERRIDE = 0;
+ virtual hid_t getId() const override = 0;
// Gets the name of this HDF5 object, i.e., Group, DataSet, or
// DataType.
@@ -122,10 +121,10 @@ class H5_DLLCPP H5Object : public H5Location {
// Sets the identifier of this object to a new value. - this one
// doesn't increment reference count
- virtual void p_setId(const hid_t new_id) H5_OVERRIDE = 0;
+ virtual void p_setId(const hid_t new_id) override = 0;
// Noop destructor.
- virtual ~H5Object() H5_OVERRIDE;
+ virtual ~H5Object() override = default;
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5OcreatProp.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5OcreatProp.cpp
index 81dae313ada..0f1da1c5a8d 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5OcreatProp.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5OcreatProp.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -38,7 +37,6 @@ ObjCreatPropList *ObjCreatPropList::DEFAULT_ = 0;
// If ObjCreatPropList::DEFAULT_ already points to an allocated
// object, throw a PropListIException. This scenario should not
// happen.
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
ObjCreatPropList *
ObjCreatPropList::getConstant()
@@ -65,13 +63,11 @@ ObjCreatPropList::getConstant()
// Purpose: Deletes the constant object that ObjCreatPropList::DEFAULT_
// points to.
// exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
void
ObjCreatPropList::deleteConstants()
{
- if (DEFAULT_ != 0)
- delete DEFAULT_;
+ delete DEFAULT_;
}
//--------------------------------------------------------------------------
@@ -84,7 +80,6 @@ const ObjCreatPropList &ObjCreatPropList::DEFAULT = *getConstant();
//--------------------------------------------------------------------------
// Function: Default Constructor
///\brief Creates a file access property list
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
ObjCreatPropList::ObjCreatPropList() : PropList(H5P_OBJECT_CREATE)
{
@@ -94,7 +89,6 @@ ObjCreatPropList::ObjCreatPropList() : PropList(H5P_OBJECT_CREATE)
// Function: ObjCreatPropList copy constructor
///\brief Copy constructor: same HDF5 object as \a original
///\param original - IN: ObjCreatPropList instance to copy
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
ObjCreatPropList::ObjCreatPropList(const ObjCreatPropList &original) : PropList(original)
{
@@ -104,7 +98,6 @@ ObjCreatPropList::ObjCreatPropList(const ObjCreatPropList &original) : PropList(
// Function: ObjCreatPropList overloaded constructor
///\brief Creates a file access property list using the id of an
/// existing one.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
ObjCreatPropList::ObjCreatPropList(const hid_t plist_id) : PropList(plist_id)
{
@@ -122,7 +115,6 @@ ObjCreatPropList::ObjCreatPropList(const hid_t plist_id) : PropList(plist_id)
/// If \c max_compact is set to 0, dense storage will be used.
/// For more detail about on attribute storage, please refer to the
/// H5Pset_attr_phase_change API in the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
void
ObjCreatPropList::setAttrPhaseChange(unsigned max_compact, unsigned min_dense) const
@@ -145,7 +137,6 @@ ObjCreatPropList::setAttrPhaseChange(unsigned max_compact, unsigned min_dense) c
/// If \c max_compact is set to 0, dense storage will be used.
/// For more detail about on attribute storage, please refer to the
/// H5Pget_attr_phase_change API in the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
void
ObjCreatPropList::getAttrPhaseChange(unsigned &max_compact, unsigned &min_dense) const
@@ -174,7 +165,6 @@ ObjCreatPropList::getAttrPhaseChange(unsigned &max_compact, unsigned &min_dense)
/// creation time and to build the index later.
/// For detail, please refer to the H5Pset_attr_creation_order API
/// in the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
void
ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags) const
@@ -196,7 +186,6 @@ ObjCreatPropList::setAttrCrtOrder(unsigned crt_order_flags) const
/// creation order is neither tracked not indexed.
/// For detail, please refer to the H5Pget_attr_creation_order API
/// in the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
unsigned
ObjCreatPropList::getAttrCrtOrder() const
@@ -210,13 +199,4 @@ ObjCreatPropList::getAttrCrtOrder() const
return (crt_order_flags);
}
-//--------------------------------------------------------------------------
-// Function: ObjCreatPropList destructor
-///\brief Noop destructor
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-ObjCreatPropList::~ObjCreatPropList()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5OcreatProp.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5OcreatProp.h
index 0aa825b943a..fbe399197fe 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5OcreatProp.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5OcreatProp.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -44,7 +43,7 @@ class H5_DLLCPP ObjCreatPropList : public PropList {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("ObjCreatPropList");
}
@@ -57,7 +56,7 @@ class H5_DLLCPP ObjCreatPropList : public PropList {
ObjCreatPropList(const hid_t plist_id);
// Noop destructor
- virtual ~ObjCreatPropList() H5_OVERRIDE;
+ virtual ~ObjCreatPropList() override = default;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PredType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PredType.cpp
index 9e67968bfc6..0338a01e016 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PredType.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PredType.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -27,7 +26,6 @@
#include "H5DataType.h"
#include "H5AtomType.h"
#include "H5PredType.h"
-#include "H5private.h"
namespace H5 {
@@ -40,7 +38,6 @@ namespace H5 {
// Description
// This constructor creates a PredType object by copying
// the provided HDF5 predefined datatype.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PredType::PredType(const hid_t predtype_id) : AtomType(predtype_id)
{
@@ -50,7 +47,6 @@ PredType::PredType(const hid_t predtype_id) : AtomType(predtype_id)
//--------------------------------------------------------------------------
// Function: PredType default constructor
///\brief Default constructor: Creates a stub predefined datatype
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PredType::PredType() : AtomType()
{
@@ -61,7 +57,6 @@ PredType::PredType() : AtomType()
// Function: PredType copy constructor
///\brief Copy constructor: same HDF5 object as \a original
///\param original - IN: PredType instance to copy
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PredType::PredType(const PredType &original) : AtomType(original)
{
@@ -76,7 +71,6 @@ PredType::PredType(const PredType &original) : AtomType(original)
// Description
// Makes a copy of the type on the right hand side and stores
// the new id in the left hand side object.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PredType &
PredType::operator=(const PredType &rhs)
@@ -90,8 +84,12 @@ PredType::operator=(const PredType &rhs)
// These dummy functions do not inherit from DataType - they'll
// throw an DataTypeIException if invoked.
void
-PredType::commit(H5_ATTR_UNUSED H5Location &loc, H5_ATTR_UNUSED const char *name)
+PredType::commit(H5Location &loc, const char *name)
{
+ // Unused
+ (void)loc;
+ (void)name;
+
throw DataTypeIException("PredType::commit",
"Error: Attempted to commit a predefined datatype. Invalid operation!");
}
@@ -110,16 +108,6 @@ PredType::committed()
}
#endif // DOXYGEN_SHOULD_SKIP_THIS
-// Default destructor
-//--------------------------------------------------------------------------
-// Function: PredType destructor
-///\brief Noop destructor.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-PredType::~PredType()
-{
-}
-
/*****************************************************************************
The following section is regarding the global constants PredType,
DataSpace, and PropList.
@@ -246,63 +234,32 @@ PredType *PredType::NATIVE_INT32_;
PredType *PredType::NATIVE_UINT32_;
PredType *PredType::NATIVE_INT64_;
PredType *PredType::NATIVE_UINT64_;
+
// LEAST types
-#if H5_SIZEOF_INT_LEAST8_T != 0
PredType *PredType::NATIVE_INT_LEAST8_;
-#endif /* H5_SIZEOF_INT_LEAST8_T */
-#if H5_SIZEOF_UINT_LEAST8_T != 0
PredType *PredType::NATIVE_UINT_LEAST8_;
-#endif /* H5_SIZEOF_UINT_LEAST8_T */
-#if H5_SIZEOF_INT_LEAST16_T != 0
PredType *PredType::NATIVE_INT_LEAST16_;
-#endif /* H5_SIZEOF_INT_LEAST16_T */
-#if H5_SIZEOF_UINT_LEAST16_T != 0
PredType *PredType::NATIVE_UINT_LEAST16_;
-#endif /* H5_SIZEOF_UINT_LEAST16_T */
-#if H5_SIZEOF_INT_LEAST32_T != 0
PredType *PredType::NATIVE_INT_LEAST32_;
-#endif /* H5_SIZEOF_INT_LEAST32_T */
-#if H5_SIZEOF_UINT_LEAST32_T != 0
PredType *PredType::NATIVE_UINT_LEAST32_;
-#endif /* H5_SIZEOF_UINT_LEAST32_T */
-#if H5_SIZEOF_INT_LEAST64_T != 0
PredType *PredType::NATIVE_INT_LEAST64_;
-#endif /* H5_SIZEOF_INT_LEAST64_T */
-#if H5_SIZEOF_UINT_LEAST64_T != 0
PredType *PredType::NATIVE_UINT_LEAST64_;
-#endif /* H5_SIZEOF_UINT_LEAST64_T */
// FAST types
-#if H5_SIZEOF_INT_FAST8_T != 0
PredType *PredType::NATIVE_INT_FAST8_;
-#endif /* H5_SIZEOF_INT_FAST8_T */
-#if H5_SIZEOF_UINT_FAST8_T != 0
PredType *PredType::NATIVE_UINT_FAST8_;
-#endif /* H5_SIZEOF_UINT_FAST8_T */
-#if H5_SIZEOF_INT_FAST16_T != 0
PredType *PredType::NATIVE_INT_FAST16_;
-#endif /* H5_SIZEOF_INT_FAST16_T */
-#if H5_SIZEOF_UINT_FAST16_T != 0
PredType *PredType::NATIVE_UINT_FAST16_;
-#endif /* H5_SIZEOF_UINT_FAST16_T */
-#if H5_SIZEOF_INT_FAST32_T != 0
PredType *PredType::NATIVE_INT_FAST32_;
-#endif /* H5_SIZEOF_INT_FAST32_T */
-#if H5_SIZEOF_UINT_FAST32_T != 0
PredType *PredType::NATIVE_UINT_FAST32_;
-#endif /* H5_SIZEOF_UINT_FAST32_T */
-#if H5_SIZEOF_INT_FAST64_T != 0
PredType *PredType::NATIVE_INT_FAST64_;
-#endif /* H5_SIZEOF_INT_FAST64_T */
-#if H5_SIZEOF_UINT_FAST64_T != 0
PredType *PredType::NATIVE_UINT_FAST64_;
-#endif /* H5_SIZEOF_UINT_FAST64_T */
//--------------------------------------------------------------------------
// Function: PredType::getPredTypes
@@ -316,7 +273,6 @@ PredType *PredType::NATIVE_UINT_FAST64_;
// Note that, there is a similar function to getPredTypes() in
// other classes, that have global constants, is called getConstant().
//
-// Programmer Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
PredType *
PredType::getPredTypes()
@@ -342,7 +298,6 @@ PredType::getPredTypes()
//--------------------------------------------------------------------------
// Function: PredType::makePredTypes
// Purpose Allocate all PredType constants.
-// Programmer Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
void
PredType::makePredTypes()
@@ -434,31 +389,29 @@ PredType::makePredTypes()
MIPS_F32_ = new PredType(H5T_MIPS_F32);
MIPS_F64_ = new PredType(H5T_MIPS_F64);
- NATIVE_CHAR_ = new PredType(H5T_NATIVE_CHAR);
- NATIVE_INT_ = new PredType(H5T_NATIVE_INT);
- NATIVE_FLOAT_ = new PredType(H5T_NATIVE_FLOAT);
- NATIVE_SCHAR_ = new PredType(H5T_NATIVE_SCHAR);
- NATIVE_UCHAR_ = new PredType(H5T_NATIVE_UCHAR);
- NATIVE_SHORT_ = new PredType(H5T_NATIVE_SHORT);
- NATIVE_USHORT_ = new PredType(H5T_NATIVE_USHORT);
- NATIVE_UINT_ = new PredType(H5T_NATIVE_UINT);
- NATIVE_LONG_ = new PredType(H5T_NATIVE_LONG);
- NATIVE_ULONG_ = new PredType(H5T_NATIVE_ULONG);
- NATIVE_LLONG_ = new PredType(H5T_NATIVE_LLONG);
- NATIVE_ULLONG_ = new PredType(H5T_NATIVE_ULLONG);
- NATIVE_DOUBLE_ = new PredType(H5T_NATIVE_DOUBLE);
-#if H5_SIZEOF_LONG_DOUBLE != 0
+ NATIVE_CHAR_ = new PredType(H5T_NATIVE_CHAR);
+ NATIVE_INT_ = new PredType(H5T_NATIVE_INT);
+ NATIVE_FLOAT_ = new PredType(H5T_NATIVE_FLOAT);
+ NATIVE_SCHAR_ = new PredType(H5T_NATIVE_SCHAR);
+ NATIVE_UCHAR_ = new PredType(H5T_NATIVE_UCHAR);
+ NATIVE_SHORT_ = new PredType(H5T_NATIVE_SHORT);
+ NATIVE_USHORT_ = new PredType(H5T_NATIVE_USHORT);
+ NATIVE_UINT_ = new PredType(H5T_NATIVE_UINT);
+ NATIVE_LONG_ = new PredType(H5T_NATIVE_LONG);
+ NATIVE_ULONG_ = new PredType(H5T_NATIVE_ULONG);
+ NATIVE_LLONG_ = new PredType(H5T_NATIVE_LLONG);
+ NATIVE_ULLONG_ = new PredType(H5T_NATIVE_ULLONG);
+ NATIVE_DOUBLE_ = new PredType(H5T_NATIVE_DOUBLE);
NATIVE_LDOUBLE_ = new PredType(H5T_NATIVE_LDOUBLE);
-#endif
- NATIVE_B8_ = new PredType(H5T_NATIVE_B8);
- NATIVE_B16_ = new PredType(H5T_NATIVE_B16);
- NATIVE_B32_ = new PredType(H5T_NATIVE_B32);
- NATIVE_B64_ = new PredType(H5T_NATIVE_B64);
- NATIVE_OPAQUE_ = new PredType(H5T_NATIVE_OPAQUE);
- NATIVE_HSIZE_ = new PredType(H5T_NATIVE_HSIZE);
- NATIVE_HSSIZE_ = new PredType(H5T_NATIVE_HSSIZE);
- NATIVE_HERR_ = new PredType(H5T_NATIVE_HERR);
- NATIVE_HBOOL_ = new PredType(H5T_NATIVE_HBOOL);
+ NATIVE_B8_ = new PredType(H5T_NATIVE_B8);
+ NATIVE_B16_ = new PredType(H5T_NATIVE_B16);
+ NATIVE_B32_ = new PredType(H5T_NATIVE_B32);
+ NATIVE_B64_ = new PredType(H5T_NATIVE_B64);
+ NATIVE_OPAQUE_ = new PredType(H5T_NATIVE_OPAQUE);
+ NATIVE_HSIZE_ = new PredType(H5T_NATIVE_HSIZE);
+ NATIVE_HSSIZE_ = new PredType(H5T_NATIVE_HSSIZE);
+ NATIVE_HERR_ = new PredType(H5T_NATIVE_HERR);
+ NATIVE_HBOOL_ = new PredType(H5T_NATIVE_HBOOL);
NATIVE_INT8_ = new PredType(H5T_NATIVE_INT8);
NATIVE_UINT8_ = new PredType(H5T_NATIVE_UINT8);
@@ -469,70 +422,37 @@ PredType::makePredTypes()
NATIVE_INT64_ = new PredType(H5T_NATIVE_INT64);
NATIVE_UINT64_ = new PredType(H5T_NATIVE_UINT64);
-// LEAST types
-#if H5_SIZEOF_INT_LEAST8_T != 0
- NATIVE_INT_LEAST8_ = new PredType(H5T_NATIVE_INT_LEAST8);
-#endif /* H5_SIZEOF_INT_LEAST8_T */
-#if H5_SIZEOF_UINT_LEAST8_T != 0
+ // LEAST types
+ NATIVE_INT_LEAST8_ = new PredType(H5T_NATIVE_INT_LEAST8);
NATIVE_UINT_LEAST8_ = new PredType(H5T_NATIVE_UINT_LEAST8);
-#endif /* H5_SIZEOF_UINT_LEAST8_T */
-#if H5_SIZEOF_INT_LEAST16_T != 0
- NATIVE_INT_LEAST16_ = new PredType(H5T_NATIVE_INT_LEAST16);
-#endif /* H5_SIZEOF_INT_LEAST16_T */
-#if H5_SIZEOF_UINT_LEAST16_T != 0
+ NATIVE_INT_LEAST16_ = new PredType(H5T_NATIVE_INT_LEAST16);
NATIVE_UINT_LEAST16_ = new PredType(H5T_NATIVE_UINT_LEAST16);
-#endif /* H5_SIZEOF_UINT_LEAST16_T */
-#if H5_SIZEOF_INT_LEAST32_T != 0
- NATIVE_INT_LEAST32_ = new PredType(H5T_NATIVE_INT_LEAST32);
-#endif /* H5_SIZEOF_INT_LEAST32_T */
-#if H5_SIZEOF_UINT_LEAST32_T != 0
+ NATIVE_INT_LEAST32_ = new PredType(H5T_NATIVE_INT_LEAST32);
NATIVE_UINT_LEAST32_ = new PredType(H5T_NATIVE_UINT_LEAST32);
-#endif /* H5_SIZEOF_UINT_LEAST32_T */
-#if H5_SIZEOF_INT_LEAST64_T != 0
- NATIVE_INT_LEAST64_ = new PredType(H5T_NATIVE_INT_LEAST64);
-#endif /* H5_SIZEOF_INT_LEAST64_T */
-#if H5_SIZEOF_UINT_LEAST64_T != 0
+ NATIVE_INT_LEAST64_ = new PredType(H5T_NATIVE_INT_LEAST64);
NATIVE_UINT_LEAST64_ = new PredType(H5T_NATIVE_UINT_LEAST64);
-#endif /* H5_SIZEOF_UINT_LEAST64_T */
-// FAST types
-#if H5_SIZEOF_INT_FAST8_T != 0
- NATIVE_INT_FAST8_ = new PredType(H5T_NATIVE_INT_FAST8);
-#endif /* H5_SIZEOF_INT_FAST8_T */
-#if H5_SIZEOF_UINT_FAST8_T != 0
+ // FAST types
+ NATIVE_INT_FAST8_ = new PredType(H5T_NATIVE_INT_FAST8);
NATIVE_UINT_FAST8_ = new PredType(H5T_NATIVE_UINT_FAST8);
-#endif /* H5_SIZEOF_UINT_FAST8_T */
-#if H5_SIZEOF_INT_FAST16_T != 0
- NATIVE_INT_FAST16_ = new PredType(H5T_NATIVE_INT_FAST16);
-#endif /* H5_SIZEOF_INT_FAST16_T */
-#if H5_SIZEOF_UINT_FAST16_T != 0
+ NATIVE_INT_FAST16_ = new PredType(H5T_NATIVE_INT_FAST16);
NATIVE_UINT_FAST16_ = new PredType(H5T_NATIVE_UINT_FAST16);
-#endif /* H5_SIZEOF_UINT_FAST16_T */
-#if H5_SIZEOF_INT_FAST32_T != 0
- NATIVE_INT_FAST32_ = new PredType(H5T_NATIVE_INT_FAST32);
-#endif /* H5_SIZEOF_INT_FAST32_T */
-#if H5_SIZEOF_UINT_FAST32_T != 0
+ NATIVE_INT_FAST32_ = new PredType(H5T_NATIVE_INT_FAST32);
NATIVE_UINT_FAST32_ = new PredType(H5T_NATIVE_UINT_FAST32);
-#endif /* H5_SIZEOF_UINT_FAST32_T */
-#if H5_SIZEOF_INT_FAST64_T != 0
- NATIVE_INT_FAST64_ = new PredType(H5T_NATIVE_INT_FAST64);
-#endif /* H5_SIZEOF_INT_FAST64_T */
-#if H5_SIZEOF_UINT_FAST64_T != 0
+ NATIVE_INT_FAST64_ = new PredType(H5T_NATIVE_INT_FAST64);
NATIVE_UINT_FAST64_ = new PredType(H5T_NATIVE_UINT_FAST64);
-#endif /* H5_SIZEOF_UINT_FAST64_T */
} // makePredTypes
//--------------------------------------------------------------------------
// Function: PredType::deleteConstants
// Purpose Deletes all PredType constant pointers.
-// Programmer Binh-Minh Ribler - September 2015
//--------------------------------------------------------------------------
void
PredType::deleteConstants()
@@ -655,63 +575,31 @@ PredType::deleteConstants()
delete NATIVE_INT64_;
delete NATIVE_UINT64_;
-// LEAST types
-#if H5_SIZEOF_INT_LEAST8_T != 0
+ // LEAST types
delete NATIVE_INT_LEAST8_;
-#endif /* H5_SIZEOF_INT_LEAST8_T */
-#if H5_SIZEOF_UINT_LEAST8_T != 0
delete NATIVE_UINT_LEAST8_;
-#endif /* H5_SIZEOF_UINT_LEAST8_T */
-#if H5_SIZEOF_INT_LEAST16_T != 0
delete NATIVE_INT_LEAST16_;
-#endif /* H5_SIZEOF_INT_LEAST16_T */
-#if H5_SIZEOF_UINT_LEAST16_T != 0
delete NATIVE_UINT_LEAST16_;
-#endif /* H5_SIZEOF_UINT_LEAST16_T */
-#if H5_SIZEOF_INT_LEAST32_T != 0
delete NATIVE_INT_LEAST32_;
-#endif /* H5_SIZEOF_INT_LEAST32_T */
-#if H5_SIZEOF_UINT_LEAST32_T != 0
delete NATIVE_UINT_LEAST32_;
-#endif /* H5_SIZEOF_UINT_LEAST32_T */
-#if H5_SIZEOF_INT_LEAST64_T != 0
delete NATIVE_INT_LEAST64_;
-#endif /* H5_SIZEOF_INT_LEAST64_T */
-#if H5_SIZEOF_UINT_LEAST64_T != 0
delete NATIVE_UINT_LEAST64_;
-#endif /* H5_SIZEOF_UINT_LEAST64_T */
-// FAST types
-#if H5_SIZEOF_INT_FAST8_T != 0
+ // FAST types
delete NATIVE_INT_FAST8_;
-#endif /* H5_SIZEOF_INT_FAST8_T */
-#if H5_SIZEOF_UINT_FAST8_T != 0
delete NATIVE_UINT_FAST8_;
-#endif /* H5_SIZEOF_UINT_FAST8_T */
-#if H5_SIZEOF_INT_FAST16_T != 0
delete NATIVE_INT_FAST16_;
-#endif /* H5_SIZEOF_INT_FAST16_T */
-#if H5_SIZEOF_UINT_FAST16_T != 0
delete NATIVE_UINT_FAST16_;
-#endif /* H5_SIZEOF_UINT_FAST16_T */
-#if H5_SIZEOF_INT_FAST32_T != 0
delete NATIVE_INT_FAST32_;
-#endif /* H5_SIZEOF_INT_FAST32_T */
-#if H5_SIZEOF_UINT_FAST32_T != 0
delete NATIVE_UINT_FAST32_;
-#endif /* H5_SIZEOF_UINT_FAST32_T */
-#if H5_SIZEOF_INT_FAST64_T != 0
delete NATIVE_INT_FAST64_;
-#endif /* H5_SIZEOF_INT_FAST64_T */
-#if H5_SIZEOF_UINT_FAST64_T != 0
delete NATIVE_UINT_FAST64_;
-#endif /* H5_SIZEOF_UINT_FAST64_T */
delete PREDTYPE_CONST_;
PREDTYPE_CONST_ = 0;
@@ -845,62 +733,30 @@ const PredType &PredType::NATIVE_INT64 = *NATIVE_INT64_;
const PredType &PredType::NATIVE_UINT64 = *NATIVE_UINT64_;
// LEAST types
-#if H5_SIZEOF_INT_LEAST8_T != 0
-const PredType &PredType::NATIVE_INT_LEAST8 = *NATIVE_INT_LEAST8_;
-#endif /* H5_SIZEOF_INT_LEAST8_T */
-#if H5_SIZEOF_UINT_LEAST8_T != 0
+const PredType &PredType::NATIVE_INT_LEAST8 = *NATIVE_INT_LEAST8_;
const PredType &PredType::NATIVE_UINT_LEAST8 = *NATIVE_UINT_LEAST8_;
-#endif /* H5_SIZEOF_UINT_LEAST8_T */
-#if H5_SIZEOF_INT_LEAST16_T != 0
-const PredType &PredType::NATIVE_INT_LEAST16 = *NATIVE_INT_LEAST16_;
-#endif /* H5_SIZEOF_INT_LEAST16_T */
-#if H5_SIZEOF_UINT_LEAST16_T != 0
+const PredType &PredType::NATIVE_INT_LEAST16 = *NATIVE_INT_LEAST16_;
const PredType &PredType::NATIVE_UINT_LEAST16 = *NATIVE_UINT_LEAST16_;
-#endif /* H5_SIZEOF_UINT_LEAST16_T */
-#if H5_SIZEOF_INT_LEAST32_T != 0
-const PredType &PredType::NATIVE_INT_LEAST32 = *NATIVE_INT_LEAST32_;
-#endif /* H5_SIZEOF_INT_LEAST32_T */
-#if H5_SIZEOF_UINT_LEAST32_T != 0
+const PredType &PredType::NATIVE_INT_LEAST32 = *NATIVE_INT_LEAST32_;
const PredType &PredType::NATIVE_UINT_LEAST32 = *NATIVE_UINT_LEAST32_;
-#endif /* H5_SIZEOF_UINT_LEAST32_T */
-#if H5_SIZEOF_INT_LEAST64_T != 0
-const PredType &PredType::NATIVE_INT_LEAST64 = *NATIVE_INT_LEAST64_;
-#endif /* H5_SIZEOF_INT_LEAST64_T */
-#if H5_SIZEOF_UINT_LEAST64_T != 0
+const PredType &PredType::NATIVE_INT_LEAST64 = *NATIVE_INT_LEAST64_;
const PredType &PredType::NATIVE_UINT_LEAST64 = *NATIVE_UINT_LEAST64_;
-#endif /* H5_SIZEOF_UINT_LEAST64_T */
// FAST types
-#if H5_SIZEOF_INT_FAST8_T != 0
-const PredType &PredType::NATIVE_INT_FAST8 = *NATIVE_INT_FAST8_;
-#endif /* H5_SIZEOF_INT_FAST8_T */
-#if H5_SIZEOF_UINT_FAST8_T != 0
+const PredType &PredType::NATIVE_INT_FAST8 = *NATIVE_INT_FAST8_;
const PredType &PredType::NATIVE_UINT_FAST8 = *NATIVE_UINT_FAST8_;
-#endif /* H5_SIZEOF_UINT_FAST8_T */
-#if H5_SIZEOF_INT_FAST16_T != 0
-const PredType &PredType::NATIVE_INT_FAST16 = *NATIVE_INT_FAST16_;
-#endif /* H5_SIZEOF_INT_FAST16_T */
-#if H5_SIZEOF_UINT_FAST16_T != 0
+const PredType &PredType::NATIVE_INT_FAST16 = *NATIVE_INT_FAST16_;
const PredType &PredType::NATIVE_UINT_FAST16 = *NATIVE_UINT_FAST16_;
-#endif /* H5_SIZEOF_UINT_FAST16_T */
-#if H5_SIZEOF_INT_FAST32_T != 0
-const PredType &PredType::NATIVE_INT_FAST32 = *NATIVE_INT_FAST32_;
-#endif /* H5_SIZEOF_INT_FAST32_T */
-#if H5_SIZEOF_UINT_FAST32_T != 0
+const PredType &PredType::NATIVE_INT_FAST32 = *NATIVE_INT_FAST32_;
const PredType &PredType::NATIVE_UINT_FAST32 = *NATIVE_UINT_FAST32_;
-#endif /* H5_SIZEOF_UINT_FAST32_T */
-#if H5_SIZEOF_INT_FAST64_T != 0
-const PredType &PredType::NATIVE_INT_FAST64 = *NATIVE_INT_FAST64_;
-#endif /* H5_SIZEOF_INT_FAST64_T */
-#if H5_SIZEOF_UINT_FAST64_T != 0
+const PredType &PredType::NATIVE_INT_FAST64 = *NATIVE_INT_FAST64_;
const PredType &PredType::NATIVE_UINT_FAST64 = *NATIVE_UINT_FAST64_;
-#endif /* H5_SIZEOF_UINT_FAST64_T */
#endif // DOXYGEN_SHOULD_SKIP_THIS
@@ -916,7 +772,7 @@ September 2015:
classes, such as PropList, PredType, DataSpace, etc... Previously,
these global constants were declared statically and the C++ library used
a constant, called PredType::AtExit, to detect when all the global
- contants are destroyed then close the C library (H5close). This method
+ constants are destroyed then close the C library (H5close). This method
relied on the order of the constants being created and destroyed and
that PredType constants be the last to be destroyed. In September
2015, it was recognized that the order in which the global constants were
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PredType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PredType.h
index c4ac6b2d2c6..85b6e96fb0a 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PredType.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PredType.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -29,7 +28,7 @@ class H5_DLLCPP PredType : public AtomType {
public:
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("PredType");
}
@@ -42,7 +41,7 @@ class H5_DLLCPP PredType : public AtomType {
PredType(const PredType &original);
// Noop destructor
- virtual ~PredType() H5_OVERRIDE;
+ virtual ~PredType() override = default;
/*! \brief This dummy function do not inherit from DataType - it will
throw a DataTypeIException if invoked.
@@ -176,63 +175,31 @@ class H5_DLLCPP PredType : public AtomType {
static const PredType &NATIVE_INT64;
static const PredType &NATIVE_UINT64;
-// LEAST types
-#if H5_SIZEOF_INT_LEAST8_T != 0
+ // LEAST types
static const PredType &NATIVE_INT_LEAST8;
-#endif /* H5_SIZEOF_INT_LEAST8_T */
-#if H5_SIZEOF_UINT_LEAST8_T != 0
static const PredType &NATIVE_UINT_LEAST8;
-#endif /* H5_SIZEOF_UINT_LEAST8_T */
-#if H5_SIZEOF_INT_LEAST16_T != 0
static const PredType &NATIVE_INT_LEAST16;
-#endif /* H5_SIZEOF_INT_LEAST16_T */
-#if H5_SIZEOF_UINT_LEAST16_T != 0
static const PredType &NATIVE_UINT_LEAST16;
-#endif /* H5_SIZEOF_UINT_LEAST16_T */
-#if H5_SIZEOF_INT_LEAST32_T != 0
static const PredType &NATIVE_INT_LEAST32;
-#endif /* H5_SIZEOF_INT_LEAST32_T */
-#if H5_SIZEOF_UINT_LEAST32_T != 0
static const PredType &NATIVE_UINT_LEAST32;
-#endif /* H5_SIZEOF_UINT_LEAST32_T */
-#if H5_SIZEOF_INT_LEAST64_T != 0
static const PredType &NATIVE_INT_LEAST64;
-#endif /* H5_SIZEOF_INT_LEAST64_T */
-#if H5_SIZEOF_UINT_LEAST64_T != 0
static const PredType &NATIVE_UINT_LEAST64;
-#endif /* H5_SIZEOF_UINT_LEAST64_T */
-// FAST types
-#if H5_SIZEOF_INT_FAST8_T != 0
+ // FAST types
static const PredType &NATIVE_INT_FAST8;
-#endif /* H5_SIZEOF_INT_FAST8_T */
-#if H5_SIZEOF_UINT_FAST8_T != 0
static const PredType &NATIVE_UINT_FAST8;
-#endif /* H5_SIZEOF_UINT_FAST8_T */
-#if H5_SIZEOF_INT_FAST16_T != 0
static const PredType &NATIVE_INT_FAST16;
-#endif /* H5_SIZEOF_INT_FAST16_T */
-#if H5_SIZEOF_UINT_FAST16_T != 0
static const PredType &NATIVE_UINT_FAST16;
-#endif /* H5_SIZEOF_UINT_FAST16_T */
-#if H5_SIZEOF_INT_FAST32_T != 0
static const PredType &NATIVE_INT_FAST32;
-#endif /* H5_SIZEOF_INT_FAST32_T */
-#if H5_SIZEOF_UINT_FAST32_T != 0
static const PredType &NATIVE_UINT_FAST32;
-#endif /* H5_SIZEOF_UINT_FAST32_T */
-#if H5_SIZEOF_INT_FAST64_T != 0
static const PredType &NATIVE_INT_FAST64;
-#endif /* H5_SIZEOF_INT_FAST64_T */
-#if H5_SIZEOF_UINT_FAST64_T != 0
static const PredType &NATIVE_UINT_FAST64;
-#endif /* H5_SIZEOF_UINT_FAST64_T */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -378,64 +345,31 @@ class H5_DLLCPP PredType : public AtomType {
static PredType *NATIVE_INT64_;
static PredType *NATIVE_UINT64_;
-// LEAST types
-#if H5_SIZEOF_INT_LEAST8_T != 0
+ // LEAST types
static PredType *NATIVE_INT_LEAST8_;
-#endif /* H5_SIZEOF_INT_LEAST8_T */
-#if H5_SIZEOF_UINT_LEAST8_T != 0
static PredType *NATIVE_UINT_LEAST8_;
-#endif /* H5_SIZEOF_UINT_LEAST8_T */
-#if H5_SIZEOF_INT_LEAST16_T != 0
static PredType *NATIVE_INT_LEAST16_;
-#endif /* H5_SIZEOF_INT_LEAST16_T */
-#if H5_SIZEOF_UINT_LEAST16_T != 0
static PredType *NATIVE_UINT_LEAST16_;
-#endif /* H5_SIZEOF_UINT_LEAST16_T */
-#if H5_SIZEOF_INT_LEAST32_T != 0
static PredType *NATIVE_INT_LEAST32_;
-#endif /* H5_SIZEOF_INT_LEAST32_T */
-#if H5_SIZEOF_UINT_LEAST32_T != 0
static PredType *NATIVE_UINT_LEAST32_;
-#endif /* H5_SIZEOF_UINT_LEAST32_T */
-#if H5_SIZEOF_INT_LEAST64_T != 0
static PredType *NATIVE_INT_LEAST64_;
-#endif /* H5_SIZEOF_INT_LEAST64_T */
-#if H5_SIZEOF_UINT_LEAST64_T != 0
static PredType *NATIVE_UINT_LEAST64_;
-#endif /* H5_SIZEOF_UINT_LEAST64_T */
-// FAST types
-#if H5_SIZEOF_INT_FAST8_T != 0
+ // FAST types
static PredType *NATIVE_INT_FAST8_;
-#endif /* H5_SIZEOF_INT_FAST8_T */
-#if H5_SIZEOF_UINT_FAST8_T != 0
static PredType *NATIVE_UINT_FAST8_;
-#endif /* H5_SIZEOF_UINT_FAST8_T */
-#if H5_SIZEOF_INT_FAST16_T != 0
static PredType *NATIVE_INT_FAST16_;
-#endif /* H5_SIZEOF_INT_FAST16_T */
-#if H5_SIZEOF_UINT_FAST16_T != 0
static PredType *NATIVE_UINT_FAST16_;
-#endif /* H5_SIZEOF_UINT_FAST16_T */
-#if H5_SIZEOF_INT_FAST32_T != 0
static PredType *NATIVE_INT_FAST32_;
-#endif /* H5_SIZEOF_INT_FAST32_T */
-#if H5_SIZEOF_UINT_FAST32_T != 0
static PredType *NATIVE_UINT_FAST32_;
-#endif /* H5_SIZEOF_UINT_FAST32_T */
-#if H5_SIZEOF_INT_FAST64_T != 0
static PredType *NATIVE_INT_FAST64_;
-#endif /* H5_SIZEOF_INT_FAST64_T */
-#if H5_SIZEOF_UINT_FAST64_T != 0
static PredType *NATIVE_UINT_FAST64_;
-#endif /* H5_SIZEOF_UINT_FAST64_T */
- // End of Declaration of pointers
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PropList.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PropList.cpp
index c8c1a48079d..a116494a401 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PropList.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PropList.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -12,10 +11,8 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include
-
#include
-#include "H5private.h" // for HDmemset
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
@@ -41,7 +38,6 @@ PropList *PropList::DEFAULT_ = 0;
// Description
// If PropList::DEFAULT_ already points to an allocated object,
// throw a PropListIException. This scenario should not happen.
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
PropList *
PropList::getConstant()
@@ -66,13 +62,11 @@ PropList::getConstant()
//--------------------------------------------------------------------------
// Function: PropList::deleteConstants
// Purpose Deletes the constant object that PropList::DEFAULT_ points to.
-// Programmer Binh-Minh Ribler - 2015
//--------------------------------------------------------------------------
void
PropList::deleteConstants()
{
- if (DEFAULT_ != 0)
- delete DEFAULT_;
+ delete DEFAULT_;
}
//--------------------------------------------------------------------------
@@ -85,7 +79,6 @@ const PropList &PropList::DEFAULT = *getConstant();
//--------------------------------------------------------------------------
// Function: Default constructor
///\brief Default constructor: creates a stub property list object.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PropList::PropList() : IdComponent(), id(H5P_DEFAULT)
{
@@ -95,7 +88,6 @@ PropList::PropList() : IdComponent(), id(H5P_DEFAULT)
// Function: PropList copy constructor
///\brief Copy constructor: same HDF5 object as \a original
///\param original - IN: The original property list to copy
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PropList::PropList(const PropList &original) : IdComponent(), id(original.id)
{
@@ -112,13 +104,9 @@ PropList::PropList(const PropList &original) : IdComponent(), id(original.id)
// class is provided or makes a copy of a property list if one
// is given. If the given id is anything else, then set this
// property's id to H5P_DEFAULT.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-PropList::PropList(const hid_t plist_id) : IdComponent()
+PropList::PropList(const hid_t plist_id) : IdComponent(), id{H5P_DEFAULT}
{
- if (plist_id <= 0)
- id = H5P_DEFAULT;
-
H5I_type_t id_type = H5Iget_type(plist_id);
switch (id_type) {
case H5I_GENPROP_CLS:
@@ -155,6 +143,7 @@ PropList::PropList(const hid_t plist_id) : IdComponent()
case H5I_UNINIT:
case H5I_MAP:
case H5I_SPACE_SEL_ITER:
+ case H5I_EVENTSET:
default:
id = H5P_DEFAULT;
break;
@@ -166,7 +155,6 @@ PropList::PropList(const hid_t plist_id) : IdComponent()
///\brief Makes a copy of an existing property list.
///\param like_plist - IN: Reference to the existing property list
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
// Modification
// - Replaced resetIdComponent() with decRefCount() to use C
// library ID reference counting mechanism - BMR, Jun 1, 2004
@@ -200,7 +188,6 @@ PropList::copy(const PropList &like_plist)
// Description
// Makes a copy of the property list on the right hand side
// and stores the new id in the left hand side object.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
PropList &
PropList::operator=(const PropList &rhs)
@@ -216,7 +203,6 @@ PropList::operator=(const PropList &rhs)
///\param dest - IN: Destination property list or class
///\param name - IN: Name of the property to copy - \c char pointer
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
void
PropList::copyProp(PropList &dest, const char *name) const
@@ -235,7 +221,6 @@ PropList::copyProp(PropList &dest, const char *name) const
/// accepts.
///\param dest - IN: Destination property list or class
///\param name - IN: Name of the property to copy - \c H5std_string
-// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
void
PropList::copyProp(PropList &dest, const H5std_string &name) const
@@ -251,7 +236,6 @@ PropList::copyProp(PropList &dest, const H5std_string &name) const
///\param name - IN: Name of the property to copy - \c char pointer
///\note This member function will be removed in the next release
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
PropList::copyProp(PropList &dest, PropList &src, const char *name) const
@@ -272,7 +256,6 @@ PropList::copyProp(PropList &dest, PropList &src, const char *name) const
///\param dest - IN: Destination property list or class
///\param src - IN: Source property list or class
///\param name - IN: Name of the property to copy - \c H5std_string
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
PropList::copyProp(PropList &dest, PropList &src, const H5std_string &name) const
@@ -289,7 +272,6 @@ PropList::copyProp(PropList &dest, PropList &src, const H5std_string &name) cons
// AbstractDS and Attribute are moved out of H5Object. In
// addition, member IdComponent::id is moved into subclasses, and
// IdComponent::getId now becomes pure virtual function.
-// Programmer Binh-Minh Ribler - May, 2008
//--------------------------------------------------------------------------
hid_t
PropList::getId() const
@@ -305,10 +287,9 @@ PropList::getId() const
///\exception H5::IdComponentException when the attempt to close the HDF5
/// object fails
// Description:
-// The underlaying reference counting in the C library ensures
+// The underlying reference counting in the C library ensures
// that the current valid id of this object is properly closed.
// Then the object's id is reset to the new id.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
PropList::p_setId(const hid_t new_id)
@@ -331,7 +312,6 @@ PropList::p_setId(const hid_t new_id)
///\brief Closes the property list if it is not a default one.
///
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - Mar 9, 2005
//--------------------------------------------------------------------------
void
PropList::close()
@@ -351,7 +331,6 @@ PropList::close()
///\brief Returns the class of this property list, i.e. \c H5P_FILE_CREATE...
///\return The property list class if it is not equal to \c H5P_ROOT
///\exception H5::PropListIException
-// Programmer Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
hid_t
PropList::getClass() const
@@ -373,7 +352,6 @@ PropList::getClass() const
///\par Description
/// This routine checks if a property exists within a property
/// list or class.
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
bool
PropList::propExist(const char *name) const
@@ -397,7 +375,6 @@ PropList::propExist(const char *name) const
/// It differs from the above function only in what arguments it
/// accepts.
///\param name - IN: Name of property to check for - \c H5std_string
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
bool
PropList::propExist(const H5std_string &name) const
@@ -413,7 +390,6 @@ PropList::propExist(const H5std_string &name) const
///\par Description
/// Releases memory and detaches a class from the property
/// list class hierarchy.
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
PropList::closeClass() const
@@ -434,7 +410,6 @@ PropList::closeClass() const
/// Retrieves a copy of the value for a property in a property
/// list. The property name must exist or this routine will
/// throw an exception.
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
PropList::getProperty(const char *name, void *value) const
@@ -452,7 +427,6 @@ PropList::getProperty(const char *name, void *value) const
///\param name - IN: Name of property to query - \c char pointer
///\return The property that is a \c H5std_string.
///\exception H5::PropListIException
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
H5std_string
PropList::getProperty(const char *name) const
@@ -461,8 +435,7 @@ PropList::getProperty(const char *name) const
size_t size = getPropSize(name);
// Allocate buffer then get the property
- char *prop_strg_C = new char[size + 1]; // temporary C-string for C API
- HDmemset(prop_strg_C, 0, size + 1); // clear buffer
+ char *prop_strg_C = new char[size + 1]();
herr_t ret_value = H5Pget(id, name, prop_strg_C); // call C API
@@ -484,7 +457,6 @@ PropList::getProperty(const char *name) const
/// accepts.
///\param name - IN: Name of property to query - \c H5std_string
///\param value - OUT: Pointer to the buffer for the property value
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
PropList::getProperty(const H5std_string &name, void *value) const
@@ -498,7 +470,6 @@ PropList::getProperty(const H5std_string &name, void *value) const
/// accepts.
///\param name - IN: Name of property to query - \c H5std_string
///\return The property that is a \c H5std_string.
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
H5std_string
PropList::getProperty(const H5std_string &name) const
@@ -517,7 +488,6 @@ PropList::getProperty(const H5std_string &name) const
/// in bytes. Zero-sized properties are allowed and the return
/// value will be of 0. This function works for both property
/// lists and classes.
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
size_t
PropList::getPropSize(const char *name) const
@@ -536,7 +506,6 @@ PropList::getPropSize(const char *name) const
/// accepts.
///\param name - IN: Name of property to query - \c H5std_string
///
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
size_t
PropList::getPropSize(const H5std_string &name) const
@@ -548,8 +517,7 @@ PropList::getPropSize(const H5std_string &name) const
// Function: PropList::getClassName
///\brief Return the name of a generic property list class.
///\return A string containing the class name, if success, otherwise,
-/// a NULL string.
-// Programmer: Binh-Minh Ribler - April, 2004
+/// an empty string.
//--------------------------------------------------------------------------
H5std_string
PropList::getClassName() const
@@ -564,12 +532,12 @@ PropList::getClassName() const
else
return "";
}
+
//--------------------------------------------------------------------------
// Function: PropList::getNumProps
///\brief Returns the number of properties in this property list or class.
///\return Size of the property.
///\exception H5::PropListIException
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
size_t
PropList::getNumProps() const
@@ -591,7 +559,6 @@ PropList::getNumProps() const
// Description
// Revision svn r29815 changed 'value' to const, hence, deprecated
// the non-const setProperty.
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
PropList::setProperty(const char *name, const void *value) const
@@ -605,7 +572,6 @@ PropList::setProperty(const char *name, const void *value) const
//--------------------------------------------------------------------------
// Function: PropList::setProperty
///\brief Deprecated due to missing const in prototype. (1.10.1)
-// Programmer: Binh-Minh Ribler - March, 2017
// Modification
// Planned for removal. -BMR, 2017/03/17 1.10.1
//--------------------------------------------------------------------------
@@ -628,16 +594,16 @@ PropList::setProperty(const char *name, void *value) const
// Description
// Revision svn r29815 changed 'value' to const, hence, deprecated
// the non-const setProperty.
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
PropList::setProperty(const char *name, const char *charptr) const
{
- herr_t ret_value = H5Pset(id, name, (const void *)charptr);
+ herr_t ret_value = H5Pset(id, name, static_cast(charptr));
if (ret_value < 0) {
throw PropListIException(inMemFunc("setProperty"), "H5Pset failed");
}
}
+
//--------------------------------------------------------------------------
// Function: PropList::setProperty
///\brief This is an overloaded member function, provided for convenience.
@@ -645,7 +611,6 @@ PropList::setProperty(const char *name, const char *charptr) const
/// accepts.
///\param name - IN: Name of property to set - \c char pointer
///\param strg - IN: Value for the property is a \c H5std_string
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
PropList::setProperty(const char *name, const H5std_string &strg) const
@@ -656,7 +621,6 @@ PropList::setProperty(const char *name, const H5std_string &strg) const
//--------------------------------------------------------------------------
// Function: PropList::setProperty
///\brief Deprecated due to missing const in prototype. (1.10.1)
-// Programmer: Binh-Minh Ribler - March, 2017
// Modification
// Planned for removal. -BMR, 2017/03/17 1.10.1
//--------------------------------------------------------------------------
@@ -673,7 +637,6 @@ PropList::setProperty(const char *name, H5std_string &strg) const
/// accepts.
///\param name - IN: Name of property to set - \c H5std_string
///\param value - IN: Void pointer to the value for the property
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
PropList::setProperty(const H5std_string &name, const void *value) const
@@ -684,7 +647,6 @@ PropList::setProperty(const H5std_string &name, const void *value) const
//--------------------------------------------------------------------------
// Function: PropList::setProperty
///\brief Deprecated due to missing const in prototype. (1.10.1)
-// Programmer: Binh-Minh Ribler - March, 2017
// Modification
// Planned for removal. -BMR, 2017/03/17 1.10.1
//--------------------------------------------------------------------------
@@ -701,7 +663,6 @@ PropList::setProperty(const H5std_string &name, void *value) const
/// accepts.
///\param name - IN: Name of property to set - \c H5std_string
///\param strg - IN: Value for the property is a \c H5std_string
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
PropList::setProperty(const H5std_string &name, const H5std_string &strg) const
@@ -712,7 +673,6 @@ PropList::setProperty(const H5std_string &name, const H5std_string &strg) const
//--------------------------------------------------------------------------
// Function: PropList::setProperty
///\brief Deprecated due to missing const in prototype. (1.10.1)
-// Programmer: Binh-Minh Ribler - March, 2017
// Modification
// Planned for removal. -BMR, 2017/03/17 1.10.1
//--------------------------------------------------------------------------
@@ -729,7 +689,6 @@ PropList::setProperty(const H5std_string &name, H5std_string &strg) const
///\return true if the property list is a member of the property list
/// class, and false, otherwise.
///\exception H5::PropListIException
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
bool
PropList::isAClass(const PropList &prop_class) const
@@ -750,7 +709,6 @@ PropList::isAClass(const PropList &prop_class) const
///\brief Removes a property from a property list.
///\param name - IN: Name of property to remove - \c char pointer
///\exception H5::PropListIException
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
PropList::removeProp(const char *name) const
@@ -767,7 +725,6 @@ PropList::removeProp(const char *name) const
/// It differs from the above function only in what arguments it
/// accepts.
///\param name - IN: Name of property to remove - \c H5std_string
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
void
PropList::removeProp(const H5std_string &name) const
@@ -782,7 +739,6 @@ PropList::removeProp(const H5std_string &name) const
///\return true if the property lists or classes are equal, and
/// false, otherwise.
///\exception H5::PropListIException
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
bool
PropList::operator==(const PropList &rhs) const
@@ -803,7 +759,6 @@ PropList::operator==(const PropList &rhs) const
///\brief Returns the parent class of a generic property class
///\return The parent class of a property class
///\exception H5::PropListIException
-// Programmer: Binh-Minh Ribler - April, 2004
//--------------------------------------------------------------------------
PropList
PropList::getClassParent() const
@@ -819,7 +774,6 @@ PropList::getClassParent() const
//--------------------------------------------------------------------------
// Function: PropList destructor
///\brief Properly terminates access to this property list.
-// Programmer Binh-Minh Ribler - 2000
// Modification
// - Replaced resetIdComponent() with decRefCount() to use C
// library ID reference counting mechanism - BMR, Jun 1, 2004
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PropList.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PropList.h
index 2df326b5e33..beef474f65e 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PropList.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5PropList.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -38,7 +37,7 @@ class H5_DLLCPP PropList : public IdComponent {
bool operator==(const PropList &rhs) const;
// Close this property list.
- virtual void close() H5_OVERRIDE;
+ virtual void close() override;
// Close a property list class.
void closeClass() const;
@@ -102,7 +101,7 @@ class H5_DLLCPP PropList : public IdComponent {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("PropList");
}
@@ -114,10 +113,10 @@ class H5_DLLCPP PropList : public IdComponent {
PropList(const PropList &original);
// Gets the property list id.
- virtual hid_t getId() const H5_OVERRIDE;
+ virtual hid_t getId() const override;
// Destructor: properly terminates access to this property list.
- virtual ~PropList() H5_OVERRIDE;
+ virtual ~PropList() override;
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -128,7 +127,7 @@ class H5_DLLCPP PropList : public IdComponent {
hid_t id; // HDF5 property list id
// Sets the property list id.
- virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
+ virtual void p_setId(const hid_t new_id) override;
private:
static PropList *DEFAULT_;
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5StrType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5StrType.cpp
index 5df48f38660..1b45814f4e7 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5StrType.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5StrType.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -32,14 +31,12 @@
#include "H5StrType.h"
#include "H5DataSet.h"
#include "H5PredType.h"
-#include "H5private.h"
namespace H5 {
//--------------------------------------------------------------------------
// Function: StrType default constructor
///\brief Default constructor: Creates a stub string datatype
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType::StrType() : AtomType()
{
@@ -50,7 +47,6 @@ StrType::StrType() : AtomType()
///\brief Creates a string datatype using a predefined type.
///\param pred_type - IN: Predefined datatype
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType::StrType(const PredType &pred_type) : AtomType()
{
@@ -76,7 +72,6 @@ StrType::StrType(const PredType &pred_type) : AtomType()
// Note
// The use of this constructor can be shortened by using
// its overloaded below as StrType(0, size).
-// Programmer Binh-Minh Ribler - 2000
// Modification
// Planned for removal. -BMR, 2005/12/02
// Removed from documentation. -BMR, 2016/03/07
@@ -103,10 +98,12 @@ StrType::StrType(const PredType &pred_type, const size_t &size) : AtomType()
/// StrType atype(PredType::C_S1, size)
// Note
// This constructor replaced the previous one.
-// Programmer Binh-Minh Ribler - Nov 28, 2005
//--------------------------------------------------------------------------
-StrType::StrType(H5_ATTR_UNUSED const int dummy, const size_t &size) : AtomType()
+StrType::StrType(const int dummy, const size_t &size) : AtomType()
{
+ // Unused
+ (void)dummy;
+
// use DataType::copy to make a copy of the string predefined type
// then set its length
copy(PredType::C_S1);
@@ -118,7 +115,6 @@ StrType::StrType(H5_ATTR_UNUSED const int dummy, const size_t &size) : AtomType(
///\brief Creates an StrType object using the id of an existing datatype.
///\param existing_id - IN: Id of an existing datatype
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType::StrType(const hid_t existing_id) : AtomType(existing_id)
{
@@ -127,7 +123,6 @@ StrType::StrType(const hid_t existing_id) : AtomType(existing_id)
//--------------------------------------------------------------------------
// Function: StrType copy constructor
///\brief Copy constructor: same HDF5 object as \a original
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType::StrType(const StrType &original) : AtomType(original)
{
@@ -138,7 +133,6 @@ StrType::StrType(const StrType &original) : AtomType(original)
///\brief Gets the string datatype of the specified dataset
///\param dataset - IN: Dataset that this string datatype associates with
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType::StrType(const DataSet &dataset) : AtomType()
{
@@ -157,7 +151,6 @@ StrType::StrType(const DataSet &dataset) : AtomType()
///\param loc - IN: Location of the type
///\param dtype_name - IN: String type name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openStrType(const char*) to
@@ -176,7 +169,6 @@ StrType::StrType(const H5Location &loc, const char *dtype_name) : AtomType()
///\param loc - IN: Location of the type
///\param dtype_name - IN: String type name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openStrType(const H5std_string&)
@@ -194,7 +186,6 @@ StrType::StrType(const H5Location &loc, const H5std_string &dtype_name) : AtomTy
/// binary object description of this type.
///
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Aug 2017
//--------------------------------------------------------------------------
DataType *
StrType::decode() const
@@ -224,7 +215,6 @@ StrType::decode() const
/// and usability problems. See the C API entry H5Pset_char_encoding for
/// more information.
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_cset_t
StrType::getCset() const
@@ -251,7 +241,6 @@ StrType::getCset() const
/// and usability problems. See the C API entry H5Pset_char_encoding for
/// more information.
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
StrType::setCset(H5T_cset_t cset) const
@@ -270,7 +259,6 @@ StrType::setCset(H5T_cset_t cset) const
/// \li \c H5T_STR_NULLPAD (0) - Pad with zeros
/// \li \c H5T_STR_SPACEPAD (0) - pad with spaces (as FORTRAN does)
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_str_t
StrType::getStrpad() const
@@ -292,7 +280,6 @@ StrType::getStrpad() const
///\par Description
/// For information, please refer to the H5Tset_strpad API in
/// the HDF5 C Reference Manual.
-// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
StrType::setStrpad(H5T_str_t strpad) const
@@ -303,13 +290,4 @@ StrType::setStrpad(H5T_str_t strpad) const
}
}
-//--------------------------------------------------------------------------
-// Function: StrType destructor
-///\brief Properly terminates access to this string datatype.
-// Programmer Binh-Minh Ribler - 2000
-//--------------------------------------------------------------------------
-StrType::~StrType()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5StrType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5StrType.h
index 3e4013a6e42..0f51e759aaf 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5StrType.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5StrType.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -42,7 +41,7 @@ class H5_DLLCPP StrType : public AtomType {
// Returns an StrType object via DataType* by decoding the
// binary object description of this type.
- virtual DataType *decode() const H5_OVERRIDE;
+ virtual DataType *decode() const override;
// Retrieves the character set type of this string datatype.
H5T_cset_t getCset() const;
@@ -58,7 +57,7 @@ class H5_DLLCPP StrType : public AtomType {
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("StrType");
}
@@ -73,7 +72,7 @@ class H5_DLLCPP StrType : public AtomType {
StrType(const StrType &original);
// Noop destructor.
- virtual ~StrType() H5_OVERRIDE;
+ virtual ~StrType() override = default;
}; // end of StrType
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5VarLenType.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5VarLenType.cpp
index 0270febfe59..49f2cbdd22b 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5VarLenType.cpp
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5VarLenType.cpp
@@ -1,6 +1,5 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -42,7 +41,6 @@ VarLenType::VarLenType() : DataType()
///\brief Creates an VarLenType object using an existing id.
///\param existing_id - IN: Id of an existing datatype
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
VarLenType::VarLenType(const hid_t existing_id) : DataType(existing_id)
{
@@ -51,7 +49,6 @@ VarLenType::VarLenType(const hid_t existing_id) : DataType(existing_id)
//--------------------------------------------------------------------------
// Function: VarLenType copy constructor
///\brief Copy constructor: same HDF5 object as \a original
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
VarLenType::VarLenType(const VarLenType &original) : DataType(original)
{
@@ -67,7 +64,6 @@ VarLenType::VarLenType(const VarLenType &original) : DataType(original)
// constructor.
// Updated: this is unnecessary.
// -BMR, Sep, 2017
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
VarLenType::VarLenType(const DataType *base_type) : DataType()
{
@@ -83,7 +79,6 @@ VarLenType::VarLenType(const DataType *base_type) : DataType()
/// \a base_type.
///\param base_type - IN: An existing datatype
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - May, 2004
//--------------------------------------------------------------------------
VarLenType::VarLenType(const DataType &base_type) : DataType()
{
@@ -100,7 +95,6 @@ VarLenType::VarLenType(const DataType &base_type) : DataType()
///\param loc - IN: Location of the type
///\param dtype_name - IN: Variable length type name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openVarLenType(const char*) to
@@ -119,7 +113,6 @@ VarLenType::VarLenType(const H5Location &loc, const char *dtype_name) : DataType
///\param loc - IN: Location of the type
///\param dtype_name - IN: Variable length type name
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openVarLenType(const H5std_string&)
@@ -137,7 +130,6 @@ VarLenType::VarLenType(const H5Location &loc, const H5std_string &dtype_name) :
/// binary object description of this type.
///
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - Aug 2017
//--------------------------------------------------------------------------
DataType *
VarLenType::decode() const
@@ -154,13 +146,4 @@ VarLenType::decode() const
return (encoded_vltype);
}
-//--------------------------------------------------------------------------
-// Function: VarLenType destructor
-///\brief Properly terminates access to this datatype.
-// Programmer Binh-Minh Ribler - May, 2004
-//--------------------------------------------------------------------------
-VarLenType::~VarLenType()
-{
-}
-
} // namespace H5
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5VarLenType.h b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5VarLenType.h
index 583b9cd57a5..d7f0ff1aefe 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5VarLenType.h
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/H5VarLenType.h
@@ -1,7 +1,6 @@
// C++ informative line for the emacs editor: -*- C++ -*-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -33,11 +32,11 @@ class H5_DLLCPP VarLenType : public DataType {
// Returns an VarLenType object via DataType* by decoding the
// binary object description of this type.
- virtual DataType *decode() const H5_OVERRIDE;
+ virtual DataType *decode() const override;
///\brief Returns this class name.
virtual H5std_string
- fromClass() const H5_OVERRIDE
+ fromClass() const override
{
return ("VarLenType");
}
@@ -53,7 +52,7 @@ class H5_DLLCPP VarLenType : public DataType {
VarLenType(const H5Location &loc, const H5std_string &name);
// Noop destructor
- virtual ~VarLenType() H5_OVERRIDE;
+ virtual ~VarLenType() override = default;
// Default constructor
VarLenType();
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/RM_stylesheet.css b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/RM_stylesheet.css
deleted file mode 100644
index 5d3f93b2e3a..00000000000
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/RM_stylesheet.css
+++ /dev/null
@@ -1,450 +0,0 @@
-BODY
-{
-}
-H1
-{
- FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif
-}
-H2
-{
- FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif
-}
-H3
-{
- FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif
-}
-H4
-{
- FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif
-}
-H5
-{
- FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif
-}
-H6
-{
- FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif
-}
-P
-{
-}
-CENTER
-{
- FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif
-}
-TD
-{
-}
-TH
-{
- FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif
-}
-UL
-{
-}
-DL
-{
-}
-DIV
-{
- FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif
-}
-H1
-{
- TEXT-ALIGN: center
-}
-CAPTION
-{
- FONT-WEIGHT: bold
-}
-DIV.qindex
-{
- BORDER-RIGHT: #b0b0b0 1px solid;
- PADDING-RIGHT: 2px;
- BORDER-TOP: #b0b0b0 1px solid;
- PADDING-LEFT: 2px;
- PADDING-BOTTOM: 2px;
- MARGIN: 2px;
- BORDER-LEFT: #b0b0b0 1px solid;
- WIDTH: 100%;
- LINE-HEIGHT: 140%;
- PADDING-TOP: 2px;
- BORDER-BOTTOM: #b0b0b0 1px solid;
- BACKGROUND-COLOR: #eeeeff;
- TEXT-ALIGN: center
-}
-DIV.nav
-{
- BORDER-RIGHT: #b0b0b0 1px solid;
- PADDING-RIGHT: 2px;
- BORDER-TOP: #b0b0b0 1px solid;
- PADDING-LEFT: 2px;
- PADDING-BOTTOM: 2px;
- MARGIN: 2px;
- BORDER-LEFT: #b0b0b0 1px solid;
- WIDTH: 100%;
- LINE-HEIGHT: 140%;
- PADDING-TOP: 2px;
- BORDER-BOTTOM: #b0b0b0 1px solid;
- BACKGROUND-COLOR: #eeeeff;
- TEXT-ALIGN: center
-}
-A.qindex
-{
- FONT-WEIGHT: bold;
- COLOR: #1a419d;
- TEXT-DECORATION: none
-}
-A.qindex:visited
-{
- FONT-WEIGHT: bold;
- COLOR: #1a419d;
- TEXT-DECORATION: none
-}
-A.qindex:hover
-{
- BACKGROUND-COLOR: #ddddff;
- TEXT-DECORATION: none
-}
-A.qindexHL
-{
- BORDER-RIGHT: #9295c2 1px double;
- BORDER-TOP: #9295c2 1px double;
- FONT-WEIGHT: bold;
- BORDER-LEFT: #9295c2 1px double;
- COLOR: #ffffff;
- BORDER-BOTTOM: #9295c2 1px double;
- BACKGROUND-COLOR: #6666cc;
- TEXT-DECORATION: none
-}
-A.qindexHL:hover
-{
- COLOR: #ffffff;
- BACKGROUND-COLOR: #6666cc;
- TEXT-DECORATION: none
-}
-A.qindexHL:visited
-{
- COLOR: #ffffff;
- BACKGROUND-COLOR: #6666cc;
- TEXT-DECORATION: none
-}
-A.el
-{
- FONT-WEIGHT: bold;
- TEXT-DECORATION: none
-}
-A.elRef
-{
- FONT-WEIGHT: bold
-}
-A.code:link
-{
- FONT-WEIGHT: normal;
- COLOR: #0000ff;
- TEXT-DECORATION: none
-}
-A.code:visited
-{
- FONT-WEIGHT: normal;
- COLOR: #0000ff;
- TEXT-DECORATION: none
-}
-A.codeRef:link
-{
- FONT-WEIGHT: normal;
- COLOR: #0000ff
-}
-A.codeRef:visited
-{
- FONT-WEIGHT: normal;
- COLOR: #0000ff
-}
-A:hover
-{
- BACKGROUND-COLOR: #f2f2ff;
- TEXT-DECORATION: none
-}
-DL.el
-{
- MARGIN-LEFT: -1cm
-}
-.fragment
-{
- FONT-FAMILY: monospace
-}
-PRE.fragment
-{
- BORDER-RIGHT: #cccccc 1px solid;
- PADDING-RIGHT: 6px;
- BORDER-TOP: #cccccc 1px solid;
- PADDING-LEFT: 6px;
- PADDING-BOTTOM: 4px;
- MARGIN: 4px 8px 4px 2px;
- BORDER-LEFT: #cccccc 1px solid;
- PADDING-TOP: 4px;
- BORDER-BOTTOM: #cccccc 1px solid;
- BACKGROUND-COLOR: #f5f5f5
-}
-DIV.ah
-{
- MARGIN-TOP: 3px;
- FONT-WEIGHT: bold;
- MARGIN-BOTTOM: 3px;
- COLOR: #ffffff;
- BACKGROUND-COLOR: black
-}
-TD.md
-{
- FONT-WEIGHT: bold;
- BACKGROUND-COLOR: #f4f4fb
-}
-TD.mdname1
-{
- FONT-WEIGHT: bold;
- COLOR: #602020;
- BACKGROUND-COLOR: #f4f4fb
-}
-TD.mdname
-{
- FONT-WEIGHT: bold;
- WIDTH: 600px;
- COLOR: #602020;
- BACKGROUND-COLOR: #f4f4fb
-}
-DIV.groupHeader
-{
- MARGIN-TOP: 12px;
- FONT-WEIGHT: bold;
- MARGIN-BOTTOM: 6px;
- MARGIN-LEFT: 16px
-}
-DIV.groupText
-{
- FONT-SIZE: 14px;
- MARGIN-LEFT: 16px;
- FONT-STYLE: italic
-}
-BODY
-{
- BACKGROUND: white;
- MARGIN-LEFT: 20px;
- COLOR: black;
- MARGIN-RIGHT: 20px
-}
-TD.indexkey
-{
- BORDER-RIGHT: #cccccc 1px solid;
- PADDING-RIGHT: 10px;
- BORDER-TOP: #cccccc 1px solid;
- PADDING-LEFT: 10px;
- FONT-WEIGHT: bold;
- PADDING-BOTTOM: 2px;
- MARGIN: 2px 0px;
- BORDER-LEFT: #cccccc 1px solid;
- PADDING-TOP: 2px;
- BORDER-BOTTOM: #cccccc 1px solid;
- BACKGROUND-COLOR: #eeeeff
-}
-TD.indexvalue
-{
- BORDER-RIGHT: #cccccc 1px solid;
- PADDING-RIGHT: 10px;
- BORDER-TOP: #cccccc 1px solid;
- PADDING-LEFT: 10px;
- PADDING-BOTTOM: 2px;
- MARGIN: 2px 0px;
- BORDER-LEFT: #cccccc 1px solid;
- PADDING-TOP: 2px;
- BORDER-BOTTOM: #cccccc 1px solid;
- FONT-STYLE: italic;
- BACKGROUND-COLOR: #eeeeff
-}
-TR.memlist
-{
- BACKGROUND-COLOR: #f0f0f0
-}
-P.formulaDsp
-{
- TEXT-ALIGN: center
-}
-IMG.formulaDsp
-{
-}
-IMG.formulaInl
-{
- VERTICAL-ALIGN: middle
-}
-SPAN.keyword
-{
- COLOR: #008000
-}
-SPAN.keywordtype
-{
- COLOR: #604020
-}
-SPAN.keywordflow
-{
- COLOR: #e08000
-}
-SPAN.comment
-{
- COLOR: #800000
-}
-SPAN.preprocessor
-{
- COLOR: #806020
-}
-SPAN.stringliteral
-{
- COLOR: #002080
-}
-SPAN.charliteral
-{
- COLOR: #008080
-}
-.mdTable
-{
- BORDER-RIGHT: #868686 1px solid;
- BORDER-TOP: #868686 1px solid;
- BORDER-LEFT: #868686 1px solid;
- BORDER-BOTTOM: #868686 1px solid;
- BACKGROUND-COLOR: #f4f4fb
-}
-.mdRow
-{
- PADDING-RIGHT: 10px;
- PADDING-LEFT: 10px;
- PADDING-BOTTOM: 8px;
- PADDING-TOP: 8px
-}
-.mdescLeft
-{
- BORDER-RIGHT: #e0e0e0 1px;
- PADDING-RIGHT: 8px;
- BORDER-TOP: #e0e0e0 1px;
- PADDING-LEFT: 8px;
- FONT-SIZE: 12px;
- PADDING-BOTTOM: 4px;
- MARGIN: 0px;
- BORDER-LEFT: #e0e0e0 1px;
- PADDING-TOP: 0px;
- BORDER-BOTTOM: #e0e0e0 1px;
- FONT-STYLE: italic;
- BACKGROUND-COLOR: #fafafa
-}
-.mdescRight
-{
- BORDER-RIGHT: #e0e0e0 1px;
- PADDING-RIGHT: 8px;
- BORDER-TOP: #e0e0e0 1px;
- PADDING-LEFT: 8px;
- FONT-SIZE: 12px;
- PADDING-BOTTOM: 4px;
- MARGIN: 0px;
- BORDER-LEFT: #e0e0e0 1px;
- PADDING-TOP: 0px;
- BORDER-BOTTOM: #e0e0e0 1px;
- FONT-STYLE: italic;
- BACKGROUND-COLOR: #fafafa
-}
-.memItemLeft
-{
- BORDER-RIGHT: #e0e0e0 1px;
- PADDING-RIGHT: 0px;
- BORDER-TOP: #e0e0e0 1px solid;
- PADDING-LEFT: 8px;
- FONT-SIZE: 12px;
- PADDING-BOTTOM: 0px;
- MARGIN: 4px;
- BORDER-LEFT: #e0e0e0 1px;
- PADDING-TOP: 1px;
- BORDER-BOTTOM: #e0e0e0 1px;
- BACKGROUND-COLOR: #fafafa
-}
-.memItemRight
-{
- BORDER-RIGHT: #e0e0e0 1px;
- PADDING-RIGHT: 8px;
- BORDER-TOP: #e0e0e0 1px solid;
- PADDING-LEFT: 8px;
- FONT-SIZE: 13px;
- PADDING-BOTTOM: 0px;
- MARGIN: 4px;
- BORDER-LEFT: #e0e0e0 1px;
- PADDING-TOP: 1px;
- BORDER-BOTTOM: #e0e0e0 1px;
- BACKGROUND-COLOR: #fafafa
-}
-.memTemplItemLeft
-{
- BORDER-RIGHT: #e0e0e0 1px;
- PADDING-RIGHT: 0px;
- BORDER-TOP: #e0e0e0 1px;
- PADDING-LEFT: 8px;
- FONT-SIZE: 12px;
- PADDING-BOTTOM: 0px;
- MARGIN: 4px;
- BORDER-LEFT: #e0e0e0 1px;
- PADDING-TOP: 1px;
- BORDER-BOTTOM: #e0e0e0 1px;
- BACKGROUND-COLOR: #fafafa
-}
-.memTemplItemRight
-{
- BORDER-RIGHT: #e0e0e0 1px;
- PADDING-RIGHT: 8px;
- BORDER-TOP: #e0e0e0 1px;
- PADDING-LEFT: 8px;
- FONT-SIZE: 13px;
- PADDING-BOTTOM: 0px;
- MARGIN: 4px;
- BORDER-LEFT: #e0e0e0 1px;
- PADDING-TOP: 1px;
- BORDER-BOTTOM: #e0e0e0 1px;
- BACKGROUND-COLOR: #fafafa
-}
-.memTemplParams
-{
- BORDER-RIGHT: #e0e0e0 1px;
- PADDING-RIGHT: 0px;
- BORDER-TOP: #e0e0e0 1px solid;
- PADDING-LEFT: 8px;
- FONT-SIZE: 12px;
- PADDING-BOTTOM: 0px;
- MARGIN: 4px;
- BORDER-LEFT: #e0e0e0 1px;
- COLOR: #606060;
- PADDING-TOP: 1px;
- BORDER-BOTTOM: #e0e0e0 1px;
- BACKGROUND-COLOR: #fafafa
-}
-.search
-{
- FONT-WEIGHT: bold;
- COLOR: #003399
-}
-FORM.search
-{
- MARGIN-TOP: 0px;
- MARGIN-BOTTOM: 0px
-}
-INPUT.search
-{
- FONT-WEIGHT: normal;
- FONT-SIZE: 75%;
- COLOR: #000080;
- BACKGROUND-COLOR: #eeeeff
-}
-TD.tiny
-{
- FONT-SIZE: 75%
-}
-A
-{
- COLOR: #252e78
-}
-A:visited
-{
- COLOR: #3d2185
-}
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/cpp_doc_config b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/cpp_doc_config
deleted file mode 100644
index f17652eee6b..00000000000
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/cpp_doc_config
+++ /dev/null
@@ -1,2352 +0,0 @@
-# Doxyfile 1.8.5
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project.
-#
-# All text after a double hash (##) is considered a comment and is placed in
-# front of the TAG it is preceding.
-#
-# All text after a single hash (#) is considered a comment and will be ignored.
-# The format is:
-# TAG = value [value, ...]
-# For lists, items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (\" \").
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all text
-# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
-# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
-# for the list of possible encodings.
-# The default value is: UTF-8.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
-# double-quotes, unless you are using Doxywizard) that should identify the
-# project for which the documentation is generated. This name is used in the
-# title of most generated pages and in a few other places.
-# The default value is: My Project.
-
-PROJECT_NAME =
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
-# could be handy for archiving the generated documentation or if some version
-# control system is used.
-
-PROJECT_NUMBER = "1.12.1"
-
-# 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
-# quick idea about the purpose of the project. Keep the description short.
-
-PROJECT_BRIEF =
-
-# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
-# the documentation. The maximum height of the logo should not exceed 55 pixels
-# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
-# to the output directory.
-
-PROJECT_LOGO =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
-# into which the generated documentation will be written. If a relative path is
-# entered, it will be relative to the location where doxygen was started. If
-# left blank the current directory will be used.
-
-OUTPUT_DIRECTORY = cpplus_RM
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
-# directories (in 2 levels) under the output directory of each output format and
-# will distribute the generated files over these directories. Enabling this
-# option can be useful when feeding doxygen a huge amount of source files, where
-# putting all generated files in the same directory would otherwise causes
-# performance problems for the file system.
-# The default value is: NO.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# Possible values are: Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-
-# Traditional, Croatian, Czech, Danish, Dutch, English, Esperanto, Farsi,
-# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en,
-# Korean, Korean-en, Latvian, Norwegian, Macedonian, Persian, Polish,
-# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish,
-# Turkish, Ukrainian and Vietnamese.
-# The default value is: English.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
-# descriptions after the members that are listed in the file and class
-# documentation (similar to Javadoc). Set to NO to disable this.
-# The default value is: YES.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
-# description of a member or function before the detailed description
-#
-# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-# The default value is: YES.
-
-REPEAT_BRIEF = NO
-
-# This tag implements a quasi-intelligent brief description abbreviator that is
-# used to form the text in various listings. Each string in this list, if found
-# as the leading text of the brief description, will be stripped from the text
-# and the result, after processing the whole list, is used as the annotated
-# text. Otherwise, the brief description is used as-is. If left blank, the
-# following values are used ($name is automatically replaced with the name of
-# the entity):The $name class, The $name widget, The $name file, is, provides,
-# specifies, contains, represents, a, an and the.
-
-ABBREVIATE_BRIEF = "The $name class" \
- "The $name widget" \
- "The $name file" \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# doxygen will generate a detailed section even if there is only a brief
-# description.
-# The default value is: NO.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-# The default value is: NO.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
-# before files name in the file list and in the header files. If set to NO the
-# shortest path that makes the file name unique will be used
-# The default value is: YES.
-
-FULL_PATH_NAMES = YES
-
-# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
-# Stripping is only done if one of the specified strings matches the left-hand
-# part of the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the path to
-# strip.
-#
-# Note that you can specify absolute paths here, but also relative paths, which
-# will be relative from the directory where doxygen is started.
-# This tag requires that the tag FULL_PATH_NAMES is set to YES.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
-# path mentioned in the documentation of a class, which tells the reader which
-# header file to include in order to use a class. If left blank only the name of
-# the header file containing the class definition is used. Otherwise one should
-# specify the list of include paths that are normally passed to the compiler
-# using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
-# less readable) file names. This can be useful is your file systems doesn't
-# support long names like on DOS, Mac, or CD-ROM.
-# The default value is: NO.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
-# first line (until the first dot) of a Javadoc-style comment as the brief
-# description. If set to NO, the Javadoc-style will behave just like regular Qt-
-# style comments (thus requiring an explicit @brief command for a brief
-# description.)
-# The default value is: NO.
-
-JAVADOC_AUTOBRIEF = NO
-
-# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
-# line (until the first dot) of a Qt-style comment as the brief description. If
-# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
-# requiring an explicit \brief command for a brief description.)
-# The default value is: NO.
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
-# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
-# a brief description. This used to be the default behavior. The new default is
-# to treat a multi-line C++ comment block as a detailed description. Set this
-# tag to YES if you prefer the old behavior instead.
-#
-# Note that setting this tag to YES also means that rational rose comments are
-# not recognized any more.
-# The default value is: NO.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
-# documentation from any documented member that it re-implements.
-# The default value is: YES.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
-# new page for each member. If set to NO, the documentation of a member will be
-# part of the file/class/namespace that contains it.
-# The default value is: NO.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
-# uses this value to replace tabs by spaces in code fragments.
-# Minimum value: 1, maximum value: 16, default value: 4.
-
-TAB_SIZE = 4
-
-# This tag can be used to specify a number of aliases that act as commands in
-# the documentation. An alias has the form:
-# name=value
-# For example adding
-# "sideeffect=@par Side Effects:\n"
-# will allow you to put the command \sideeffect (or @sideeffect) in the
-# documentation, which will result in a user-defined paragraph with heading
-# "Side Effects:". You can put \n's in the value part of an alias to insert
-# newlines.
-
-ALIASES =
-
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding "class=itcl::class"
-# will allow you to use the command class in the itcl::class meaning.
-
-TCL_SUBST =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
-# only. Doxygen will then generate output that is more tailored for C. For
-# instance, some of the names that are used will be different. The list of all
-# members will be omitted, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_FOR_C = NO
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
-# Python sources only. Doxygen will then generate output that is more tailored
-# for that language. For instance, namespaces will be presented as packages,
-# qualified scopes will look different, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources. Doxygen will then generate output that is tailored for Fortran.
-# The default value is: NO.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for VHDL.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it
-# parses. With this tag you can assign which parser to use for a given
-# extension. Doxygen has a built-in mapping, but you can override or extend it
-# using this tag. The format is ext=language, where ext is a file extension, and
-# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
-# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
-# (default is Fortran), use: inc=Fortran f=C.
-#
-# Note For files without extension you can use no_extension as a placeholder.
-#
-# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
-# the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
-# according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
-# The output of markdown processing is further processed by doxygen, so you can
-# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
-# case of backward compatibilities issues.
-# The default value is: YES.
-
-MARKDOWN_SUPPORT = NO
-
-# When enabled doxygen tries to link words that correspond to documented
-# classes, or namespaces to their corresponding documentation. Such a link can
-# be prevented in individual cases by by putting a % sign in front of the word
-# or globally by setting AUTOLINK_SUPPORT to NO.
-# The default value is: YES.
-
-AUTOLINK_SUPPORT = YES
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should set this
-# tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string);
-# versus func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-# The default value is: NO.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-# The default value is: NO.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
-# will parse them like normal C++ but will assume all classes use public instead
-# of private inheritance when no explicit protection keyword is present.
-# The default value is: NO.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate
-# getter and setter methods for a property. Setting this option to YES will make
-# doxygen to replace the get and set methods by a property in the documentation.
-# This will only work if the methods are indeed getting or setting a simple
-# type. If this is not the case, or you want to show the methods anyway, you
-# should set this option to NO.
-# The default value is: YES.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-# The default value is: NO.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES to allow class member groups of the same type
-# (for instance a group of public functions) to be put as a subgroup of that
-# type (e.g. under the Public Functions section). Set it to NO to prevent
-# subgrouping. Alternatively, this can be done per class using the
-# \nosubgrouping command.
-# The default value is: YES.
-
-SUBGROUPING = YES
-
-# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
-# are shown inside the group in which they are included (e.g. using \ingroup)
-# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
-# and RTF).
-#
-# Note that this feature does not work in combination with
-# SEPARATE_MEMBER_PAGES.
-# The default value is: NO.
-
-INLINE_GROUPED_CLASSES = NO
-
-# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
-# with only public data fields or simple typedef fields will be shown inline in
-# the documentation of the scope in which they are defined (i.e. file,
-# namespace, or group documentation), provided this scope is documented. If set
-# to NO, structs, classes, and unions are shown on a separate page (for HTML and
-# Man pages) or section (for LaTeX and RTF).
-# The default value is: NO.
-
-INLINE_SIMPLE_STRUCTS = NO
-
-# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
-# enum is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically be
-# useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-# The default value is: NO.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
-# cache is used to resolve symbols given their name and scope. Since this can be
-# an expensive process and often the same symbol appears multiple times in the
-# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
-# doxygen will become slower. If the cache is too large, memory is wasted. The
-# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
-# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
-# symbols. At the end of a run doxygen will report the cache usage and suggest
-# the optimal cache size from a speed point of view.
-# Minimum value: 0, maximum value: 9, default value: 0.
-
-LOOKUP_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available. Private
-# class members and static file members will be hidden unless the
-# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
-# Note: This will also disable the warnings about undocumented members that are
-# normally produced when WARNINGS is set to YES.
-# The default value is: NO.
-
-EXTRACT_ALL = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
-# be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
-# scope will be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PACKAGE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
-# included in the documentation.
-# The default value is: NO.
-
-EXTRACT_STATIC = NO
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
-# locally in source files will be included in the documentation. If set to NO
-# only classes defined in header files are included. Does not have any effect
-# for Java sources.
-# The default value is: YES.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local methods,
-# which are defined in the implementation section but not in the interface are
-# included in the documentation. If set to NO only methods in the interface are
-# included.
-# The default value is: NO.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base name of
-# the file that contains the anonymous namespace. By default anonymous namespace
-# are hidden.
-# The default value is: NO.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
-# undocumented members inside documented classes or files. If set to NO these
-# members will be included in the various overviews, but no documentation
-# section is generated. This option has no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_MEMBERS = YES
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy. If set
-# to NO these classes will be included in the various overviews. This option has
-# no effect if EXTRACT_ALL is enabled.
-# The default value is: NO.
-
-HIDE_UNDOC_CLASSES = YES
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
-# (class|struct|union) declarations. If set to NO these declarations will be
-# included in the documentation.
-# The default value is: NO.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
-# documentation blocks found inside the body of a function. If set to NO these
-# blocks will be appended to the function's detailed documentation block.
-# The default value is: NO.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation that is typed after a
-# \internal command is included. If the tag is set to NO then the documentation
-# will be excluded. Set it to YES to include the internal documentation.
-# The default value is: NO.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
-# names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-# The default value is: system dependent.
-
-CASE_SENSE_NAMES = NO
-
-# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
-# their full class and namespace scopes in the documentation. If set to YES the
-# scope will be hidden.
-# The default value is: NO.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
-# the files that are included by a file in the documentation of that file.
-# The default value is: YES.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
-# files with double quotes in the documentation rather than with sharp brackets.
-# The default value is: NO.
-
-FORCE_LOCAL_INCLUDES = NO
-
-# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
-# documentation for inline members.
-# The default value is: YES.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
-# (detailed) documentation of file and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order.
-# The default value is: YES.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
-# descriptions of file, namespace and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order.
-# The default value is: NO.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
-# (brief and detailed) documentation of class members so that constructors and
-# destructors are listed first. If set to NO the constructors will appear in the
-# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
-# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
-# member documentation.
-# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
-# detailed member documentation.
-# The default value is: NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
-# of group names into alphabetical order. If set to NO the group names will
-# appear in their defined order.
-# The default value is: NO.
-
-SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
-# fully-qualified names, including namespaces. If set to NO, the class list will
-# be sorted only by class name, not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the alphabetical
-# list.
-# The default value is: NO.
-
-SORT_BY_SCOPE_NAME = NO
-
-# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
-# type resolution of all parameters of a function it will reject a match between
-# the prototype and the implementation of a member function even if there is
-# only one candidate or it is obvious which candidate to choose by doing a
-# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
-# accept a match between prototype and implementation in such cases.
-# The default value is: NO.
-
-STRICT_PROTO_MATCHING = NO
-
-# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
-# todo list. This list is created by putting \todo commands in the
-# documentation.
-# The default value is: YES.
-
-GENERATE_TODOLIST = NO
-
-# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
-# test list. This list is created by putting \test commands in the
-# documentation.
-# The default value is: YES.
-
-GENERATE_TESTLIST = NO
-
-# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
-# list. This list is created by putting \bug commands in the documentation.
-# The default value is: YES.
-
-GENERATE_BUGLIST = NO
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
-# the deprecated list. This list is created by putting \deprecated commands in
-# the documentation.
-# The default value is: YES.
-
-GENERATE_DEPRECATEDLIST= NO
-
-# The ENABLED_SECTIONS tag can be used to enable conditional documentation
-# sections, marked by \if ... \endif and \cond
-# ... \endcond blocks.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
-# initial value of a variable or macro / define can have for it to appear in the
-# documentation. If the initializer consists of more lines than specified here
-# it will be hidden. Use a value of 0 to hide initializers completely. The
-# appearance of the value of individual variables and macros / defines can be
-# controlled using \showinitializer or \hideinitializer command in the
-# documentation regardless of this setting.
-# Minimum value: 0, maximum value: 10000, default value: 30.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
-# the bottom of the documentation of classes and structs. If set to YES the list
-# will mention the files that were used to generate the documentation.
-# The default value is: YES.
-
-SHOW_USED_FILES = YES
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
-# will remove the Files entry from the Quick Index and from the Folder Tree View
-# (if specified).
-# The default value is: YES.
-
-SHOW_FILES = NO
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
-# page. This will remove the Namespaces entry from the Quick Index and from the
-# Folder Tree View (if specified).
-# The default value is: YES.
-
-SHOW_NAMESPACES = NO
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command command input-file, where command is the value of the
-# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
-# by doxygen. Whatever the program writes to standard output is used as the file
-# version. For an example see the documentation.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
-# by doxygen. The layout file controls the global structure of the generated
-# output files in an output format independent way. To create the layout file
-# that represents doxygen's defaults, run doxygen with the -l option. You can
-# optionally specify a file name after the option, if omitted DoxygenLayout.xml
-# will be used as the name of the layout file.
-#
-# Note that if you run doxygen from a directory containing a file called
-# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
-# tag is left empty.
-
-LAYOUT_FILE =
-
-# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
-# the reference definitions. This must be a list of .bib files. The .bib
-# extension is automatically appended if omitted. This requires the bibtex tool
-# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
-# For LaTeX the style of the bibliography can be controlled using
-# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
-# search path. Do not use file names with spaces, bibtex cannot handle them. See
-# also \cite for info how to create references.
-
-CITE_BIB_FILES =
-
-#---------------------------------------------------------------------------
-# Configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated to
-# standard output by doxygen. If QUIET is set to YES this implies that the
-# messages are off.
-# The default value is: NO.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
-# this implies that the warnings are on.
-#
-# Tip: Turn warnings on while writing the documentation.
-# The default value is: YES.
-
-WARNINGS = YES
-
-# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
-# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
-# will automatically be disabled.
-# The default value is: YES.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some parameters
-# in a documented function, or documenting parameters that don't exist or using
-# markup commands wrongly.
-# The default value is: YES.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
-# are documented, but have no documentation for their parameters or return
-# value. If set to NO doxygen will only warn about wrong or incomplete parameter
-# documentation, but not about the absence of documentation.
-# The default value is: NO.
-
-WARN_NO_PARAMDOC = NO
-
-# The WARN_FORMAT tag determines the format of the warning messages that doxygen
-# can produce. The string should contain the $file, $line, and $text tags, which
-# will be replaced by the file and line number from which the warning originated
-# and the warning text. Optionally the format may contain $version, which will
-# be replaced by the version of the file (if it could be obtained via
-# FILE_VERSION_FILTER)
-# The default value is: $file:$line: $text.
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning and error
-# messages should be written. If left blank the output is written to standard
-# error (stderr).
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag is used to specify the files and/or directories that contain
-# documented source files. You may enter file names like myfile.cpp or
-# directories like /usr/src/myproject. Separate the files or directories with
-# spaces.
-# Note: If this tag is empty the current directory is searched.
-
-INPUT = .
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
-# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
-# documentation (see: http://www.gnu.org/software/libiconv) for the list of
-# possible encodings.
-# The default value is: UTF-8.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank the
-# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
-# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
-# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
-# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
-# *.qsf, *.as and *.js.
-
-FILE_PATTERNS = *.c \
- *.cc \
- *.cxx \
- *.cpp \
- *.c++ \
- *.java \
- *.ii \
- *.ixx \
- *.ipp \
- *.i++ \
- *.inl \
- *.idl \
- *.ddl \
- *.odl \
- *.h \
- *.hh \
- *.hxx \
- *.hpp \
- *.h++ \
- *.cs \
- *.d \
- *.php \
- *.php4 \
- *.php5 \
- *.phtml \
- *.inc \
- *.m \
- *.markdown \
- *.md \
- *.mm \
- *.dox \
- *.py \
- *.f90 \
- *.f \
- *.for \
- *.tcl \
- *.vhd \
- *.vhdl \
- *.ucf \
- *.qsf \
- *.as \
- *.js
-
-# The RECURSIVE tag can be used to specify whether or not subdirectories should
-# be searched for input files as well.
-# The default value is: NO.
-
-RECURSIVE = NO
-
-# The EXCLUDE tag can be used to specify files and/or directories that should be
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-#
-# Note that relative paths are relative to the directory from which doxygen is
-# run.
-
-EXCLUDE = C:/hdf/C++/src/H5Alltypes.h \
- C:/hdf/C++/src/H5Classes.h
-
-# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
-# directories that are symbolic links (a Unix file system feature) are excluded
-# from the input.
-# The default value is: NO.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories.
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories for example use the pattern */test/*
-
-EXCLUDE_PATTERNS =
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories use the pattern */test/*
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or directories
-# that contain example code fragments that are included (see the \include
-# command).
-
-EXAMPLE_PATH = ../examples
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank all
-# files are included.
-
-EXAMPLE_PATTERNS =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude commands
-# irrespective of the value of the RECURSIVE tag.
-# The default value is: NO.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or directories
-# that contain images that are to be included in the documentation (see the
-# \image command).
-
-IMAGE_PATH = ./header_files
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command:
-#
-#
-#
-# where is the value of the INPUT_FILTER tag, and is the
-# name of an input file. Doxygen will then use the output that the filter
-# program writes to standard output. If FILTER_PATTERNS is specified, this tag
-# will be ignored.
-#
-# Note that the filter must not add or remove lines; it is applied before the
-# code is scanned, but not when the output code is generated. If lines are added
-# or removed, the anchors will not be placed correctly.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis. Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match. The filters are a list of the form: pattern=filter
-# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
-# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
-# patterns match the file name, INPUT_FILTER is applied.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER ) will also be used to filter the input files that are used for
-# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
-# The default value is: NO.
-
-FILTER_SOURCE_FILES = NO
-
-# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
-# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
-# it is also possible to disable source filtering for a specific pattern using
-# *.ext= (so without naming a filter).
-# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
-
-FILTER_SOURCE_PATTERNS =
-
-# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
-# is part of the input, its contents will be placed on the main page
-# (index.html). This can be useful if you have a project on for instance GitHub
-# and want to reuse the introduction page also for the doxygen output.
-
-USE_MDFILE_AS_MAINPAGE =
-
-#---------------------------------------------------------------------------
-# Configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
-# generated. Documented entities will be cross-referenced with these sources.
-#
-# Note: To get rid of all source code in the generated output, make sure that
-# also VERBATIM_HEADERS is set to NO.
-# The default value is: NO.
-
-SOURCE_BROWSER = NO
-
-# Setting the INLINE_SOURCES tag to YES will include the body of functions,
-# classes and enums directly into the documentation.
-# The default value is: NO.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
-# special comment blocks from generated source code fragments. Normal C, C++ and
-# Fortran comments will always remain visible.
-# The default value is: YES.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
-# function all documented functions referencing it will be listed.
-# The default value is: NO.
-
-REFERENCED_BY_RELATION = YES
-
-# If the REFERENCES_RELATION tag is set to YES then for each documented function
-# all documented entities called/used by that function will be listed.
-# The default value is: NO.
-
-REFERENCES_RELATION = YES
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
-# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
-# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
-# link to the documentation.
-# The default value is: YES.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
-# source code will show a tooltip with additional information such as prototype,
-# brief description and links to the definition and documentation. Since this
-# will make the HTML file larger and loading of large files a bit slower, you
-# can opt to disable this feature.
-# The default value is: YES.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-SOURCE_TOOLTIPS = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code will
-# point to the HTML generated by the htags(1) tool instead of doxygen built-in
-# source browser. The htags tool is part of GNU's global source tagging system
-# (see http://www.gnu.org/software/global/global.html). You will need version
-# 4.8.6 or higher.
-#
-# To use it do the following:
-# - Install the latest version of global
-# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
-# - Make sure the INPUT points to the root of the source tree
-# - Run doxygen as normal
-#
-# Doxygen will invoke htags (and that will in turn invoke gtags), so these
-# tools must be available from the command line (i.e. in the search path).
-#
-# The result: instead of the source browser generated by doxygen, the links to
-# source code will now point to the output of htags.
-# The default value is: NO.
-# This tag requires that the tag SOURCE_BROWSER is set to YES.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
-# verbatim copy of the header file for each class for which an include is
-# specified. Set to NO to disable this.
-# See also: Section \class.
-# The default value is: YES.
-
-VERBATIM_HEADERS = YES
-
-# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the
-# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
-# cost of reduced performance. This can be particularly helpful with template
-# rich C++ code for which doxygen's built-in parser lacks the necessary type
-# information.
-# Note: The availability of this option depends on whether or not doxygen was
-# compiled with the --with-libclang option.
-# The default value is: NO.
-
-# CLANG_ASSISTED_PARSING = NO
-
-# If clang assisted parsing is enabled you can provide the compiler with command
-# line options that you would normally use when invoking the compiler. Note that
-# the include paths will already be set by doxygen for the files and directories
-# specified with INPUT and INCLUDE_PATH.
-# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-
-# CLANG_OPTIONS =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
-# compounds will be generated. Enable this if the project contains a lot of
-# classes, structs, unions or interfaces.
-# The default value is: YES.
-
-ALPHABETICAL_INDEX = YES
-
-# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
-# which the alphabetical index list will be split.
-# Minimum value: 1, maximum value: 20, default value: 5.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all classes will
-# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
-# can be used to specify a prefix (or a list of prefixes) that should be ignored
-# while generating the index headers.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
-# The default value is: YES.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
-# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
-# it.
-# The default directory is: html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_OUTPUT = .
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
-# generated HTML page (for example: .htm, .php, .asp).
-# The default value is: .html.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
-# each generated HTML page. If the tag is left blank doxygen will generate a
-# standard header.
-#
-# To get valid HTML the header file that includes any scripts and style sheets
-# that doxygen needs, which is dependent on the configuration options used (e.g.
-# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
-# default header using
-# doxygen -w html new_header.html new_footer.html new_stylesheet.css
-# YourConfigFile
-# and then modify the file new_header.html. See also section "Doxygen usage"
-# for information on how to generate the default header that doxygen normally
-# uses.
-# Note: The header is subject to change so you typically have to regenerate the
-# default header when upgrading to a newer version of doxygen. For a description
-# of the possible markers and block names see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
-# generated HTML page. If the tag is left blank doxygen will generate a standard
-# footer. See HTML_HEADER for more information on how to generate a default
-# footer and what special commands can be used inside the footer. See also
-# section "Doxygen usage" for information on how to generate the default footer
-# that doxygen normally uses.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_FOOTER = footer.html
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
-# sheet that is used by each HTML page. It can be used to fine-tune the look of
-# the HTML output. If left blank doxygen will generate a default style sheet.
-# See also section "Doxygen usage" for information on how to generate the style
-# sheet that doxygen normally uses.
-# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
-# it is more robust and this tag (HTML_STYLESHEET) will in the future become
-# obsolete.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_STYLESHEET =
-
-# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
-# defined cascading style sheet that is included after the standard style sheets
-# created by doxygen. Using this option one can overrule certain style aspects.
-# This is preferred over using HTML_STYLESHEET since it does not replace the
-# standard style sheet and is therefore more robust against future updates.
-# Doxygen will copy the style sheet file to the output directory. For an example
-# see the documentation.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_STYLESHEET =
-
-# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
-# other source files which should be copied to the HTML output directory. Note
-# that these files will be copied to the base HTML output directory. Use the
-# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
-# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
-# files will be copied as-is; there are no commands or markers available.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_EXTRA_FILES = ./header_files/help.jpg \
- ./C2Cppfunction_map.htm
-
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
-# will adjust the colors in the stylesheet and background images according to
-# this color. Hue is specified as an angle on a colorwheel, see
-# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
-# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
-# purple, and 360 is red again.
-# Minimum value: 0, maximum value: 359, default value: 220.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_HUE = 220
-
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
-# in the HTML output. For a value of 0 the output will use grayscales only. A
-# value of 255 will produce the most vivid colors.
-# Minimum value: 0, maximum value: 255, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_SAT = 100
-
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
-# luminance component of the colors in the HTML output. Values below 100
-# gradually make the output lighter, whereas values above 100 make the output
-# darker. The value divided by 100 is the actual gamma applied, so 80 represents
-# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
-# change the gamma.
-# Minimum value: 40, maximum value: 240, default value: 80.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_COLORSTYLE_GAMMA = 80
-
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting this
-# to NO can help when comparing the output of multiple runs.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_TIMESTAMP = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_DYNAMIC_SECTIONS = NO
-
-# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
-# shown in the various tree structured indices initially; the user can expand
-# and collapse entries dynamically later on. Doxygen will expand the tree to
-# such a level that at most the specified number of entries are visible (unless
-# a fully collapsed tree already exceeds this amount). So setting the number of
-# entries 1 will produce a full collapsed tree by default. 0 is a special value
-# representing an infinite number of entries and will result in a full expanded
-# tree by default.
-# Minimum value: 0, maximum value: 9999, default value: 100.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_INDEX_NUM_ENTRIES = 100
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files will be
-# generated that can be used as input for Apple's Xcode 3 integrated development
-# environment (see: http://developer.apple.com/tools/xcode/), introduced with
-# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
-# Makefile in the HTML output directory. Running make will produce the docset in
-# that directory and running make install will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_DOCSET = NO
-
-# This tag determines the name of the docset feed. A documentation feed provides
-# an umbrella under which multiple documentation sets from a single provider
-# (such as a company or product suite) can be grouped.
-# The default value is: Doxygen generated docs.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# This tag specifies a string that should uniquely identify the documentation
-# set bundle. This should be a reverse domain-name style string, e.g.
-# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
-# the documentation publisher. This should be a reverse domain-name style
-# string, e.g. com.mycompany.MyDocSet.documentation.
-# The default value is: org.doxygen.Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
-
-# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
-# The default value is: Publisher.
-# This tag requires that the tag GENERATE_DOCSET is set to YES.
-
-DOCSET_PUBLISHER_NAME = Publisher
-
-# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
-# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
-# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
-# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
-# Windows.
-#
-# The HTML Help Workshop contains a compiler that can convert all HTML output
-# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
-# files are now used as the Windows 98 help format, and will replace the old
-# Windows help format (.hlp) on all Windows platforms in the future. Compressed
-# HTML files also contain an index, a table of contents, and you can search for
-# words in the documentation. The HTML workshop also contains a viewer for
-# compressed HTML files.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_HTMLHELP = NO
-
-# The CHM_FILE tag can be used to specify the file name of the resulting .chm
-# file. You can add a path in front of the file if the result should not be
-# written to the html output directory.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_FILE =
-
-# The HHC_LOCATION tag can be used to specify the location (absolute path
-# including file name) of the HTML help compiler ( hhc.exe). If non-empty
-# doxygen will try to run the HTML help compiler on the generated index.hhp.
-# The file has to be specified with full path.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-HHC_LOCATION =
-
-# The GENERATE_CHI flag controls if a separate .chi index file is generated (
-# YES) or that it should be included in the master .chm file ( NO).
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-GENERATE_CHI = NO
-
-# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
-# and project file content.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-CHM_INDEX_ENCODING =
-
-# The BINARY_TOC flag controls whether a binary table of contents is generated (
-# YES) or a normal table of contents ( NO) in the .chm file.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members to
-# the table of contents of the HTML help documentation and to the tree view.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
-# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
-# (.qch) of the generated HTML documentation.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
-# the file name of the resulting .qch file. The path specified is relative to
-# the HTML output folder.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
-# Project output. For more information please see Qt Help Project / Namespace
-# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_NAMESPACE = org.doxygen.Project
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
-# Help Project output. For more information please see Qt Help Project / Virtual
-# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
-# folders).
-# The default value is: doc.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
-# filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
-# custom filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
-# project's filter section matches. Qt Help Project / Filter Attributes (see:
-# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHP_SECT_FILTER_ATTRS =
-
-# The QHG_LOCATION tag can be used to specify the location of Qt's
-# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
-# generated .qhp file.
-# This tag requires that the tag GENERATE_QHP is set to YES.
-
-QHG_LOCATION =
-
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
-# generated, together with the HTML files, they form an Eclipse help plugin. To
-# install this plugin and make it available under the help contents menu in
-# Eclipse, the contents of the directory containing the HTML and XML files needs
-# to be copied into the plugins directory of eclipse. The name of the directory
-# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
-# After copying Eclipse needs to be restarted before the help appears.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_ECLIPSEHELP = NO
-
-# A unique identifier for the Eclipse help plugin. When installing the plugin
-# the directory name containing the HTML and XML files should also have this
-# name. Each documentation set should have its own identifier.
-# The default value is: org.doxygen.Project.
-# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
-
-ECLIPSE_DOC_ID = org.doxygen.Project
-
-# If you want full control over the layout of the generated HTML pages it might
-# be necessary to disable the index and replace it with your own. The
-# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
-# of each HTML page. A value of NO enables the index and the value YES disables
-# it. Since the tabs in the index contain the same information as the navigation
-# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-DISABLE_INDEX = NO
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information. If the tag
-# value is set to YES, a side panel will be generated containing a tree-like
-# index structure (just like the one that is generated for HTML Help). For this
-# to work a browser that supports JavaScript, DHTML, CSS and frames is required
-# (i.e. any modern browser). Windows users are probably better off using the
-# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
-# further fine-tune the look of the index. As an example, the default style
-# sheet generated by doxygen has an example that shows how to put an image at
-# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
-# the same information as the tab index, you could consider setting
-# DISABLE_INDEX to YES when enabling this option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-GENERATE_TREEVIEW = NO
-
-# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
-# doxygen will group on one line in the generated HTML documentation.
-#
-# Note that a value of 0 will completely suppress the enum values from appearing
-# in the overview section.
-# Minimum value: 0, maximum value: 20, default value: 4.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-ENUM_VALUES_PER_LINE = 4
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
-# to set the initial width (in pixels) of the frame in which the tree is shown.
-# Minimum value: 0, maximum value: 1500, default value: 250.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-TREEVIEW_WIDTH = 250
-
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
-# external symbols imported via tag files in a separate window.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-EXT_LINKS_IN_WINDOW = NO
-
-# Use this tag to change the font size of LaTeX formulas included as images in
-# the HTML documentation. When you change the font size after a successful
-# doxygen run you need to manually remove any form_*.png images from the HTML
-# output directory to force them to be regenerated.
-# Minimum value: 8, maximum value: 50, default value: 10.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_FONTSIZE = 10
-
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are not
-# supported properly for IE 6.0, but are supported on all modern browsers.
-#
-# Note that when changing this option you need to delete any form_*.png files in
-# the HTML output directory before the changes have effect.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_TRANSPARENT = NO
-
-# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# http://www.mathjax.org) which uses client side Javascript for the rendering
-# instead of using prerendered bitmaps. Use this if you do not have LaTeX
-# installed or if you want to formulas look prettier in the HTML output. When
-# enabled you may also need to install MathJax separately and configure the path
-# to it using the MATHJAX_RELPATH option.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-USE_MATHJAX = NO
-
-# When MathJax is enabled you can set the default output format to be used for
-# the MathJax output. See the MathJax site (see:
-# http://docs.mathjax.org/en/latest/output.html) for more details.
-# Possible values are: HTML-CSS (which is slower, but has the best
-# compatibility), NativeMML (i.e. MathML) and SVG.
-# The default value is: HTML-CSS.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_FORMAT = HTML-CSS
-
-# When MathJax is enabled you need to specify the location relative to the HTML
-# output directory using the MATHJAX_RELPATH option. The destination directory
-# should contain the MathJax.js script. For instance, if the mathjax directory
-# is located at the same level as the HTML output directory, then
-# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
-# Content Delivery Network so you can quickly see the result without installing
-# MathJax. However, it is strongly recommended to install a local copy of
-# MathJax from http://www.mathjax.org before deployment.
-# The default value is: http://cdn.mathjax.org/mathjax/latest.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
-
-# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
-# extension names that should be enabled during MathJax rendering. For example
-# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_EXTENSIONS =
-
-# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
-# of code that will be used on startup of the MathJax code. See the MathJax site
-# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
-# example see the documentation.
-# This tag requires that the tag USE_MATHJAX is set to YES.
-
-MATHJAX_CODEFILE =
-
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
-# the HTML output. The underlying search engine uses javascript and DHTML and
-# should work on any modern browser. Note that when using HTML help
-# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
-# there is already a search function so this one should typically be disabled.
-# For large projects the javascript based search engine can be slow, then
-# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
-# search using the keyboard; to jump to the search box use + S
-# (what the is depends on the OS and browser, but it is typically
-# , /
-
-
-
-
- The HDF Group Help Desk:
-
-
-
- Copyright by
- The HDF Group
-
- and the Board of Trustees of the University of Illinois
-
-
-
-
-
-
-
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in
index bcc835ebe38..f7ef5195490 100755
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in
@@ -1,7 +1,6 @@
#!/bin/sh
#
# Copyright by The HDF Group.
-# Copyright by the Board of Trustees of the University of Illinois.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
@@ -35,10 +34,10 @@ HL="@HL@"
## (Advanced usage - know what you're doing - you're on your own here.) ##
## The four variables below can be used to insert paths and flags in ##
## CPPFLAGS, CXXFLAGS, LDFLAGS, or LIBS in the h5cc compile line: ##
-## $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS ##
+## $CXXLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS ##
## $LDFLAGS $LIBS $clibpath $link_objs $link_args $shared_link ##
## ##
-## These settings can be overridden by setting HDF5_CXXFLAGS, ##
+## These settings can be overridden by setting HDF5_CXXFLAGS, ##
## HDF5_CPPFLAGS, HDF5_LDFLAGS, or HDF5_LIBS in the environment. ##
## ##
############################################################################
@@ -61,7 +60,7 @@ host_os="@host_os@"
prog_name="`basename $0`"
-allargs=""
+qargs=""
compile_args=""
libraries=""
link_args=""
@@ -70,8 +69,7 @@ clibpath=""
do_link="yes"
do_compile="no"
-dash_o="no"
-dash_c="no"
+dash_c=""
get_output_file="no"
SHOW="eval"
@@ -93,7 +91,7 @@ H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
H5BLD_LIBS="@LIBS@"
CXX="${HDF5_CXX:-$CXXBASE}"
-CXXLINKER="${HDF5_CLINKER:-$CXXLINKERBASE}"
+CXXLINKER="${HDF5_CXXLINKER:-$CXXLINKERBASE}"
CXXFLAGS="${HDF5_CXXFLAGS:-$CXXFLAGSBASE}"
CPPFLAGS="${HDF5_CPPFLAGS:-$CPPFLAGSBASE}"
LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}"
@@ -199,7 +197,6 @@ for arg in $@ ; do
case "$arg" in
-c)
- allargs="$allargs $arg"
compile_args="$compile_args $arg"
if test "x$do_link" = "xyes" -a -n "$output_file"; then
@@ -207,13 +204,10 @@ for arg in $@ ; do
fi
do_link="no"
- dash_c="yes"
+ dash_c="-c"
;;
-o)
- allargs="$allargs $arg"
- dash_o="yes"
-
- if test "x$dash_c" = "xyes"; then
+ if test "x$dash_c" = "x-c"; then
compile_args="$compile_args $arg"
else
link_args="$link_args $arg"
@@ -222,14 +216,12 @@ for arg in $@ ; do
fi
;;
-E|-M|-MT)
- allargs="$allargs $arg"
compile_args="$compile_args $arg"
- dash_c="yes"
+ dash_c="-c"
do_link="no"
;;
-l*)
libraries=" $libraries $arg "
- allargs="$allargs $arg"
;;
-prefix=*)
prefix="`expr "$arg" : '-prefix=\(.*\)'`"
@@ -255,53 +247,48 @@ for arg in $@ ; do
;;
*\"*)
qarg="'"$arg"'"
- allargs="$allargs $qarg"
+ qargs="$qargs $qarg"
;;
*\'*)
- qarg='\"'"$arg"'\"'
- allargs="$allargs $qarg"
+ qarg='"'"$arg"'"'
+ qargs="$qargs $qarg"
;;
-
*)
- allargs="$allargs $qarg"
-
- if [ -s "$arg" ] ; then
- ext=`expr "$arg" : '.*\(\..*\)'`
- if [ "$ext" = ".C" -o "$ext" = ".cxx" -o "$ext" = ".cpp" -o \
- "$ext" = ".cc" -o "$ext" = ".c" -o "$ext" = ".CC" ] ; then
-
- do_compile="yes"
- compile_args="$compile_args $arg"
- fname=`basename $arg $ext`
- link_objs="$link_objs $fname.o"
- elif [ "$ext" = ".o" ] ; then
- if test "x$dash_c" = "xyes" ; then
- compile_args="$compile_args $arg"
- else
- do_link="yes"
- link_objs="$link_objs $arg"
- fi
- elif test "x$ext" = "x.a"; then
- # This is an archive that we're linking in
- libraries=" $libraries $arg "
- else
- compile_args="$compile_args $arg"
- link_args="$link_args $arg"
- fi
- else
- compile_args="$compile_args $arg"
- link_args="$link_args $arg"
- fi
- ;;
+ if [ -s "$arg" ] ; then
+ ext=`expr "$arg" : '.*\(\..*\)'`
+ if [ "$ext" = ".C" -o "$ext" = ".cxx" -o "$ext" = ".cpp" -o \
+ "$ext" = ".cc" -o "$ext" = ".c" -o "$ext" = ".CC" ] ; then
+ do_compile="yes"
+ compile_args="$compile_args $arg"
+ fname=`basename $arg $ext`
+ link_objs="$link_objs $fname.o"
+ elif [ "$ext" = ".o" ] ; then
+ if test "x$dash_c" = "x-c" ; then
+ compile_args="$compile_args $arg"
+ else
+ do_link="yes"
+ link_objs="$link_objs $arg"
+ fi
+ elif test "x$ext" = "x.a"; then
+ # This is an archive that we're linking in
+ libraries=" $libraries $arg "
+ else
+ compile_args="$compile_args $arg"
+ link_args="$link_args $arg"
+ fi
+ else
+ compile_args="$compile_args $arg"
+ link_args="$link_args $arg"
+ fi
+ ;;
esac
done
-
+link_args="$link_args $qargs"
if test "x$do_compile" = "xyes"; then
- if test "x$dash_c" != "xyes"; then
- compile_args="-c $compile_args"
+ if test "x$dash_c" = "x"; then
+ dash_c="-c"
fi
-
- $SHOW $CXX -I$includedir $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $compile_args
+ $SHOW $CXX -I$includedir $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $dash_c $qargs $compile_args
status=$?
if test "$status" != "0"; then
@@ -319,27 +306,27 @@ if test "x$do_link" = "xyes"; then
fi
link_args="$link_args -L${libdir}"
- case "$kind" in
- gcc|linux*)
- # MacOS X doesn't support the "-Wl,-rpath -Wl," style of linker flags.
- # It appears to want none of them specified.
- case "$host_os" in
- darwin*) flag="" ;;
- *) flag="-Wl,-rpath -Wl," ;;
- esac
- ;;
- hpux*) flag="-Wl,+b -Wl," ;;
- freebsd*|solaris*) flag="-R" ;;
- rs6000*|aix*) flag="-L" ;;
- sgi) flag="-rpath " ;;
- *) flag="" ;;
- esac
-
- if test -n "$flag"; then
- shared_link="${flag}${libdir}"
- fi
-
- if test "x$USE_SHARED_LIB" != "xyes"; then
+ if test "x$USE_SHARED_LIB" = "xyes"; then
+ case "$kind" in
+ gcc|linux*)
+ # MacOS X doesn't support the "-Wl,-rpath -Wl," style of linker flags.
+ # It appears to want none of them specified.
+ case "$host_os" in
+ darwin*) flag="" ;;
+ *) flag="-Wl,-rpath -Wl," ;;
+ esac
+ ;;
+ hpux*) flag="-Wl,+b -Wl," ;;
+ freebsd*|solaris*) flag="-R" ;;
+ rs6000*|aix*) flag="-L" ;;
+ sgi) flag="-rpath " ;;
+ *) flag="" ;;
+ esac
+
+ if test -n "$flag"; then
+ shared_link="${flag}${libdir}"
+ fi
+ else
# The "-lhdf5" & "-lhdf5_hl" flags are in here already...This is a static
# compile though, so change it to the static version (.a) of the library.
new_libraries=""
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/header.html b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/header.html
deleted file mode 100644
index 5b92416dbb1..00000000000
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/header.html
+++ /dev/null
@@ -1,374 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-Main Page
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
HDF5 C++ API Reference Manual
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/clang-warnings/developer-general b/Modules/ThirdParty/HDF5/src/itkhdf5/config/clang-warnings/developer-general
index 74d8404f3b2..b80552ff99f 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/clang-warnings/developer-general
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/clang-warnings/developer-general
@@ -1,4 +1,3 @@
--Wformat-nonliteral
-Wmissing-noreturn
-Wsometimes-uninitialized
-Wswitch-enum
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/clang-warnings/general b/Modules/ThirdParty/HDF5/src/itkhdf5/config/clang-warnings/general
index f0c9b939457..433dff93612 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/clang-warnings/general
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/clang-warnings/general
@@ -8,19 +8,13 @@
-Wformat=2
-Wframe-larger-than=16384
-Wimplicit-fallthrough
-#
-# NOTE: Due to the divergence in the C and C++, we're dropping support for
-# compiling the C library with a C++ compiler and dropping the -Wc++-compat
-# warning.
-#
--Wno-c++-compat
-#
-# NOTE: Disable the -Wformat-nonliteral from -Wformat=2 here and re-add
-# it to the developer flags.
-#
--Wno-format-nonliteral
-Wnull-dereference
-Wunused-const-variable
-Wwrite-strings
-Wpedantic
-Wvolatile-register-var
+# NOTE: Due to the divergence in the C and C++, we're dropping support for
+# compiling the C library with a C++ compiler and dropping the -Wc++-compat
+# warning.
+#
+-Wno-c++-compat
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/clang-warnings/noerror-general b/Modules/ThirdParty/HDF5/src/itkhdf5/config/clang-warnings/noerror-general
deleted file mode 100644
index 4690ebd56f6..00000000000
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/clang-warnings/noerror-general
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# These warnings will be treated as errors, using the error-general file,
-# when HDF5_ENABLE_WARNINGS_AS_ERRORS is set to true for CMake or
-# the --enable-warnings-as-errors option is specified for configure.
-# Otherwise this file will be used to treat them as warnings.
-#
--Wbad-function-cast
--Wimplicit-function-declaration
--Wincompatible-pointer-types
--Wmissing-declarations
--Wpacked
--Wshadow
--Wswitch
-#
-# NOTE: Following files are not compatible with incompatible-pointer-types as errors
-# src/H5Dchunk.c,src/H5Dint.c,src/H5Gint.c,src/H5HFcache.c,src/H5I.c,src/H5T.c
--Wno-error=incompatible-pointer-types-discards-qualifiers
-#
-#
-# NOTE: File Driver files are not compatible with these warnings as errors
-# H5FDdirect.c,H5FDmpio.c,H5FDros3.c,
-# -Werror=unused-function
-#
--Wunused-function
-#
-# H5FDdrvr_module.h
-# -Werror=unused-variable
-#
--Wunused-variable
-#
-# H5VLpassthru.c
-# -Werror=unused-parameter
-#
--Wunused-parameter
-#
-#
-#
-# NOTE: Tools files are not compatible with these warnings as errors
-# lib/h5tools.c
-# -Werror=cast-align
-#
--Wcast-align
-#
-# lib/h5tools_utils.c
-# -Werror=unused-parameter
-#
-#
-# NOTE: JNI files are not compatible with these warnings as errors
-# jni/h5pDCPLImp.c,jni/nativeData.c,jni/h5util.c,jni/h5rImp.c
-# jni/h5sImp.c,jni/h5tImp.c
-# -Werror=cast-align
-# jni/h5util.c
-# -Werror=format(-overflow)
-#
--Wformat
-#
-#
-#Examples and tests do not use the same set of extensive warning flags as libraries
-# Here is a list of tests and examples that have issues with the stricter warnings as error
-#
-# NOTE: Test files are not compatible with these warnings as errors
-# thread_id.c,
-# -Werror=unused-function
-# dsets.c
-# -Werror=unused-parameter
-#
-#
-# NOTE: Examples files are not compatible with these warnings as errors
-# h5_vds-eiger.c,h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,h5_vds-percival-unlim-maxmin.c
-# h5_vds-percival.c,h5_read.c,h5_rdwt.c,h5_mount.c,h5_extend.c,h5_extend_write.c
-# h5_write.c,h5_vds-simpleIO.c,h5_ref2reg_deprec.c,h5_crtgrp.c,h5_select.c
-# h5_vds-percival-unlim.c,h5_crtatt.c,h5_group.c,h5_attribute.c,h5_crtdat.c
-# h5_reference_deprec.c
-# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c
-# -Werror=strict-prototypes
-# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c
-# -Werror=old-style-definition
-# h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,
-# -Werror=unused-variable
-# h5_elink_unix2win.c,h5_extlink.c,h5_attribute.c
-# -Werror=unused-parameter
-
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/CPack.Info.plist.in b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/CPack.Info.plist.in
index 08d371bd5d9..f6e316e105b 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/CPack.Info.plist.in
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/CPack.Info.plist.in
@@ -1,5 +1,5 @@
-
-
+
+
CFBundleDevelopmentRegion
@@ -16,11 +16,16 @@
FMWKCFBundleSignature????
+
+ LSApplicationCategoryType
+ public.app-category.developer-toolsCFBundleVersion
- @CPACK_PACKAGE_VERSIO@
+ @CPACK_PACKAGE_VERSION@CFBundleShortVersionString@CPACK_SHORT_VERSION_STRING@
+ NSHumanReadableCopyright
+ Copyright 2006 by The HDF GroupCSResourcesFileMapped
-
+ true
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/CTestCustom.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/CTestCustom.cmake
index f9588041450..b688421f328 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/CTestCustom.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/CTestCustom.cmake
@@ -19,7 +19,11 @@ set (CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 50000)
set (CTEST_CUSTOM_WARNING_EXCEPTION
${CTEST_CUSTOM_WARNING_EXCEPTION}
"note.*expected.*void.*but argument is of type.*volatile"
+ "plugin-build.*:[ \t]*warning"
+ "stamp.verify"
+ "CMake Warning*stamp"
"src.ZLIB.*:[ \t]*warning"
+ "src.HDF5_ZLIB.*:[ \t]*warning"
"warning LNK4197:.*ZLIB-prefix"
"src.SZIP.*:[ \t]*warning"
# "POSIX name for this item is deprecated"
@@ -30,6 +34,15 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION
# "note: expanded from macro"
# HDDFFV-11074
"This directive is not standard"
+ ".*note.*expected.*void.*but argument is of type.*volatile.*"
+ ".*src.SZIP.*:[ \t]*warning.*"
+ ".*src.ZLIB.*:[ \t]*warning.*"
+ ".*src.HDF5_ZLIB.*:[ \t]*warning.*"
+ ".*src.JPEG.*:[ \t]*warning.*"
+ ".*POSIX name for this item is deprecated.*"
+ ".*disabling jobserver mode.*"
+ ".*warning.*implicit declaration of function.*"
+ ".*note: expanded from macro.*"
)
set (CTEST_CUSTOM_MEMCHECK_IGNORE
@@ -39,6 +52,9 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
H5TEST-error_test #uses runTest.cmake
H5TEST-err_compat #uses runTest.cmake
H5TEST-testlibinfo #uses grepTest.cmake
+ H5SHELL-test_flush_refresh #uses shell script
+ H5SHELL-test_flush_refresh #uses shell script
+ H5SHELL-test_vds_swmr #uses shell script
#########
H5TEST-clear-objects
H5TEST-cache-clear-objects
@@ -53,19 +69,32 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
H5TEST-vds_env-clear-objects
PERFORM_h5perform-clear-objects
HL_test-clear-objects
+ HL_test-clean-objects
HL_FORTRAN_test-clear-objects
+ HL_FORTRAN_test-clean-objects
FORTRAN_testhdf5-clear-objects
+ FORTRAN_testhdf5-clean-objects
FORTRAN_flush1-clear-objects
+ FORTRAN_flush1-clean-objects
CPP_testhdf5-clear-objects
+ CPP_testhdf5-clean-objects
######### examples #########
EXAMPLES-clear-objects
+ EXAMPLES-clean-objects
CPP_ex-clear-objects
+ CPP_ex-clean-objects
CPP_ex_tutr-clear-objects
+ CPP_ex_tutr-clean-objects
HL_ex-clear-objects
+ HL_ex-clean-objects
f90_ex-clear-objects
+ f90_ex-clean-objects
HL_CPP_ptableTest-clear-objects
+ HL_CPP_ptableTest-clean-objects
HL_CPP_ex_ptExampleFL-clear-objects
+ HL_CPP_ex_ptExampleFL-clean-objects
HL_FORTRAN_f90_ex-clear-objects
+ HL_FORTRAN_f90_ex-clean-objects
######### tools/h5clear #########
H5CLEAR-clearall-objects
H5CLEAR-h5clear_gentest # does not close ids by design
@@ -146,32 +175,6 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
H5REPACK_STAT-SPT_FSM_AGGR-clear-objects
H5REPACK_STAT-STG_PAGE-clear-objects
#########
- H5REPACK_META-meta_long
- H5REPACK_META-meta_short
- #########
- H5REPACK-gzip_verbose_filters #uses runTest.cmake
- H5REPACK_VERIFY_LAYOUT-dset2_chunk_20x10 #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT_ALL-chunk_20x10 #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT-dset2_conti #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT_ALL-conti #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT-dset2_compa #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT_ALL-compa #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT-dset_compa_conti #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT-dset_compa_chunk #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT-dset_compa_compa #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT-dset_conti_compa #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT-dset_conti_chunk #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT-dset_conti_conti #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT-chunk_compa #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT-chunk_conti #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT-chunk_18x13 #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT-contig_small_compa #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT-contig_small_fixed_compa #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT_ALL-layout_long_switches #uses grepTest.cmake
- H5REPACK_VERIFY_LAYOUT_ALL-layout_short_switches #uses grepTest.cmake
- H5REPACK-plugin
- H5REPACK_CMP-plugin_zero
- #########
ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-latest_latest_invalid-clear-objects
H5REPACK_VERIFY_SUPERBLOCK-SB_IS_0-clear-objects
H5REPACK_VERIFY_SUPERBLOCK-SB_IS_2-clear-objects
@@ -185,5 +188,7 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
PERFORM_h5perform-clearall-objects
######### hl/tools #########
HL_TOOLS-clear-objects
+ HL_TOOLS-clean-objects
H5WATCH-clearall-objects
+ H5WATCH-cleanall-objects
)
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConfigureChecks.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConfigureChecks.cmake
index b7130e9a7d7..70a82729271 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConfigureChecks.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConfigureChecks.cmake
@@ -12,53 +12,478 @@
#-----------------------------------------------------------------------------
# Include all the necessary files for macros
#-----------------------------------------------------------------------------
+include (CheckFunctionExists)
+include (CheckIncludeFile)
+include (CheckIncludeFiles)
+include (CheckLibraryExists)
+include (CheckSymbolExists)
+include (CheckTypeSize)
+include (CheckVariableExists)
+include (TestBigEndian)
+include (CheckStructHasMember)
+
set (HDF_PREFIX "H5")
-include (${HDF_RESOURCES_EXT_DIR}/ConfigureChecks.cmake)
-if (HDF5_ENABLE_USING_MEMCHECKER)
- set (${HDF_PREFIX}_USING_MEMCHECKER 1)
+# Check for Darwin (not just Apple - we also want to catch OpenDarwin)
+if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set (${HDF_PREFIX}_HAVE_DARWIN 1)
+endif ()
+
+# Check for Solaris
+if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ set (${HDF_PREFIX}_HAVE_SOLARIS 1)
endif ()
#-----------------------------------------------------------------------------
-# Option for --enable-strict-format-checks
+# This MACRO checks IF the symbol exists in the library and IF it
+# does, it appends library to the list.
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
-option (HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF)
+set (LINK_LIBS "")
+set (LINK_PUB_LIBS "")
+macro (CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
+ CHECK_LIBRARY_EXISTS ("${LIBRARY};${LINK_LIBS}" ${SYMBOL} "" ${VARIABLE})
+ if (${VARIABLE})
+ set (LINK_LIBS ${LINK_LIBS} ${LIBRARY})
+ endif ()
+endmacro ()
+
+# ----------------------------------------------------------------------
+# WINDOWS Hard code Values
+# ----------------------------------------------------------------------
+set (WINDOWS)
+
+if (MINGW)
+ set (${HDF_PREFIX}_HAVE_MINGW 1)
+ set (WINDOWS 1) # MinGW tries to imitate Windows
+ set (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1")
+ set (__USE_MINGW_ANSI_STDIO 1)
+endif ()
+
+if (WIN32 AND NOT MINGW)
+ if (NOT UNIX)
+ set (WINDOWS 1)
+ set (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1")
+ if (MSVC)
+ set (${HDF_PREFIX}_HAVE_VISUAL_STUDIO 1)
+ endif ()
+ endif ()
+endif ()
+
+if (WINDOWS)
+ set (HDF5_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
+ set (${HDF_PREFIX}_HAVE_WIN32_API 1)
+ set (${HDF_PREFIX}_HAVE_LIBM 1)
+ set (${HDF_PREFIX}_HAVE_STRDUP 1)
+ if (NOT MINGW)
+ set (${HDF_PREFIX}_HAVE_GETHOSTNAME 1)
+ endif ()
+ if (NOT UNIX AND NOT CYGWIN)
+ set (${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO 1)
+ if (MSVC_VERSION GREATER_EQUAL 1900)
+ set (${HDF_PREFIX}_HAVE_TIMEZONE 1)
+ endif ()
+ set (${HDF_PREFIX}_HAVE_GETTIMEOFDAY 1)
+ set (${HDF_PREFIX}_HAVE_LIBWS2_32 1)
+ set (${HDF_PREFIX}_HAVE_LIBWSOCK32 1)
+ endif ()
+endif ()
+
+# ----------------------------------------------------------------------
+# END of WINDOWS Hard code Values
+# ----------------------------------------------------------------------
+
+if (NOT WINDOWS)
+ TEST_BIG_ENDIAN (${HDF_PREFIX}_WORDS_BIGENDIAN)
+endif ()
+
+#-----------------------------------------------------------------------------
+# Check IF header file exists and add it to the list.
+#-----------------------------------------------------------------------------
+macro (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
+ CHECK_INCLUDE_FILES ("${USE_INCLUDES};${FILE}" ${VARIABLE})
+ if (${VARIABLE})
+ set (USE_INCLUDES ${USE_INCLUDES} ${FILE})
+ endif ()
+endmacro ()
+
+#-----------------------------------------------------------------------------
+# Check for the existence of certain header files
+#-----------------------------------------------------------------------------
+CHECK_INCLUDE_FILE_CONCAT ("sys/file.h" ${HDF_PREFIX}_HAVE_SYS_FILE_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/ioctl.h" ${HDF_PREFIX}_HAVE_SYS_IOCTL_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/resource.h" ${HDF_PREFIX}_HAVE_SYS_RESOURCE_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/socket.h" ${HDF_PREFIX}_HAVE_SYS_SOCKET_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/stat.h" ${HDF_PREFIX}_HAVE_SYS_STAT_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/time.h" ${HDF_PREFIX}_HAVE_SYS_TIME_H)
+CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" ${HDF_PREFIX}_HAVE_SYS_TYPES_H)
+CHECK_INCLUDE_FILE_CONCAT ("features.h" ${HDF_PREFIX}_HAVE_FEATURES_H)
+CHECK_INCLUDE_FILE_CONCAT ("dirent.h" ${HDF_PREFIX}_HAVE_DIRENT_H)
+CHECK_INCLUDE_FILE_CONCAT ("unistd.h" ${HDF_PREFIX}_HAVE_UNISTD_H)
+CHECK_INCLUDE_FILE_CONCAT ("pwd.h" ${HDF_PREFIX}_HAVE_PWD_H)
+CHECK_INCLUDE_FILE_CONCAT ("pthread.h" ${HDF_PREFIX}_HAVE_PTHREAD_H)
+CHECK_INCLUDE_FILE_CONCAT ("dlfcn.h" ${HDF_PREFIX}_HAVE_DLFCN_H)
+CHECK_INCLUDE_FILE_CONCAT ("netinet/in.h" ${HDF_PREFIX}_HAVE_NETINET_IN_H)
+CHECK_INCLUDE_FILE_CONCAT ("netdb.h" ${HDF_PREFIX}_HAVE_NETDB_H)
+CHECK_INCLUDE_FILE_CONCAT ("arpa/inet.h" ${HDF_PREFIX}_HAVE_ARPA_INET_H)
+if (WINDOWS)
+ CHECK_INCLUDE_FILE_CONCAT ("shlwapi.h" ${HDF_PREFIX}_HAVE_SHLWAPI_H)
+ # Checking for StrStrIA in the library is not reliable for mingw32 to stdcall
+ set (LINK_PUB_LIBS ${LINK_PUB_LIBS} "shlwapi")
+endif ()
+
+## Check for non-standard extension quadmath.h
+
+# gcc puts symbols like FLT128_DIG in quadmath.h instead of float.h, so
+# check for that. This is only used by the build system and doesn't need
+# to be exported to H5pubconf.h.
+CHECK_INCLUDE_FILES("quadmath.h" INCLUDE_QUADMATH_H)
+# Convert TRUE/FALSE to 0/1 for preprocessor values in test code, below
+if (${INCLUDE_QUADMATH_H})
+ set(C_INCLUDE_QUADMATH_H 1)
else ()
-set(HDF5_STRICT_FORMAT_CHECKS OFF)
+ set(C_INCLUDE_QUADMATH_H 0)
endif ()
-if (HDF5_STRICT_FORMAT_CHECKS)
- set (${HDF_PREFIX}_STRICT_FORMAT_CHECKS 1)
+
+if (CYGWIN)
+ set (CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE")
+ add_definitions ("-D_GNU_SOURCE")
endif ()
-MARK_AS_ADVANCED (HDF5_STRICT_FORMAT_CHECKS)
#-----------------------------------------------------------------------------
-# Option for --enable-threadsafe
+# Check for the math library "m"
#-----------------------------------------------------------------------------
-# Recursive RW locks are not supported on Windows (yet)
-if (NOT WINDOWS)
- if (FALSE) # XXX(kitware): Hardcode settings.
- option (HDF5_USE_RECURSIVE_RW_LOCKS "Whether to use recursive RW locks for thread-safety" OFF)
+if (MINGW OR NOT WINDOWS)
+ CHECK_LIBRARY_EXISTS_CONCAT ("m" ceil ${HDF_PREFIX}_HAVE_LIBM)
+ CHECK_LIBRARY_EXISTS_CONCAT ("dl" dlopen ${HDF_PREFIX}_HAVE_LIBDL)
+ CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" WSAStartup ${HDF_PREFIX}_HAVE_LIBWS2_32)
+ CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" gethostbyname ${HDF_PREFIX}_HAVE_LIBWSOCK32)
+endif ()
+
+# UCB (BSD) compatibility library
+CHECK_LIBRARY_EXISTS_CONCAT ("ucb" gethostname ${HDF_PREFIX}_HAVE_LIBUCB)
+
+# For other tests to use the same libraries
+set (HDF5_REQUIRED_LIBRARIES ${HDF5_REQUIRED_LIBRARIES} ${LINK_LIBS})
+
+set (USE_INCLUDES "")
+if (WINDOWS)
+ set (USE_INCLUDES ${USE_INCLUDES} "windows.h")
+endif ()
+
+# For other specific tests, use this MACRO.
+macro (HDF_FUNCTION_TEST OTHER_TEST)
+ if (NOT DEFINED ${HDF_PREFIX}_${OTHER_TEST})
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
+
+ foreach (def
+ HAVE_SYS_TIME_H
+ HAVE_UNISTD_H
+ HAVE_SYS_TYPES_H
+ HAVE_SYS_SOCKET_H
+ )
+ if ("${${HDF_PREFIX}_${def}}")
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
+ endif ()
+ endforeach ()
+
+ if (LARGEFILE)
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS
+ "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
+ )
+ endif ()
+
+ message (TRACE "Performing ${OTHER_TEST}")
+ try_compile (${OTHER_TEST}
+ ${CMAKE_BINARY_DIR}
+ ${HDF_RESOURCES_DIR}/HDFTests.c
+ COMPILE_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS}"
+ LINK_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}"
+ OUTPUT_VARIABLE OUTPUT
+ )
+ if (${OTHER_TEST})
+ set (${HDF_PREFIX}_${OTHER_TEST} 1 CACHE INTERNAL "Other test ${FUNCTION}")
+ message (VERBOSE "Performing Other Test ${OTHER_TEST} - Success")
+ else ()
+ message (VERBOSE "Performing Other Test ${OTHER_TEST} - Failed")
+ set (${HDF_PREFIX}_${OTHER_TEST} "" CACHE INTERNAL "Other test ${FUNCTION}")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Performing Other Test ${OTHER_TEST} failed with the following output:\n"
+ "${OUTPUT}\n"
+ )
+ endif ()
+ endif ()
+endmacro ()
+
+#-----------------------------------------------------------------------------
+# Platform-specific flags
+#-----------------------------------------------------------------------------
+
+set (HDF_EXTRA_C_FLAGS)
+
+# Linux-specific flags
+if (CMAKE_SYSTEM_NAME MATCHES "Linux")
+ # This was originally defined as _POSIX_SOURCE which was updated to
+ # _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX
+ # functionality so clock_gettime and CLOCK_MONOTONIC are defined
+ # correctly. This was later updated to 200112L so that
+ # posix_memalign() is visible for the direct VFD code on Linux
+ # systems. Even later, this was changed to 200809L to support
+ # pread/pwrite in VFDs.
+ #
+ # POSIX feature information can be found in the gcc manual at:
+ # http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
+ set (HDF_EXTRA_C_FLAGS -D_POSIX_C_SOURCE=200809L)
+
+ # Need to add this so that O_DIRECT is visible for the direct
+ # VFD on Linux systems.
+ set (HDF_EXTRA_C_FLAGS ${HDF_EXTRA_C_FLAGS} -D_GNU_SOURCE)
+
+ # Set up large file support. This is only necessary on 32-bit systems
+ # but is used on all Linux systems. It has no effect on 64-bit systems
+ # so it's not worth hacking up a 32/64-bit test to selectively include it.
+ #
+ # The library currently does not use any of the 64-flavored API calls
+ # or types
+ set (HDF_EXTRA_C_FLAGS ${HDF_EXTRA_C_FLAGS} -D_LARGEFILE_SOURCE)
+ set (HDF_EXTRA_C_FLAGS ${HDF_EXTRA_C_FLAGS} -D_FILE_OFFSET_BITS=64)
+
+ set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF_EXTRA_C_FLAGS})
+endif ()
+
+# As of 2024, both AIX and Solaris are uncommon, but still exist! The default
+# compiler options are also often set to -m32, which produces 32-bit binaries.
+
+# 32-bit AIX compiles might require _LARGE_FILES, but we don't have a system on
+# which to test this (yet).
+#
+# https://www.ibm.com/docs/en/aix/7.1?topic=volumes-writing-programs-that-access-large-files
+
+# 32-bit Solaris probably needs _LARGEFILE_SOURCE and _FILE_OFFSET_BITS=64,
+# as in Linux, above.
+#
+# https://docs.oracle.com/cd/E23824_01/html/821-1474/lfcompile-5.html
+
+# MinGW and Cygwin
+if (MINGW OR CYGWIN)
+ set (CMAKE_REQUIRED_DEFINITIONS
+ "${CURRENT_TEST_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
+ )
+endif ()
+
+#-----------------------------------------------------------------------------
+# Check the size in bytes of all the int and float types
+#-----------------------------------------------------------------------------
+macro (HDF_CHECK_TYPE_SIZE type var)
+ set (aType ${type})
+ set (aVar ${var})
+ message (TRACE "Checking size of ${aType} and storing into ${aVar}")
+ CHECK_TYPE_SIZE (${aType} ${aVar})
+ if (NOT ${aVar})
+ set (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}")
+ message (TRACE "Size of ${aType} was NOT Found")
+ endif ()
+endmacro ()
+
+HDF_CHECK_TYPE_SIZE (char ${HDF_PREFIX}_SIZEOF_CHAR)
+HDF_CHECK_TYPE_SIZE (short ${HDF_PREFIX}_SIZEOF_SHORT)
+HDF_CHECK_TYPE_SIZE (int ${HDF_PREFIX}_SIZEOF_INT)
+HDF_CHECK_TYPE_SIZE (unsigned ${HDF_PREFIX}_SIZEOF_UNSIGNED)
+if (NOT APPLE)
+ HDF_CHECK_TYPE_SIZE (long ${HDF_PREFIX}_SIZEOF_LONG)
+endif ()
+HDF_CHECK_TYPE_SIZE ("long long" ${HDF_PREFIX}_SIZEOF_LONG_LONG)
+
+HDF_CHECK_TYPE_SIZE (float ${HDF_PREFIX}_SIZEOF_FLOAT)
+HDF_CHECK_TYPE_SIZE (double ${HDF_PREFIX}_SIZEOF_DOUBLE)
+HDF_CHECK_TYPE_SIZE ("long double" ${HDF_PREFIX}_SIZEOF_LONG_DOUBLE)
+
+HDF_CHECK_TYPE_SIZE (int8_t ${HDF_PREFIX}_SIZEOF_INT8_T)
+HDF_CHECK_TYPE_SIZE (uint8_t ${HDF_PREFIX}_SIZEOF_UINT8_T)
+HDF_CHECK_TYPE_SIZE (int_least8_t ${HDF_PREFIX}_SIZEOF_INT_LEAST8_T)
+HDF_CHECK_TYPE_SIZE (uint_least8_t ${HDF_PREFIX}_SIZEOF_UINT_LEAST8_T)
+HDF_CHECK_TYPE_SIZE (int_fast8_t ${HDF_PREFIX}_SIZEOF_INT_FAST8_T)
+HDF_CHECK_TYPE_SIZE (uint_fast8_t ${HDF_PREFIX}_SIZEOF_UINT_FAST8_T)
+
+HDF_CHECK_TYPE_SIZE (int16_t ${HDF_PREFIX}_SIZEOF_INT16_T)
+HDF_CHECK_TYPE_SIZE (uint16_t ${HDF_PREFIX}_SIZEOF_UINT16_T)
+HDF_CHECK_TYPE_SIZE (int_least16_t ${HDF_PREFIX}_SIZEOF_INT_LEAST16_T)
+HDF_CHECK_TYPE_SIZE (uint_least16_t ${HDF_PREFIX}_SIZEOF_UINT_LEAST16_T)
+HDF_CHECK_TYPE_SIZE (int_fast16_t ${HDF_PREFIX}_SIZEOF_INT_FAST16_T)
+HDF_CHECK_TYPE_SIZE (uint_fast16_t ${HDF_PREFIX}_SIZEOF_UINT_FAST16_T)
+
+HDF_CHECK_TYPE_SIZE (int32_t ${HDF_PREFIX}_SIZEOF_INT32_T)
+HDF_CHECK_TYPE_SIZE (uint32_t ${HDF_PREFIX}_SIZEOF_UINT32_T)
+HDF_CHECK_TYPE_SIZE (int_least32_t ${HDF_PREFIX}_SIZEOF_INT_LEAST32_T)
+HDF_CHECK_TYPE_SIZE (uint_least32_t ${HDF_PREFIX}_SIZEOF_UINT_LEAST32_T)
+HDF_CHECK_TYPE_SIZE (int_fast32_t ${HDF_PREFIX}_SIZEOF_INT_FAST32_T)
+HDF_CHECK_TYPE_SIZE (uint_fast32_t ${HDF_PREFIX}_SIZEOF_UINT_FAST32_T)
+
+HDF_CHECK_TYPE_SIZE (int64_t ${HDF_PREFIX}_SIZEOF_INT64_T)
+HDF_CHECK_TYPE_SIZE (uint64_t ${HDF_PREFIX}_SIZEOF_UINT64_T)
+HDF_CHECK_TYPE_SIZE (int_least64_t ${HDF_PREFIX}_SIZEOF_INT_LEAST64_T)
+HDF_CHECK_TYPE_SIZE (uint_least64_t ${HDF_PREFIX}_SIZEOF_UINT_LEAST64_T)
+HDF_CHECK_TYPE_SIZE (int_fast64_t ${HDF_PREFIX}_SIZEOF_INT_FAST64_T)
+HDF_CHECK_TYPE_SIZE (uint_fast64_t ${HDF_PREFIX}_SIZEOF_UINT_FAST64_T)
+
+HDF_CHECK_TYPE_SIZE (size_t ${HDF_PREFIX}_SIZEOF_SIZE_T)
+HDF_CHECK_TYPE_SIZE (ssize_t ${HDF_PREFIX}_SIZEOF_SSIZE_T)
+if (NOT ${HDF_PREFIX}_SIZEOF_SSIZE_T)
+ set (${HDF_PREFIX}_SIZEOF_SSIZE_T 0)
+endif ()
+if (MINGW OR NOT WINDOWS)
+ HDF_CHECK_TYPE_SIZE (ptrdiff_t ${HDF_PREFIX}_SIZEOF_PTRDIFF_T)
+endif ()
+
+HDF_CHECK_TYPE_SIZE (off_t ${HDF_PREFIX}_SIZEOF_OFF_T)
+HDF_CHECK_TYPE_SIZE (time_t ${HDF_PREFIX}_SIZEOF_TIME_T)
+
+#-----------------------------------------------------------------------------
+# Extra C99 types
+#-----------------------------------------------------------------------------
+
+# Size of bool
+set (CMAKE_EXTRA_INCLUDE_FILES stdbool.h)
+HDF_CHECK_TYPE_SIZE (_Bool ${HDF_PREFIX}_SIZEOF_BOOL)
+
+if (MINGW OR NOT WINDOWS)
+ #-----------------------------------------------------------------------------
+ # Check if the dev_t type is a scalar type
+ #-----------------------------------------------------------------------------
+ HDF_FUNCTION_TEST (DEV_T_IS_SCALAR)
+
+ # ----------------------------------------------------------------------
+ # Check for MONOTONIC_TIMER support (used in clock_gettime). This has
+ # to be done after any POSIX/BSD defines to ensure that the test gets
+ # the correct POSIX level on linux.
+ CHECK_VARIABLE_EXISTS (CLOCK_MONOTONIC HAVE_CLOCK_MONOTONIC)
+
+ #-----------------------------------------------------------------------------
+ # Check a bunch of time functions
+ #-----------------------------------------------------------------------------
+ CHECK_STRUCT_HAS_MEMBER("struct tm" tm_gmtoff "time.h" ${HDF_PREFIX}_HAVE_TM_GMTOFF)
+ CHECK_STRUCT_HAS_MEMBER("struct tm" __tm_gmtoff "time.h" ${HDF_PREFIX}_HAVE___TM_GMTOFF)
+ if (${HDF_PREFIX}_HAVE_SYS_TIME_H)
+ CHECK_STRUCT_HAS_MEMBER("struct tm" tz_minuteswest "sys/types.h;sys/time.h;time.h" ${HDF_PREFIX}_HAVE_STRUCT_TIMEZONE)
else ()
- set(HDF5_USE_RECURSIVE_RW_LOCKS OFF)
+ CHECK_STRUCT_HAS_MEMBER("struct tm" tz_minuteswest "sys/types.h;time.h" ${HDF_PREFIX}_HAVE_STRUCT_TIMEZONE)
+ endif ()
+ CHECK_FUNCTION_EXISTS (gettimeofday ${HDF_PREFIX}_HAVE_GETTIMEOFDAY)
+ foreach (time_test
+# HAVE_TIMEZONE
+ HAVE_TM_ZONE
+ HAVE_STRUCT_TM_TM_ZONE
+ )
+ HDF_FUNCTION_TEST (${time_test})
+ endforeach ()
+ if (NOT CYGWIN AND NOT MINGW)
+ HDF_FUNCTION_TEST (HAVE_TIMEZONE)
+ endif ()
+
+ # ----------------------------------------------------------------------
+ # Does the struct stat have the st_blocks field? This field is not POSIX.
+ #
+ CHECK_STRUCT_HAS_MEMBER("struct stat" st_blocks "sys/types.h;sys/stat.h" ${HDF_PREFIX}_HAVE_STAT_ST_BLOCKS)
+
+ # ----------------------------------------------------------------------
+ # How do we figure out the width of a tty in characters?
+ #
+ CHECK_FUNCTION_EXISTS (ioctl ${HDF_PREFIX}_HAVE_IOCTL)
+ CHECK_STRUCT_HAS_MEMBER ("struct videoconfig" numtextcols "" ${HDF_PREFIX}_HAVE_STRUCT_VIDEOCONFIG)
+ CHECK_STRUCT_HAS_MEMBER ("struct text_info" screenwidth "" ${HDF_PREFIX}_HAVE_STRUCT_TEXT_INFO)
+ CHECK_FUNCTION_EXISTS (_getvideoconfig ${HDF_PREFIX}_HAVE__GETVIDEOCONFIG)
+ CHECK_FUNCTION_EXISTS (gettextinfo ${HDF_PREFIX}_HAVE_GETTEXTINFO)
+ CHECK_FUNCTION_EXISTS (_scrsize ${HDF_PREFIX}_HAVE__SCRSIZE)
+ if (NOT CYGWIN)
+ CHECK_FUNCTION_EXISTS (GetConsoleScreenBufferInfo ${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO)
endif ()
- if (HDF5_USE_RECURSIVE_RW_LOCKS)
- set (${HDF_PREFIX}_USE_RECURSIVE_RW_LOCKS 1)
+ CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGWINSZ)
+ CHECK_SYMBOL_EXISTS (TIOCGETD "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGETD)
+endif ()
+
+#-----------------------------------------------------------------------------
+# Check for some functions that are used
+#
+CHECK_FUNCTION_EXISTS (alarm ${HDF_PREFIX}_HAVE_ALARM)
+CHECK_FUNCTION_EXISTS (fcntl ${HDF_PREFIX}_HAVE_FCNTL)
+CHECK_FUNCTION_EXISTS (flock ${HDF_PREFIX}_HAVE_FLOCK)
+CHECK_FUNCTION_EXISTS (fork ${HDF_PREFIX}_HAVE_FORK)
+
+CHECK_FUNCTION_EXISTS (gethostname ${HDF_PREFIX}_HAVE_GETHOSTNAME)
+CHECK_FUNCTION_EXISTS (getrusage ${HDF_PREFIX}_HAVE_GETRUSAGE)
+
+CHECK_FUNCTION_EXISTS (pread ${HDF_PREFIX}_HAVE_PREAD)
+CHECK_FUNCTION_EXISTS (pwrite ${HDF_PREFIX}_HAVE_PWRITE)
+CHECK_FUNCTION_EXISTS (rand_r ${HDF_PREFIX}_HAVE_RAND_R)
+CHECK_FUNCTION_EXISTS (random ${HDF_PREFIX}_HAVE_RANDOM)
+
+CHECK_FUNCTION_EXISTS (strcasestr ${HDF_PREFIX}_HAVE_STRCASESTR)
+CHECK_FUNCTION_EXISTS (strdup ${HDF_PREFIX}_HAVE_STRDUP)
+CHECK_FUNCTION_EXISTS (symlink ${HDF_PREFIX}_HAVE_SYMLINK)
+
+CHECK_FUNCTION_EXISTS (tmpfile ${HDF_PREFIX}_HAVE_TMPFILE)
+CHECK_FUNCTION_EXISTS (asprintf ${HDF_PREFIX}_HAVE_ASPRINTF)
+CHECK_FUNCTION_EXISTS (vasprintf ${HDF_PREFIX}_HAVE_VASPRINTF)
+CHECK_FUNCTION_EXISTS (waitpid ${HDF_PREFIX}_HAVE_WAITPID)
+
+#-----------------------------------------------------------------------------
+# sigsetjmp is special; may actually be a macro
+#-----------------------------------------------------------------------------
+if (NOT ${HDF_PREFIX}_HAVE_SIGSETJMP)
+ CHECK_SYMBOL_EXISTS (sigsetjmp "setjmp.h" ${HDF_PREFIX}_HAVE_MACRO_SIGSETJMP)
+ if (${HDF_PREFIX}_HAVE_MACRO_SIGSETJMP)
+ set (${HDF_PREFIX}_HAVE_SIGSETJMP 1)
endif ()
- MARK_AS_ADVANCED (HDF5_USE_RECURSIVE_RW_LOCKS)
endif ()
+#-----------------------------------------------------------------------------
+# Check a bunch of other functions
+#-----------------------------------------------------------------------------
+if (MINGW OR NOT WINDOWS)
+ foreach (other_test
+ HAVE_ATTRIBUTE
+ HAVE_BUILTIN_EXPECT
+ SYSTEM_SCOPE_THREADS
+ HAVE_SOCKLEN_T
+ )
+ HDF_FUNCTION_TEST (${other_test})
+ endforeach ()
+endif ()
+
+# ----------------------------------------------------------------------
+# Set the flag to indicate that the machine can handle converting
+# denormalized floating-point values.
+# (This flag should be set for all machines, except for the Crays, where
+# the cache value is set in its config file)
+#-----------------------------------------------------------------------------
+set (${HDF_PREFIX}_CONVERT_DENORMAL_FLOAT 1)
+
+# ----------------------------------------------------------------------
+# Set a special flag when using memory sanity checkers like Valgrind.
+# This disables the free lists, as the memory reuse scheme they implement
+# can hide memory problems.
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_USING_MEMCHECKER)
+ set (${HDF_PREFIX}_USING_MEMCHECKER 1)
+endif ()
+
+#-----------------------------------------------------------------------------
+# Option for --enable-strict-format-checks
+#-----------------------------------------------------------------------------
+option (HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF)
+mark_as_advanced (HDF5_STRICT_FORMAT_CHECKS)
+if (HDF5_STRICT_FORMAT_CHECKS)
+ set (${HDF_PREFIX}_STRICT_FORMAT_CHECKS 1)
+endif ()
+MARK_AS_ADVANCED (HDF5_STRICT_FORMAT_CHECKS)
+
# ----------------------------------------------------------------------
# Decide whether the data accuracy has higher priority during data
-# conversions. If not, some hard conversions will still be prefered even
+# conversions. If not, some hard conversions will still be preferred even
# though the data may be wrong (for example, some compilers don't
# support denormalized floating values) to maximize speed.
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON)
-else ()
-set(HDF5_WANT_DATA_ACCURACY ON)
-endif ()
+mark_as_advanced (HDF5_WANT_DATA_ACCURACY)
if (HDF5_WANT_DATA_ACCURACY)
set (${HDF_PREFIX}_WANT_DATA_ACCURACY 1)
endif ()
@@ -70,37 +495,28 @@ MARK_AS_ADVANCED (HDF5_WANT_DATA_ACCURACY)
# for the speed optimization of hard conversions. Soft conversions can
# actually benefit little.
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON)
-else ()
-set(HDF5_WANT_DCONV_EXCEPTION ON)
-endif ()
+mark_as_advanced (HDF5_WANT_DCONV_EXCEPTION)
if (HDF5_WANT_DCONV_EXCEPTION)
set (${HDF_PREFIX}_WANT_DCONV_EXCEPTION 1)
endif ()
MARK_AS_ADVANCED (HDF5_WANT_DCONV_EXCEPTION)
# ----------------------------------------------------------------------
-# Check if they would like the function stack support compiled in
+# Check if they would like to show all warnings (not suppressed internally)
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
-option (HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF)
-else ()
-set(HDF5_ENABLE_CODESTACK OFF)
-endif ()
-if (HDF5_ENABLE_CODESTACK)
- set (${HDF_PREFIX}_HAVE_CODESTACK 1)
+option (HDF5_SHOW_ALL_WARNINGS "Show all warnings (not suppressed internally)." OFF)
+mark_as_advanced (HDF5_SHOW_ALL_WARNINGS)
+if (HDF5_SHOW_ALL_WARNINGS)
+ message (STATUS "....All warnings will be displayed")
+ set (${HDF_PREFIX}_SHOW_ALL_WARNINGS 1)
endif ()
-MARK_AS_ADVANCED (HDF5_ENABLE_CODESTACK)
+MARK_AS_ADVANCED (HDF5_SHOW_ALL_WARNINGS)
# ----------------------------------------------------------------------
# Check if they would like to use file locking by default
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_USE_FILE_LOCKING "Use file locking by default (mainly for SWMR)" ON)
-else ()
-set(HDF5_USE_FILE_LOCKING ON)
-endif ()
if (HDF5_USE_FILE_LOCKING)
set (${HDF_PREFIX}_USE_FILE_LOCKING 1)
endif ()
@@ -108,11 +524,7 @@ endif ()
# ----------------------------------------------------------------------
# Check if they would like to ignore file locks when disabled on a file system
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_IGNORE_DISABLED_FILE_LOCKS "Ignore file locks when disabled on file system" ON)
-else ()
-set(HDF5_IGNORE_DISABLED_FILE_LOCKS ON)
-endif ()
if (HDF5_IGNORE_DISABLED_FILE_LOCKS)
set (${HDF_PREFIX}_IGNORE_DISABLED_FILE_LOCKS 1)
endif ()
@@ -126,18 +538,6 @@ else ()
set (HDF5_FILE_LOCKING_SETTING "no")
endif ()
-#-----------------------------------------------------------------------------
-# Are we going to use HSIZE_T
-#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
-option (HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON)
-else ()
-set(HDF5_ENABLE_HSIZET OFF)
-endif ()
-if (HDF5_ENABLE_HSIZET)
- set (${HDF_PREFIX}_HAVE_LARGE_HSIZET 1)
-endif ()
-
# so far we have no check for this
set (${HDF_PREFIX}_HAVE_TMPFILE 1)
@@ -184,60 +584,40 @@ if (MINGW OR NOT WINDOWS)
list (APPEND LINK_LIBS posix4)
endif ()
endif ()
+
+# Check for clock_gettime() CLOCK_MONOTONIC_COARSE
+set (CMAKE_EXTRA_INCLUDE_FILES time.h)
+check_type_size(CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_COARSE_SIZE)
+if (HAVE_CLOCK_MONOTONIC_COARSE_SIZE)
+ set (${HDF_PREFIX}_HAVE_CLOCK_MONOTONIC_COARSE 1)
+endif ()
+unset (CMAKE_EXTRA_INCLUDE_FILES)
+
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
-# Check if Direct I/O driver works
+# Check whether we can build the direct VFD
#-----------------------------------------------------------------------------
-if (NOT WINDOWS)
- if (FALSE) # XXX(kitware): Hardcode settings.
- option (HDF5_ENABLE_DIRECT_VFD "Build the Direct I/O Virtual File Driver" OFF)
+option (HDF5_ENABLE_DIRECT_VFD "Build the Direct I/O Virtual File Driver" OFF)
+if (HDF5_ENABLE_DIRECT_VFD)
+ # The direct VFD is tied to POSIX direct I/O as enabled by the O_DIRECT
+ # flag. No other form of direct I/O is supported. This feature also
+ # requires posix_memalign().
+ CHECK_SYMBOL_EXISTS (O_DIRECT "fcntl.h" HAVE_O_DIRECT)
+ CHECK_SYMBOL_EXISTS (posix_memalign "stdlib.h" HAVE_POSIX_MEMALIGN)
+
+ if (HAVE_O_DIRECT AND HAVE_POSIX_MEMALIGN)
+ set (${HDF_PREFIX}_HAVE_DIRECT 1)
else ()
- set(HDF5_ENABLE_DIRECT_VFD OFF)
- endif ()
- if (HDF5_ENABLE_DIRECT_VFD)
- set (msg "Performing TEST_DIRECT_VFD_WORKS")
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "-DTEST_DIRECT_VFD_WORKS -D_GNU_SOURCE ${CMAKE_REQUIRED_FLAGS}")
- TRY_RUN (TEST_DIRECT_VFD_WORKS_RUN TEST_DIRECT_VFD_WORKS_COMPILE
- ${CMAKE_BINARY_DIR}
- ${HDF_RESOURCES_EXT_DIR}/HDFTests.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- OUTPUT_VARIABLE OUTPUT
- )
- if (TEST_DIRECT_VFD_WORKS_COMPILE)
- if (TEST_DIRECT_VFD_WORKS_RUN EQUAL "0")
- HDF_FUNCTION_TEST (HAVE_DIRECT)
- set (CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE")
- add_definitions ("-D_GNU_SOURCE")
- else ()
- set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... no")
- endif ()
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Test TEST_DIRECT_VFD_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n"
- )
- endif ()
- else ()
- set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... no")
- endif ()
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Test TEST_DIRECT_VFD_WORKS Compile failed with the following output:\n ${OUTPUT}\n"
- )
- endif ()
+ set (HDF5_ENABLE_DIRECT_VFD OFF CACHE BOOL "Build the Direct I/O Virtual File Driver" FORCE)
+ message (FATAL_ERROR "The direct VFD was requested but cannot be built.\nIt requires O_DIRECT flag support and posix_memalign()")
endif ()
endif ()
#-----------------------------------------------------------------------------
# Check if ROS3 driver can be built
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_ENABLE_ROS3_VFD "Build the ROS3 Virtual File Driver" OFF)
-else ()
-set(HDF5_ENABLE_ROS3_VFD OFF)
-endif ()
if (HDF5_ENABLE_ROS3_VFD)
find_package(CURL REQUIRED)
find_package(OpenSSL REQUIRED)
@@ -246,20 +626,16 @@ endif ()
list (APPEND LINK_LIBS ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES})
INCLUDE_DIRECTORIES (${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR})
else ()
+ set (HDF5_ENABLE_ROS3_VFD OFF CACHE BOOL "Build the ROS3 Virtual File Driver" FORCE)
message (WARNING "The Read-Only S3 VFD was requested but cannot be built.\nPlease check that openssl and cURL are available on your\nsystem, and/or re-configure without option HDF5_ENABLE_ROS3_VFD.")
endif ()
endif ()
# ----------------------------------------------------------------------
-# Check whether we can build the Mirror VFD
-# Header-check flags set in config/cmake_ext_mod/ConfigureChecks.cmake
+# Check whether we can build the mirror VFD
# ----------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_ENABLE_MIRROR_VFD "Build the Mirror Virtual File Driver" OFF)
-else ()
-set(HDF5_ENABLE_MIRROR_VFD OFF)
-endif ()
-if (H5FD_ENABLE_MIRROR_VFD)
+if (HDF5_ENABLE_MIRROR_VFD)
if ( ${HDF_PREFIX}_HAVE_NETINET_IN_H AND
${HDF_PREFIX}_HAVE_NETDB_H AND
${HDF_PREFIX}_HAVE_ARPA_INET_H AND
@@ -267,179 +643,197 @@ if (H5FD_ENABLE_MIRROR_VFD)
${HDF_PREFIX}_HAVE_FORK)
set (${HDF_PREFIX}_HAVE_MIRROR_VFD 1)
else()
- message(WARNING "The socket-based Mirror VFD was requested but cannot be built. System prerequisites are not met.")
+ set (HDF5_ENABLE_MIRROR_VFD OFF CACHE BOOL "Build the Mirror Virtual File Driver" FORCE)
+ message(WARNING "The socket-based Mirror VFD was requested but cannot be built. System prerequisites are not met.")
endif()
endif()
#-----------------------------------------------------------------------------
-# Check if C has __float128 extension
+# Check if C has __float128 extension (used for Fortran only)
#-----------------------------------------------------------------------------
-HDF_CHECK_TYPE_SIZE(__float128 _SIZEOF___FLOAT128)
-if (${_SIZEOF___FLOAT128})
- set (${HDF_PREFIX}_HAVE_FLOAT128 1)
- set (${HDF_PREFIX}_SIZEOF___FLOAT128 ${_SIZEOF___FLOAT128})
-else ()
- set (${HDF_PREFIX}_HAVE_FLOAT128 0)
- set (${HDF_PREFIX}_SIZEOF___FLOAT128 0)
-endif ()
-
-HDF_CHECK_TYPE_SIZE(_Quad _SIZEOF__QUAD)
-if (NOT ${_SIZEOF__QUAD})
- set (${HDF_PREFIX}_SIZEOF__QUAD 0)
-else ()
- set (${HDF_PREFIX}_SIZEOF__QUAD ${_SIZEOF__QUAD})
-endif ()
-
-#-----------------------------------------------------------------------------
-# The provided CMake C macros don't provide a general compile/run function
-# so this one is used.
-#-----------------------------------------------------------------------------
-set (RUN_OUTPUT_PATH_DEFAULT ${CMAKE_BINARY_DIR})
-macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR RETURN_OUTPUT_VAR)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Detecting C ${FUNCTION_NAME}")
- endif ()
- file (WRITE
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
- ${SOURCE_CODE}
- )
- TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
- COMPILE_DEFINITIONS "-D_SIZEOF___FLOAT128=${H5_SIZEOF___FLOAT128};-D_HAVE_QUADMATH_H=${H5_HAVE_QUADMATH_H}"
- COMPILE_OUTPUT_VARIABLE COMPILEOUT
- RUN_OUTPUT_VARIABLE OUTPUT_VAR
- )
- #[[ ITK Remove this variable that is never used
- set (${RETURN_OUTPUT_VAR} ${OUTPUT_VAR})
- # ITK ]]
-
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- message (VERBOSE "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ")
- message (VERBOSE "Test COMPILE_OUTPUT ${COMPILEOUT} ")
- message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- message (VERBOSE "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ")
- message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- endif ()
+if (HDF5_BUILD_FORTRAN)
+ # ----------------------------------------------------------------------
+ # __float128 checks
+ #
+ # If __float128 exists and we can determine its precision, we will use
+ # it in the Fortran interface. The checks for this require that the
+ # precision be specified via a symbol named FLT128_DIG, which might be
+ # found in quadmath.h.
+ #
+ # The checks here are based on the GNU __float128 extension type from
+ # libquadmath, which is now part of gcc. Other compilers (clang, Intel)
+ # also expose __float128 and/or __float128 may be an alias for some
+ # other 128-bit floating point type.
+ #
+ # 128-bit floating-point math is usually handled in software and is thus
+ # orders of magnitude slower than hardware-supported floating-point math.
+ #
+
+ #-----------------------------------------------------------------------------
+ # Is the __float128 type available?
+ #-----------------------------------------------------------------------------
+ HDF_FUNCTION_TEST (HAVE___FLOAT128)
+ # Convert TRUE/FALSE to 0/1 for preprocessor values in test code, below
+ if (${HAVE___FLOAT128})
+ set(C_HAVE_FLOAT128 1)
+ else ()
+ set(C_HAVE_FLOAT128 0)
+ endif ()
- if (COMPILE_RESULT_VAR)
- if (RUN_RESULT_VAR EQUAL "0")
- #[[ITK -- start Lookingin into an upstream PR to remove this problematic code
- set (${RETURN_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
- # ITK --stop ]]
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Testing C ${FUNCTION_NAME} - OK")
- endif ()
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if the C ${FUNCTION_NAME} exists passed with the following output:\n"
- "${OUTPUT_VAR}\n\n"
+ #-----------------------------------------------------------------------------
+ # Get the max decimal precision in C, checking both long double and
+ # __float128 (if available)
+ #-----------------------------------------------------------------------------
+ if (NOT CMAKE_CROSSCOMPILING)
+ #-----------------------------------------------------------------------------
+ # The provided CMake C macros don't provide a general compile/run function
+ # so this one is used.
+ #-----------------------------------------------------------------------------
+ set (RUN_OUTPUT_PATH_DEFAULT ${CMAKE_BINARY_DIR})
+ macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR RETURN_OUTPUT_VAR)
+ message (VERBOSE "Detecting C ${FUNCTION_NAME}")
+ file (WRITE
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
+ ${SOURCE_CODE}
+ )
+ if (CMAKE_VERSION VERSION_LESS 3.25)
+ set (_RUN_OUTPUT_VARIABLE "RUN_OUTPUT_VARIABLE")
+ else ()
+ set (_RUN_OUTPUT_VARIABLE "RUN_OUTPUT_STDOUT_VARIABLE")
+ endif()
+ TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
+ COMPILE_OUTPUT_VARIABLE COMPILEOUT
+ ${_RUN_OUTPUT_VARIABLE} OUTPUT_VAR
)
- else ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Testing C ${FUNCTION_NAME} - Fail")
- endif ()
- #[[ITK -- start Lookingin into an upstream PR to remove this problematic code
- set (${RETURN_VAR} 0 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
- # ITK --stop ]]
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if the C ${FUNCTION_NAME} exists failed with the following output:\n"
- "${OUTPUT_VAR}\n\n")
- endif ()
- else ()
- message (FATAL_ERROR "Compilation of C ${FUNCTION_NAME} - Failed")
- endif ()
-endmacro ()
-set (PROG_SRC
- "
+ set (${RETURN_OUTPUT_VAR} ${OUTPUT_VAR})
+
+ message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ message (VERBOSE "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ")
+ message (VERBOSE "Test COMPILE_OUTPUT ${COMPILEOUT} ")
+ message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ message (VERBOSE "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ")
+ message (VERBOSE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+
+ if (COMPILE_RESULT_VAR)
+ if (RUN_RESULT_VAR EQUAL "0")
+ set (${RETURN_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
+ message (VERBOSE "Testing C ${FUNCTION_NAME} - OK")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ "Determining if the C ${FUNCTION_NAME} exists passed with the following output:\n"
+ "${OUTPUT_VAR}\n\n"
+ )
+ else ()
+ message (VERBOSE "Testing C ${FUNCTION_NAME} - Fail")
+ set (${RETURN_VAR} 0 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ "Determining if the C ${FUNCTION_NAME} exists failed with the following output:\n"
+ "${OUTPUT_VAR}\n\n")
+ endif ()
+ else ()
+ message (FATAL_ERROR "Compilation of C ${FUNCTION_NAME} - Failed")
+ endif ()
+ endmacro ()
+ set (PROG_SRC
+ "
#include \n\
#include \n\
-#define CHECK_FLOAT128 _SIZEOF___FLOAT128\n\
-#if CHECK_FLOAT128!=0\n\
-#if _HAVE_QUADMATH_H!=0\n\
-#include \n\
-#endif\n\
-#ifdef FLT128_DIG\n\
-#define C_FLT128_DIG FLT128_DIG\n\
-#else\n\
-#define C_FLT128_DIG 0\n\
-#endif\n\
+#if ${C_HAVE_FLOAT128}\n\
+# if ${C_INCLUDE_QUADMATH_H}\n\
+# include \n\
+# endif\n\
+# ifdef FLT128_DIG\n\
+# define C_FLT128_DIG FLT128_DIG\n\
+# else\n\
+# define C_FLT128_DIG 0\n\
+# endif\n\
#else\n\
-#define C_FLT128_DIG 0\n\
+# define C_FLT128_DIG 0\n\
#endif\n\
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\n\
#define C_LDBL_DIG DECIMAL_DIG\n\
-#else\n\
-#define C_LDBL_DIG LDBL_DIG\n\
-#endif\n\nint main() {\nprintf(\"\\%d\\\;\\%d\\\;\", C_LDBL_DIG, C_FLT128_DIG)\\\;\n\nreturn 0\\\;\n}\n
- "
-)
-
-C_RUN ("maximum decimal precision for C" ${PROG_SRC} PROG_RES PROG_OUTPUT4)
-#[[ ITK -- start
-message (STATUS "Testing maximum decimal precision for C - ${PROG_OUTPUT4}")
-# ITK -- stop ]]
-
-# dnl The output from the above program will be:
-# dnl -- long double decimal precision -- __float128 decimal precision
-
-list (GET PROG_OUTPUT4 0 H5_LDBL_DIG)
-list (GET PROG_OUTPUT4 1 H5_FLT128_DIG)
-
-if (${HDF_PREFIX}_SIZEOF___FLOAT128 EQUAL "0" OR FLT128_DIG EQUAL "0")
- set (${HDF_PREFIX}_HAVE_FLOAT128 0)
- set (${HDF_PREFIX}_SIZEOF___FLOAT128 0)
- set (_PAC_C_MAX_REAL_PRECISION ${H5_LDBL_DIG})
-else ()
- set (_PAC_C_MAX_REAL_PRECISION ${H5_FLT128_DIG})
-endif ()
-if (NOT ${_PAC_C_MAX_REAL_PRECISION})
- set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION 0)
-else ()
- set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${_PAC_C_MAX_REAL_PRECISION})
-endif ()
-#[[ ITK -- start
-message (STATUS "maximum decimal precision for C var - ${${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION}")
-# ITK -- stop ]]
+\n\
+int main(void) {\nprintf(\"\\%d\\\;\\%d\\\;\", C_LDBL_DIG, C_FLT128_DIG)\\\;\n\nreturn 0\\\;\n}\n
+ "
+ )
+
+ C_RUN ("maximum decimal precision for C" ${PROG_SRC} PROG_RES PROG_OUTPUT4)
+ message (STATUS "Testing maximum decimal precision for C - ${PROG_OUTPUT4}")
+
+ # The output from the above program will be:
+ # -- long double decimal precision -- __float128 decimal precision
+
+ list (GET PROG_OUTPUT4 0 MY_LDBL_DIG)
+ list (GET PROG_OUTPUT4 1 MY_FLT128_DIG)
+
+ # Set configure output and behavior
+ if (${HAVE___FLOAT128} AND (${MY_FLT128_DIG} GREATER ${MY_LDBL_DIG}))
+ set (${HDF_PREFIX}_HAVE_FLOAT128 1)
+ set (_PAC_C_MAX_REAL_PRECISION ${MY_FLT128_DIG})
+ else ()
+ # No __float128 or the precision of __float128 <= that of long double
+ set (_PAC_C_MAX_REAL_PRECISION ${MY_LDBL_DIG})
+ endif ()
+
+ if (NOT ${_PAC_C_MAX_REAL_PRECISION})
+ set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION 0)
+ else ()
+ set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${_PAC_C_MAX_REAL_PRECISION})
+ endif ()
+ message (STATUS "maximum decimal precision for C var - ${${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION}")
+ else ()
+ set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION 0)
+ endif ()
+
+endif()
#-----------------------------------------------------------------------------
-# Macro to determine the various conversion capabilities
+# Macro to determine long double conversion properties
#-----------------------------------------------------------------------------
-macro (H5ConversionTests TEST msg)
+macro (H5ConversionTests TEST def msg)
if (NOT DEFINED ${TEST})
- TRY_RUN (${TEST}_RUN ${TEST}_COMPILE
- ${CMAKE_BINARY_DIR}
- ${HDF_RESOURCES_DIR}/ConversionTests.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-D${TEST}_TEST
- OUTPUT_VARIABLE OUTPUT
- )
- if (${TEST}_COMPILE)
- if (${TEST}_RUN EQUAL "0")
- set (${TEST} 1 CACHE INTERNAL ${msg})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ if (NOT CMAKE_CROSSCOMPILING)
+ # Build and run the test code if not cross-compiling
+ TRY_RUN (${TEST}_RUN ${TEST}_COMPILE
+ ${CMAKE_BINARY_DIR}
+ ${HDF_RESOURCES_DIR}/ConversionTests.c
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-D${TEST}_TEST
+ COMPILE_OUTPUT_VARIABLE ${TEST}_COMPILE_OUTPUT
+ RUN_OUTPUT_VARIABLE ${TEST}_RUN_OUTPUT
+ )
+ if (${TEST}_COMPILE)
+ if (${TEST}_RUN EQUAL "0")
+ set (${TEST} 1 CACHE INTERNAL ${msg})
message (VERBOSE "${msg}... yes")
+ else ()
+ set (${TEST} "" CACHE INTERNAL ${msg})
+ message (VERBOSE "${msg}... no")
+ file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ "Test ${TEST} Compile succeeded with the following output:\n ${${TEST}_COMPILE_OUTPUT}\n"
+ )
+ file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ "Test ${TEST} Run failed with exit code ${${TEST}_RUN} and with the following output:\n ${${TEST}_RUN_OUTPUT}\n"
+ )
endif ()
else ()
set (${TEST} "" CACHE INTERNAL ${msg})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... no")
- endif ()
+ message (VERBOSE "${msg}... no")
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Test ${TEST} Run failed with the following output and exit code:\n ${OUTPUT}\n"
+ "Test ${TEST} Compile failed with the following output:\n ${${TEST}_COMPILE_OUTPUT}\n"
)
endif ()
else ()
- set (${TEST} "" CACHE INTERNAL ${msg})
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "${msg}... no")
+ # Use the default if there's no cache variable and cross-compiling
+ if (${def})
+ message (VERBOSE "${msg}... yes (cross-compile default)")
+ set (${TEST} 1 CACHE INTERNAL ${msg})
+ else ()
+ message (VERBOSE "${msg}... no (cross-compile default)")
+ set (${TEST} "" CACHE INTERNAL ${msg})
endif ()
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Test ${TEST} Compile failed with the following output:\n ${OUTPUT}\n"
- )
endif ()
-
endif ()
endmacro ()
@@ -450,22 +844,22 @@ endmacro ()
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine is using a special algorithm to convert
# 'long double' to '(unsigned) long' values. (This flag should only be set for
-# the IBM Power6 Linux. When the bit sequence of long double is
+# the IBM Power Linux. When the bit sequence of long double is
# 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long
# is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282.
# The machine's conversion gets the correct value. We define the macro and disable
# this kind of test until we figure out what algorithm they use.
#-----------------------------------------------------------------------------
-H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LONG_SPECIAL "Checking IF your system converts long double to (unsigned) long values with special algorithm")
+H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LONG_SPECIAL FALSE "Checking IF your system converts long double to (unsigned) long values with special algorithm")
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine is using a special algorithm
# to convert some values of '(unsigned) long' to 'long double' values.
-# (This flag should be off for all machines, except for IBM Power6 Linux,
+# (This flag should be off for all machines, except for IBM Power Linux,
# when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff...,
# ..., 7fffff..., the compiler uses a unknown algorithm. We define a
# macro and skip the test for now until we know about the algorithm.
#-----------------------------------------------------------------------------
-H5ConversionTests (${HDF_PREFIX}_LONG_TO_LDOUBLE_SPECIAL "Checking IF your system can convert (unsigned) long to long double values with special algorithm")
+H5ConversionTests (${HDF_PREFIX}_LONG_TO_LDOUBLE_SPECIAL FALSE "Checking IF your system can convert (unsigned) long to long double values with special algorithm")
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can accurately convert
# 'long double' to '(unsigned) long long' values. (This flag should be set for
@@ -475,7 +869,7 @@ H5ConversionTests (${HDF_PREFIX}_LONG_TO_LDOUBLE_SPECIAL "Checking IF your syste
# 0x4351ccf385ebc8a0dfcc... or 0x4351ccf385ebc8a0ffcc... will make the converted
# values wildly wrong. This test detects this wrong behavior and disable the test.
#-----------------------------------------------------------------------------
-H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctly converting long double to (unsigned) long long values")
+H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LLONG_ACCURATE TRUE "Checking IF correctly converting long double to (unsigned) long long values")
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can accurately convert
# '(unsigned) long long' to 'long double' values. (This flag should be set for
@@ -483,13 +877,135 @@ H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LLONG_ACCURATE "Checking IF correctl
# 007fff..., 00ffff..., 01ffff..., ..., 7fffff..., the converted values are twice
# as big as they should be.
#-----------------------------------------------------------------------------
-H5ConversionTests (${HDF_PREFIX}_LLONG_TO_LDOUBLE_CORRECT "Checking IF correctly converting (unsigned) long long to long double values")
+H5ConversionTests (${HDF_PREFIX}_LLONG_TO_LDOUBLE_CORRECT TRUE "Checking IF correctly converting (unsigned) long long to long double values")
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can accurately convert
# some long double values
#-----------------------------------------------------------------------------
-H5ConversionTests (${HDF_PREFIX}_DISABLE_SOME_LDOUBLE_CONV "Checking IF the cpu is power9 and cannot correctly converting long double values")
-# ----------------------------------------------------------------------
-# Check if pointer alignments are enforced
-#-----------------------------------------------------------------------------
-H5ConversionTests (${HDF_PREFIX}_NO_ALIGNMENT_RESTRICTIONS "Checking IF alignment restrictions are strictly enforced")
+H5ConversionTests (${HDF_PREFIX}_DISABLE_SOME_LDOUBLE_CONV FALSE "Checking IF the cpu is power9 and cannot correctly converting long double values")
+
+#-----------------------------------------------------------------------------
+# Options for enabling/disabling support for non-standard features, datatypes,
+# etc. These features should still be checked for at configure time, but these
+# options allow disabling of support for these features when compiler support
+# is incomplete or broken. In this case, configure time checks may not be
+# enough to properly enable/disable a feature and can cause library build
+# problems.
+#-----------------------------------------------------------------------------
+# Option to enable or disable all non-standard features. Specific features can
+# be enabled or disabled with their respective options below
+option (HDF5_ENABLE_NONSTANDARD_FEATURES "Enable support for non-standard programming language features" ON)
+# Options for enabling or disabling individual features
+option (HDF5_ENABLE_NONSTANDARD_FEATURE_FLOAT16 "Enable support for _Float16 C datatype" ${HDF5_ENABLE_NONSTANDARD_FEATURES})
+
+#-----------------------------------------------------------------------------
+# Check if _Float16 type is available
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_NONSTANDARD_FEATURE_FLOAT16)
+ message (STATUS "Checking if _Float16 support is available")
+ HDF_CHECK_TYPE_SIZE (_Float16 ${HDF_PREFIX}_SIZEOF__FLOAT16)
+
+ if (${HDF_PREFIX}_SIZEOF__FLOAT16)
+ # Request _Float16 support
+ set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} "-D__STDC_WANT_IEC_60559_TYPES_EXT__")
+
+ # Some compilers expose the _Float16 datatype, but not the macros and
+ # functions used with the datatype. We need the macros for proper
+ # datatype conversion support. Check for these here.
+ CHECK_SYMBOL_EXISTS (FLT16_EPSILON "float.h" h5_have_flt16_epsilon)
+ CHECK_SYMBOL_EXISTS (FLT16_MIN "float.h" h5_have_flt16_min)
+ CHECK_SYMBOL_EXISTS (FLT16_MAX "float.h" h5_have_flt16_max)
+ CHECK_SYMBOL_EXISTS (FLT16_MIN_10_EXP "float.h" h5_have_flt16_min_10_exp)
+ CHECK_SYMBOL_EXISTS (FLT16_MAX_10_EXP "float.h" h5_have_flt16_max_10_exp)
+ CHECK_SYMBOL_EXISTS (FLT16_MANT_DIG "float.h" h5_have_flt16_mant_dig)
+
+ if (h5_have_flt16_epsilon AND h5_have_flt16_min AND
+ h5_have_flt16_max AND h5_have_flt16_min_10_exp AND
+ h5_have_flt16_max_10_exp AND h5_have_flt16_mant_dig)
+ # Some compilers like OneAPI on Windows appear to detect _Float16 support
+ # properly up to this point, and, in the absence of any architecture-specific
+ # tuning compiler flags, will generate code for H5Tconv.c that performs
+ # software conversions on _Float16 variables with compiler-internal functions
+ # such as __extendhfsf2, __truncsfhf2, or __truncdfhf2. However, these
+ # compilers will fail to link these functions into the build for currently
+ # unknown reasons and cause the build to fail. Since these are compiler-internal
+ # functions that we don't appear to have much control over, let's try to
+ # compile a program that will generate these functions to check for _Float16
+ # support. If we fail to compile this program, we will simply disable
+ # _Float16 support for the time being.
+ H5ConversionTests (
+ ${HDF_PREFIX}_FLOAT16_CONVERSION_FUNCS_LINK
+ FALSE
+ "Checking if compiler can convert _Float16 type with casts"
+ )
+
+ # Some compilers, notably AppleClang on MacOS 12, will succeed in the
+ # configure check above when optimization flags like -O3 are manually
+ # passed in CMAKE_C_FLAGS. However, the build will then fail when it
+ # reaches compilation of H5Tconv.c because of the issue mentioned above.
+ # MacOS 13 appears to have fixed this, but, just to be sure, make sure
+ # the check also passes without the passed in CMAKE_C_FLAGS.
+ set (cmake_c_flags_backup "${CMAKE_C_FLAGS}")
+ set (CMAKE_C_FLAGS "")
+
+ H5ConversionTests (
+ ${HDF_PREFIX}_FLOAT16_CONVERSION_FUNCS_LINK_NO_FLAGS
+ FALSE
+ "Checking if compiler can convert _Float16 type with casts (without CMAKE_C_FLAGS)"
+ )
+
+ set (CMAKE_C_FLAGS "${cmake_c_flags_backup}")
+
+ if (${HDF_PREFIX}_FLOAT16_CONVERSION_FUNCS_LINK AND ${HDF_PREFIX}_FLOAT16_CONVERSION_FUNCS_LINK_NO_FLAGS)
+ # Finally, MacOS 13 appears to have a bug specifically when converting
+ # long double values to _Float16. Release builds of the dt_arith test
+ # would cause any assignments to a _Float16 variable to be elided,
+ # whereas Debug builds would perform incorrect hardware conversions by
+ # simply chopping off all the bytes of the value except for the first 2.
+ # These tests pass on MacOS 14, so let's perform a quick test to check
+ # if the hardware conversion is done correctly.
+ H5ConversionTests (
+ ${HDF_PREFIX}_LDOUBLE_TO_FLOAT16_CORRECT
+ TRUE
+ "Checking if correctly converting long double to _Float16 values"
+ )
+
+ # Backup and clear CMAKE_C_FLAGS before performing configure check again
+ set (cmake_c_flags_backup "${CMAKE_C_FLAGS}")
+ set (CMAKE_C_FLAGS "")
+
+ H5ConversionTests (
+ ${HDF_PREFIX}_LDOUBLE_TO_FLOAT16_CORRECT_NO_FLAGS
+ TRUE
+ "Checking if correctly converting long double to _Float16 values (without CMAKE_C_FLAGS)"
+ )
+
+ set (CMAKE_C_FLAGS "${cmake_c_flags_backup}")
+
+ if (NOT ${HDF_PREFIX}_LDOUBLE_TO_FLOAT16_CORRECT OR NOT ${HDF_PREFIX}_LDOUBLE_TO_FLOAT16_CORRECT_NO_FLAGS)
+ message (VERBOSE "Conversions from long double to _Float16 appear to be incorrect. These will be emulated through a soft conversion function.")
+ endif ()
+
+ set (${HDF_PREFIX}_HAVE__FLOAT16 1)
+
+ # Check if we can use fabsf16
+ CHECK_FUNCTION_EXISTS (fabsf16 ${HDF_PREFIX}_HAVE_FABSF16)
+ else ()
+ message (STATUS "_Float16 support has been disabled because the compiler couldn't compile and run a test program for _Float16 conversions")
+ message (STATUS "Check ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log for information on why the test program couldn't be compiled/run")
+ endif ()
+ else ()
+ message (STATUS "_Float16 support has been disabled since the required macros (FLT16_MAX, FLT16_EPSILON, etc. were not found)")
+ endif ()
+ else ()
+ message (STATUS "_Float16 support has been disabled since the _Float16 type was not found")
+ endif ()
+else ()
+ set (${HDF_PREFIX}_SIZEOF__FLOAT16 0 CACHE INTERNAL "SizeOf for ${HDF_PREFIX}_SIZEOF__FLOAT16")
+ unset (${HDF_PREFIX}_HAVE__FLOAT16 CACHE)
+ unset (${HDF_PREFIX}_LDOUBLE_TO_FLOAT16_CORRECT CACHE)
+endif ()
+
+if (NOT ${HDF_PREFIX}_HAVE__FLOAT16)
+ set (HDF5_ENABLE_NONSTANDARD_FEATURE_FLOAT16 OFF CACHE BOOL "Enable support for _Float16 C datatype" FORCE)
+endif ()
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConversionTests.c b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConversionTests.c
index f80959fdc79..b5d2af2ff38 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConversionTests.c
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/ConversionTests.c
@@ -11,13 +11,13 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#if defined(__has_attribute)
-#if __has_attribute(no_sanitize)
-#define HDF_NO_UBSAN __attribute__((no_sanitize("undefined")))
+# if __has_attribute(no_sanitize)
+# define HDF_NO_UBSAN __attribute__((no_sanitize("undefined")))
+# else
+# define HDF_NO_UBSAN
+# endif
#else
-#define HDF_NO_UBSAN
-#endif
-#else
-#define HDF_NO_UBSAN
+# define HDF_NO_UBSAN
#endif
#ifdef H5_LDOUBLE_TO_LONG_SPECIAL_TEST
@@ -34,45 +34,51 @@ int HDF_NO_UBSAN main(void)
unsigned char s2[8];
int ret = 1;
- if(sizeof(long double) == 16 && sizeof(long) == 8) {
- /*make sure the long double type has 16 bytes in size and
- * 11 bits of exponent. If it is,
- *the bit sequence should be like below. It's not
- *a decent way to check but this info isn't available. */
- memcpy(s, &ld, 16);
- if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 &&
- s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 &&
- s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) {
-
- /* Assign the hexadecimal value of long double type. */
- s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3;
- s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0;
- s[8]=0xbf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c;
- s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20;
-
- memcpy(&ld, s, 16);
-
- ll = (long)ld;
- memcpy(s2, &ll, 8);
-
- /* The library's algorithm converts it to 0x 00 47 33 ce 17 af 22 82
- * and gets wrong value 20041683600089730 on the IBM Power6 Linux.
- * But the IBM Power6 Linux converts it to 0x00 47 33 ce 17 af 22 7f
- * and gets the correct value 20041683600089727. It uses some special
- * algorithm. We're going to define the macro and skip the test until
- * we can figure out how they do it. */
- if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce &&
- s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f)
- ret = 0;
+ if (sizeof(long double) == 16 && sizeof(long) == 8) {
+ /* Make sure the long double type has 16 bytes in size and
+ * 11 bits of exponent. If it is, the bit sequence should be
+ * like below. It's not a decent way to check but this info
+ * isn't available.
+ */
+ memcpy(s, &ld, 16);
+ if (s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 &&
+ s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 &&
+ s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) {
- ull = (unsigned long)ld;
- memcpy(s2, &ull, 8);
+ /* Assign the hexadecimal value of long double type. */
+ s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3;
+ s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0;
+ s[8]=0xbf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c;
+ s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20;
- /* The unsigned long is the same as signed long. */
- if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce &&
- s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f)
- ret = 0;
- }
+ memcpy(&ld, s, 16);
+
+ ll = (long)ld;
+ memcpy(s2, &ll, 8);
+
+ /* The library's algorithm converts it to 0x00 47 33 ce 17 af 22 82
+ * and gets wrong value 20041683600089730 on Linux on IBM Power
+ * architecture.
+ *
+ * But Linux on IBM Power converts it to 0x00 47 33 ce 17 af 22 7f
+ * and gets the correct value 20041683600089727. It uses some special
+ * algorithm. We're going to define the macro and skip the test until
+ * we can figure out how they do it.
+ */
+ if (s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce &&
+ s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f)
+
+ ret = 0;
+
+ ull = (unsigned long)ld;
+ memcpy(s2, &ull, 8);
+
+ /* The unsigned long is the same as signed long */
+ if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce &&
+ s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f)
+
+ ret = 0;
+ }
}
done:
@@ -94,50 +100,61 @@ int HDF_NO_UBSAN main(void)
unsigned char s[16];
int flag=0, ret=1;
- /*Determine if long double has 16 byte in size, 11 bit exponent, and
- *the bias is 0x3ff */
- if(sizeof(long double) == 16) {
- ld = 1.0L;
- memcpy(s, &ld, 16);
- if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
- s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00)
- flag = 1;
- }
+ /* Determine if long double has 16 byte in size, 11 bit exponent, and
+ * the bias is 0x3ff
+ */
+ if (sizeof(long double) == 16) {
+ ld = 1.0L;
+ memcpy(s, &ld, 16);
- if(flag==1 && sizeof(long)==8) {
- ll = 0x003fffffffffffffL;
- ld = (long double)ll;
- memcpy(s, &ld, 16);
- /* The library converts the value to 0x434fffffffffffff8000000000000000.
- * In decimal it is 18014398509481982.000000, one value short of the original.
- * The IBM Power6 Linux converts it to 0x4350000000000000bff0000000000000.
- * The value is correct in decimal. It uses some special
- * algorithm. We're going to define the macro and skip the test until
- * we can figure out how they do it. */
- if(s[0]==0x43 && s[1]==0x50 && s[2]==0x00 && s[3]==0x00 &&
- s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 &&
- s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
- s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
- ret = 0;
+ if (s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
+ s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00)
+
+ flag = 1;
}
- if(flag==1 && sizeof(unsigned long)==8) {
- ull = 0xffffffffffffffffUL;
- ld = (long double)ull;
- memcpy(s, &ld, 16);
- /* Use a different value from signed long to test. The problem is the same
- * for both long and unsigned long. The value is 18446744073709551615.
- * The library converts the value to 0x43effffffffffffffe000000000000000.
- * In decimal it's 18446744073709548544.000000, very different from the original.
- * The IBM Power6 Linux converts it to 0x43f0000000000000bff0000000000000.
- * The value is correct in decimal. It uses some special
- * algorithm. We're going to define the macro and skip the test until
- * we can figure out how they do it. */
- if(s[0]==0x43 && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
- s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 &&
- s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
- s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
- ret = 0;
+
+ if (flag==1 && sizeof(long)==8) {
+ ll = 0x003fffffffffffffL;
+ ld = (long double)ll;
+ memcpy(s, &ld, 16);
+
+ /* The library converts the value to 0x434fffffffffffff8000000000000000.
+ * In decimal it is 18014398509481982.000000, one value short of the original.
+ *
+ * Linux on IBM Power architecture converts it to
+ * 0x4350000000000000bff0000000000000. The value is correct in decimal.
+ * It uses some special algorithm. We're going to define the macro and
+ * skip the test until we can figure out how they do it.
+ */
+ if (s[0]==0x43 && s[1]==0x50 && s[2]==0x00 && s[3]==0x00 &&
+ s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 &&
+ s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
+ s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
+
+ ret = 0;
}
+
+ if (flag==1 && sizeof(unsigned long)==8) {
+ ull = 0xffffffffffffffffUL;
+ ld = (long double)ull;
+ memcpy(s, &ld, 16);
+
+ /* Use a different value from signed long to test. The problem is the
+ * same for both long and unsigned long. The value is 18446744073709551615.
+ * The library converts the value to 0x43effffffffffffffe000000000000000.
+ * In decimal it's 18446744073709548544.000000, very different from the
+ * original. Linux on IBM Power architecture converts it to
+ * 0x43f0000000000000bff0000000000000. The value is correct in decimal.
+ * It uses some special algorithm. We're going to define the macro and
+ * skip the test until we can figure out how they do it.
+ */
+ if (s[0]==0x43 && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
+ s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 &&
+ s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
+ s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
+
+ ret = 0;
+ }
done:
exit(ret);
}
@@ -157,18 +174,21 @@ int HDF_NO_UBSAN main(void)
unsigned char s[16];
int ret = 0;
- if(sizeof(long double) == 16) {
- /*make sure the long double type is the same as the failing type
- *which has 16 bytes in size and 11 bits of exponent. If it is,
- *the bit sequence should be like below. It's not
- *a decent way to check but this info isn't available. */
+ if (sizeof(long double) == 16) {
+ /* Make sure the long double type is the same as the failing type
+ * which has 16 bytes in size and 11 bits of exponent. If it is,
+ * the bit sequence should be like below. It's not
+ * a decent way to check but this info isn't available.
+ */
memcpy(s, &ld, 16);
- if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 &&
+
+ if (s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 &&
s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 &&
s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) {
- /*slightly adjust the bit sequence (s[8]=0xdf). The converted
- *values will go wild on Mac OS 10.4 and IRIX64 6.5.*/
+ /* Slightly adjust the bit sequence (s[8]=0xdf). The converted
+ * values will go wild on Mac OS 10.4 and IRIX64 6.5.
+ */
s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3;
s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0;
s[8]=0xdf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c;
@@ -178,7 +198,7 @@ int HDF_NO_UBSAN main(void)
ll = (long long)ld;
ull = (unsigned long long)ld;
- if(ll != 20041683600089728 || ull != 20041683600089728)
+ if (ll != 20041683600089728 || ull != 20041683600089728)
ret = 1;
}
}
@@ -200,114 +220,190 @@ int HDF_NO_UBSAN main(void)
unsigned char s[16];
int flag=0, ret=0;
- /*Determine if long double has 16 byte in size, 11 bit exponent, and
- *the bias is 0x3ff */
- if(sizeof(long double) == 16) {
+ /* Determine if long double has 16 byte in size, 11 bit exponent, and
+ * the bias is 0x3ff
+ */
+ if (sizeof(long double) == 16) {
ld = 1.0L;
memcpy(s, &ld, 16);
- if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
+ if (s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00)
+
flag = 1;
}
- if(flag==1 && sizeof(long long)==8) {
+ if (flag==1 && sizeof(long long)==8) {
ll = 0x01ffffffffffffffLL;
ld = (long double)ll;
memcpy(s, &ld, 16);
- /*Check if the bit sequence is as supposed to be*/
- if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff ||
+
+ /* Check if the bit sequence is as expected*/
+ if (s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff ||
s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff ||
s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00)
+
ret = 1;
}
- if(flag==1 && sizeof(unsigned long long)==8) {
+ if (flag==1 && sizeof(unsigned long long)==8) {
ull = 0x01ffffffffffffffULL;
ld = (long double)ull;
memcpy(s, &ld, 16);
- if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff ||
+
+ if (s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff ||
s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff ||
s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00)
+
ret = 1;
}
+
done:
exit(ret);
}
#endif
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS_TEST
+#ifdef H5_DISABLE_SOME_LDOUBLE_CONV_TEST
+#include
#include
#include
-typedef struct {
- size_t len;
- void *p;
-} hvl_t;
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
-extern "C"
-# endif
-int FC_DUMMY_MAIN()
-{ return 1;}
-#endif
-#endif
-int HDF_NO_UBSAN
-main ()
+int HDF_NO_UBSAN main(void)
{
+ FILE *fp;
+ char cpu[64];
- char *chp = "beefs";
- char **chpp = malloc (2 * sizeof (char *));
- char **chpp2;
- hvl_t vl = { 12345, (void *) chp };
- hvl_t *vlp;
- hvl_t *vlp2;
-
- memcpy ((void *) ((char *) chpp + 1), &chp, sizeof (char *));
- chpp2 = (char **) ((char *) chpp + 1);
- if (strcmp (*chpp2, chp)) {
- free (chpp);
- return 1;
- }
- free (chpp);
-
- vlp = malloc (2 * sizeof (hvl_t));
- memcpy ((void *) ((char *) vlp + 1), &vl, sizeof (hvl_t));
- vlp2 = (hvl_t *) ((char *) vlp + 1);
- if (vlp2->len != vl.len || vlp2->p != vl.p) {
- free (vlp);
- return 1;
- }
- free (vlp);
+ fp = popen("uname -m", "r");
+
+ fgets(cpu, sizeof(cpu)-1, fp);
+
+ pclose(fp);
- ;
- return 0;
+ if (strncmp(cpu, "ppc64le", 7) == 0)
+ return 0;
+
+ return 1;
}
#endif
-#ifdef H5_DISABLE_SOME_LDOUBLE_CONV_TEST
+#if defined(H5_FLOAT16_CONVERSION_FUNCS_LINK_TEST) || defined(H5_FLOAT16_CONVERSION_FUNCS_LINK_NO_FLAGS_TEST)
+
+#define __STDC_WANT_IEC_60559_TYPES_EXT__
-#include
#include
-#include
+#include
int HDF_NO_UBSAN main(void)
{
- FILE *fp;
- char cpu[64];
+ _Float16 fl16_var;
+ signed char sc;
+ unsigned char usc;
+ short s;
+ unsigned short us;
+ int i;
+ unsigned int ui;
+ long l;
+ unsigned long ul;
+ long long ll;
+ unsigned long long ull;
+ float f;
+ double d;
+ long double ld;
+ int ret = 0;
+
+ /*
+ * Cast the _Float16 type between all the different C datatypes
+ * we support conversions for in H5Tconv.c to check if the compiler
+ * properly links any software conversion functions it may generate
+ * for the casts, such as __extendhfsf2 or __truncdfhf2.
+ */
+
+ fl16_var = 3.0f16;
+
+ sc = (signed char)fl16_var;
+ usc = (unsigned char)fl16_var;
+ s = (short)fl16_var;
+ us = (unsigned short)fl16_var;
+ i = (int)fl16_var;
+ ui = (unsigned int)fl16_var;
+ l = (long)fl16_var;
+ ul = (unsigned long)fl16_var;
+ ll = (long long)fl16_var;
+ ull = (unsigned long long)fl16_var;
+ f = (float)fl16_var;
+ d = (double)fl16_var;
+ ld = (long double)fl16_var;
+
+ sc = (signed char)3;
+ fl16_var = (_Float16)sc;
+
+ usc = (unsigned char)3;
+ fl16_var = (_Float16)usc;
+
+ s = (short)3;
+ fl16_var = (_Float16)s;
+
+ us = (unsigned short)3;
+ fl16_var = (_Float16)us;
+
+ i = (int)3;
+ fl16_var = (_Float16)i;
+
+ ui = (unsigned int)3;
+ fl16_var = (_Float16)ui;
+
+ l = (long)3;
+ fl16_var = (_Float16)l;
+
+ ul = (unsigned long)3;
+ fl16_var = (_Float16)ul;
+
+ ll = (long long)3;
+ fl16_var = (_Float16)ll;
+
+ ull = (unsigned long long)3;
+ fl16_var = (_Float16)ull;
+
+ f = (float)3.0f;
+ fl16_var = (_Float16)f;
+
+ d = (double)3.0;
+ fl16_var = (_Float16)d;
+
+ ld = (long double)3.0l;
+ fl16_var = (_Float16)ld;
- fp = popen("uname -m", "r");
+done:
+ exit(ret);
+}
- fgets(cpu, sizeof(cpu)-1, fp);
+#endif
- pclose(fp);
+#if defined(H5_LDOUBLE_TO_FLOAT16_CORRECT_TEST) || defined(H5_LDOUBLE_TO_FLOAT16_CORRECT_NO_FLAGS_TEST)
- if(strncmp(cpu, "ppc64le", 7) == 0)
- return 0;
+#define __STDC_WANT_IEC_60559_TYPES_EXT__
- return 1;
+#include
+#include
+#include
+#include
+
+int HDF_NO_UBSAN main(void)
+{
+ long double ld;
+ _Float16 half;
+ int ret = 1;
+
+ ld = 32.0L;
+ half = 64.0f16;
+
+ half = (_Float16)ld;
+
+ if (fabsl(ld - (long double)half) < LDBL_EPSILON)
+ ret = 0;
+
+done:
+ exit(ret);
}
#endif
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/FindCIRCLE.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/FindCIRCLE.cmake
new file mode 100644
index 00000000000..b36d76cda88
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/FindCIRCLE.cmake
@@ -0,0 +1,49 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#[=======================================================================[.rst:
+FindCIRCLE
+--------
+
+Find the native CIRCLE includes and library
+
+This module defines
+
+::
+
+ CIRCLE_INCLUDE_DIR, where to find CIRCLE.h, etc.
+ CIRCLE_LIBRARIES, the libraries required to use CIRCLE.
+ CIRCLE_FOUND, If false, do not try to use CIRCLE.
+
+also defined, but not for general use are
+
+::
+
+ CIRCLE_LIBRARY, where to find the CIRCLE library.
+#]=======================================================================]
+
+if(DEFINED ENV{MFU_ROOT})
+ set(ENV{MFU_INCLUDE} "$ENV{MFU_ROOT}/include")
+ set(ENV{MFU_LIB} "$ENV{MFU_ROOT}/lib")
+ set(ENV{MFU_LIB64} "$ENV{MFU_ROOT}/lib64")
+else()
+ message("CIRCLE_LIBRARY: If you have problems building this library,\nconsider setting the MFU_ROOT environment variable to indicate\nwhere to find the support libraries and header files!")
+endif()
+
+find_path(CIRCLE_INCLUDE_DIR
+ NAMES libcircle.h
+ HINTS ENV MFU_INCLUDE)
+
+find_library(CIRCLE_LIBRARY
+ NAMES circle
+ HINTS ENV MFU_LIB ENV MFU_LIB64
+ )
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(CIRCLE REQUIRED_VARS CIRCLE_LIBRARY CIRCLE_INCLUDE_DIR)
+
+if(CIRCLE_FOUND)
+ set(CIRCLE_LIBRARIES ${CIRCLE_LIBRARY} )
+endif()
+
+mark_as_advanced(CIRCLE_INCLUDE_DIR CIRCLE_LIBRARY)
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/FindDTCMP.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/FindDTCMP.cmake
new file mode 100644
index 00000000000..b95ef20ac2b
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/FindDTCMP.cmake
@@ -0,0 +1,48 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#[=======================================================================[.rst:
+FindDTCMP
+--------
+
+Find the native DTCMP includes and library
+
+This module defines
+
+::
+
+ DTCMP_INCLUDE_DIR, where to find DTCMP.h, etc.
+ DTCMP_LIBRARIES, the libraries required to use DTCMP.
+ DTCMP_FOUND, If false, do not try to use DTCMP.
+
+also defined, but not for general use are
+
+::
+
+ DTCMP_LIBRARY, where to find the DTCMP library.
+#]=======================================================================]
+
+if(DEFINED ENV{MFU_ROOT})
+ set(ENV{MFU_INCLUDE} "$ENV{MFU_ROOT}/include")
+ set(ENV{MFU_LIB} "$ENV{MFU_ROOT}/lib")
+ set(ENV{MFU_LIB64} "$ENV{MFU_ROOT}/lib64")
+else()
+ message("DTCMP_LIBRARY: If you have problems building this library,\nconsider setting the MFU_ROOT environment variable to indicate\nwhere to find the support libraries and header files!")
+endif()
+
+find_path(DTCMP_INCLUDE_DIR
+ NAMES dtcmp.h
+ HINTS ENV MFU_INCLUDE)
+
+find_library(DTCMP_LIBRARY
+ NAMES dtcmp
+ HINTS ENV MFU_LIB ENV MFU_LIB64)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(DTCMP REQUIRED_VARS DTCMP_LIBRARY DTCMP_INCLUDE_DIR)
+
+if(DTCMP_FOUND)
+ set(DTCMP_LIBRARIES ${DTCMP_LIBRARY} )
+endif()
+
+mark_as_advanced(DTCMP_INCLUDE_DIR DTCMP_LIBRARY)
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/FindHDFS.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/FindHDFS.cmake
index e401a94fb81..74de99a422d 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/FindHDFS.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/FindHDFS.cmake
@@ -7,8 +7,8 @@
# HDFS_LIBRARIES, location of libhdfs.so
# HDFS_FOUND, whether HDFS is found.
-exec_program($ENV{HADOOP_HOME}/bin/hadoop ARGS version OUTPUT_VARIABLE Hadoop_VERSION
- RETURN_VALUE Hadoop_RETURN)
+execute_process(COMMAND $ENV{HADOOP_HOME}/bin/hadoop version OUTPUT_VARIABLE Hadoop_VERSION
+ RESULT_VARIABLE Hadoop_RETURN)
# currently only looking in HADOOP_HOME
find_path(HDFS_INCLUDE_DIR hdfs.h PATHS
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/FindMFU.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/FindMFU.cmake
new file mode 100644
index 00000000000..8bbc870f5f8
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/FindMFU.cmake
@@ -0,0 +1,98 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+#########################################################################
+
+# - Derived from the FindTiff.cmake and FindJPEG.cmake that is included with cmake
+# FindMFU
+
+# Find the native MFU includes and library
+
+# Imported targets
+##################
+
+# This module defines the following :prop_tgt:`IMPORTED` targets:
+#
+# MFU::MFU
+# The MFU library, if found.
+#
+# Result variables
+###################
+
+# This module will set the following variables in your project:
+
+# MFU_FOUND, true if the MFU headers and libraries were found.
+# MFU_INCLUDE_DIR, the directory containing the MFU headers.
+# MFU_INCLUDE_DIRS, the directory containing the MFU headers.
+# MFU_LIBRARIES, libraries to link against to use MFU.
+
+# Cache variables
+#################
+
+# The following variables may also be set:
+
+# MFU_LIBRARY, where to find the MFU library.
+# message (STATUS "Finding MFU library and headers..." )
+#########################################################################
+
+
+
+FIND_PATH(MFU_INCLUDE_DIR
+ NAMES mfu.h
+ HINTS "$ENV{MFU_ROOT}/include"
+)
+FIND_LIBRARY(MFU_LIBRARY
+ NAMES mfu
+ HINTS "$ENV{MFU_ROOT}/lib64"
+)
+
+if(NOT MFU_LIBRARY)
+ set(mfu_names ${MFU_NAMES} mfu libmfu)
+ find_library(MFU_LIBRARY NAMES ${mfu_names})
+ include(SelectLibraryConfigurations)
+ select_library_configurations(MFU)
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(MFU
+ REQUIRED_VARS MFU_LIBRARY MFU_INCLUDE_DIR)
+
+if(MFU_FOUND)
+ set(MFU_LIBRARIES "${MFU_LIBRARY}")
+ set(MFU_INCLUDE_DIRS "${MFU_INCLUDE_DIR}")
+ set(LL_PATH "$ENV{MFU_ROOT}/lib64:$ENV{MFU_ROOT}/lib")
+ if(NOT TARGET MFU::MFU)
+ add_library(MFU::MFU UNKNOWN IMPORTED)
+ if(MFU_INCLUDE_DIRS)
+ set_target_properties(MFU::MFU PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${MFU_INCLUDE_DIRS}")
+ endif()
+ if(EXISTS "${MFU_LIBRARY}")
+ set_target_properties(MFU::MFU PROPERTIES
+ IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+ IMPORTED_LOCATION "${MFU_LIBRARY}")
+ endif()
+ endif()
+endif()
+
+# Report the results.
+if (NOT MFU_FOUND)
+ set (MFU_DIR_MESSAGE
+ "Mfu was not found. Make sure MFU_LIBRARY and MFU_INCLUDE_DIR are set or set the MFU_INSTALL environment variable."
+ )
+ if (NOT MFU_FIND_QUIETLY)
+ message (VERBOSE "${MFU_DIR_MESSAGE}")
+ else ()
+ if (MFU_FIND_REQUIRED)
+ message (FATAL_ERROR "MFU was NOT found and is required.")
+ endif ()
+ endif ()
+endif ()
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake_ext_mod/GetTimeOfDayTest.cpp b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/GetTimeOfDayTest.cpp
similarity index 100%
rename from Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake_ext_mod/GetTimeOfDayTest.cpp
rename to Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/GetTimeOfDayTest.cpp
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/H5pubconf.h.in b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/H5pubconf.h.in
index e163d3a50c5..fbc821948e1 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/H5pubconf.h.in
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/H5pubconf.h.in
@@ -14,27 +14,28 @@
#ifndef H5_CONFIG_H_
#define H5_CONFIG_H_
-/* Define if the Windows virtual file driver should be compiled */
+/* Define if this is a Windows machine */
#cmakedefine H5_HAVE_WINDOWS @H5_HAVE_WINDOWS@
/* Define if using MinGW */
#cmakedefine H5_HAVE_MINGW @H5_HAVE_MINGW@
-/* Define if on the Windows platform and default WIN32 API */
+/* Define if on the Windows platform and using the Win32 API */
#cmakedefine H5_HAVE_WIN32_API @H5_HAVE_WIN32_API@
/* Define if using a Windows compiler (i.e. Visual Studio) */
#cmakedefine H5_HAVE_VISUAL_STUDIO @H5_HAVE_VISUAL_STUDIO@
-/* Define if C++ compiler recognizes offsetof */
-#cmakedefine H5_CXX_HAVE_OFFSETOF @CXX_HAVE_OFFSETOF@
-
/* Define the default plugins path to compile */
#cmakedefine H5_DEFAULT_PLUGINDIR "@H5_DEFAULT_PLUGINDIR@"
/* Define if dev_t is a scalar */
#cmakedefine H5_DEV_T_IS_SCALAR @H5_DEV_T_IS_SCALAR@
+/* Define if your system is IBM ppc64le and cannot convert some long double
+ values correctly. */
+#cmakedefine H5_DISABLE_SOME_LDOUBLE_CONV @H5_DISABLE_SOME_LDOUBLE_CONV@
+
/* Define to dummy `main' function (if any) required to link to the Fortran
libraries. */
#cmakedefine H5_FC_DUMMY_MAIN @H5_FC_DUMMY_MAIN@
@@ -52,6 +53,9 @@
/* Define if Fortran C_LONG_DOUBLE is different from C_DOUBLE */
#define H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE @H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@
+/* Define if Fortran C_BOOL is different from default LOGICAL */
+#define H5_FORTRAN_C_BOOL_IS_UNIQUE @H5_FORTRAN_C_BOOL_IS_UNIQUE@
+
/* Define if we have Fortran C_LONG_DOUBLE */
#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @H5_FORTRAN_HAVE_C_LONG_DOUBLE@
@@ -64,19 +68,22 @@
/* Define if we have Fortran intrinsic STORAGE_SIZE */
#cmakedefine H5_FORTRAN_HAVE_STORAGE_SIZE @H5_FORTRAN_HAVE_STORAGE_SIZE@
+/* Define if Fortran supports allocatable character */
+#cmakedefine H5_FORTRAN_HAVE_CHAR_ALLOC @H5_FORTRAN_HAVE_CHAR_ALLOC@
+
/* Determine the size of C long double */
#cmakedefine H5_FORTRAN_SIZEOF_LONG_DOUBLE @H5_FORTRAN_SIZEOF_LONG_DOUBLE@
/* Define Fortran compiler ID */
#define H5_Fortran_COMPILER_ID @CMAKE_Fortran_COMPILER_ID@
+/* Define number of valid Fortran INTEGER KINDs (must be defined before F_IKIND)*/
+#cmakedefine H5_H5CONFIG_F_NUM_IKIND @H5_H5CONFIG_F_NUM_IKIND@
+
/* Define valid Fortran INTEGER KINDs */
#cmakedefine H5_H5CONFIG_F_IKIND @H5_H5CONFIG_F_IKIND@
-/* Define number of valid Fortran INTEGER KINDs */
-#cmakedefine H5_H5CONFIG_F_NUM_IKIND @H5_H5CONFIG_F_NUM_IKIND@
-
-/* Define number of valid Fortran REAL KINDs */
+/* Define number of valid Fortran REAL KINDs (must be defined before F_RKIND) */
#cmakedefine H5_H5CONFIG_F_NUM_RKIND @H5_H5CONFIG_F_NUM_RKIND@
/* Define valid Fortran REAL KINDs */
@@ -97,28 +104,18 @@
/* Define if the __attribute__(()) extension is present */
#cmakedefine H5_HAVE_ATTRIBUTE @H5_HAVE_ATTRIBUTE@
-/* Define if the compiler understands C99 designated initialization of structs
- and unions */
-#cmakedefine H5_HAVE_C99_DESIGNATED_INITIALIZER @H5_HAVE_C99_DESIGNATED_INITIALIZER@
-
-/* Define if the compiler understands the __func__ keyword */
-#cmakedefine H5_HAVE_C99_FUNC @H5_HAVE_C99_FUNC@
-
/* Define to 1 if you have the `clock_gettime' function. */
#cmakedefine H5_HAVE_CLOCK_GETTIME @H5_HAVE_CLOCK_GETTIME@
-/* Define if the function stack tracing code is to be compiled in */
-#cmakedefine H5_HAVE_CODESTACK @H5_HAVE_CODESTACK@
+/* Define to 1 if CLOCK_MONOTONIC_COARSE is available */
+#cmakedefine H5_HAVE_CLOCK_MONOTONIC_COARSE @H5_HAVE_CLOCK_MONOTONIC_COARSE@
/* Define to 1 if you have the header file. */
-#cmakedefine H5_HAVE_CURL_H @H5_HAVE_CURL_H@
+#cmakedefine H5_HAVE_CURL_CURL_H @H5_HAVE_CURL_H@
/* Define if Darwin or Mac OS X */
#cmakedefine H5_HAVE_DARWIN @H5_HAVE_DARWIN@
-/* Define to 1 if you have the `difftime' function. */
-#cmakedefine H5_HAVE_DIFFTIME @H5_HAVE_DIFFTIME@
-
/* Define if the direct I/O virtual file driver (VFD) should be compiled */
#cmakedefine H5_HAVE_DIRECT @H5_HAVE_DIRECT@
@@ -128,12 +125,12 @@
/* Define to 1 if you have the header file. */
#cmakedefine H5_HAVE_DLFCN_H @H5_HAVE_DLFCN_H@
-/* Define to 1 if you have the header file. */
-#cmakedefine H5_HAVE_DMALLOC_H @H5_HAVE_DMALLOC_H@
-
/* Define if library information should be embedded in the executables */
#cmakedefine H5_HAVE_EMBEDDED_LIBINFO @H5_HAVE_EMBEDDED_LIBINFO@
+/* Define to 1 if you have the `fabsf16' function. */
+#cmakedefine H5_HAVE_FABSF16 @H5_HAVE_FABSF16@
+
/* Define to 1 if you have the `fcntl' function. */
#cmakedefine H5_HAVE_FCNTL @H5_HAVE_FCNTL@
@@ -146,7 +143,10 @@
/* Define if support for szip filter is enabled */
#cmakedefine H5_HAVE_FILTER_SZIP @H5_HAVE_FILTER_SZIP@
-/* Determine if __float128 is available */
+/* Determine if _Float16 is available */
+#cmakedefine H5_HAVE__FLOAT16 @H5_HAVE__FLOAT16@
+
+/* Determine if __float128 will be used in the Fortran wrappers */
#cmakedefine H5_HAVE_FLOAT128 @H5_HAVE_FLOAT128@
/* Define to 1 if you have the `flock' function. */
@@ -155,18 +155,9 @@
/* Define to 1 if you have the `fork' function. */
#cmakedefine H5_HAVE_FORK @H5_HAVE_FORK@
-/* Define to 1 if you have the `frexpf' function. */
-#cmakedefine H5_HAVE_FREXPF @H5_HAVE_FREXPF@
-
-/* Define to 1 if you have the `frexpl' function. */
-#cmakedefine H5_HAVE_FREXPL @H5_HAVE_FREXPL@
-
/* Define to 1 if you have the `fseeko' function. */
#cmakedefine H5_HAVE_FSEEKO @H5_HAVE_FSEEKO@
-/* Define if the compiler understands the __FUNCTION__ keyword */
-#cmakedefine H5_HAVE_FUNCTION @H5_HAVE_FUNCTION@
-
/* Determine if INTEGER*16 is available */
#cmakedefine H5_HAVE_Fortran_INTEGER_SIZEOF_16 @H5_HAVE_Fortran_INTEGER_SIZEOF_16@
@@ -176,9 +167,6 @@
/* Define to 1 if you have the `gethostname' function. */
#cmakedefine H5_HAVE_GETHOSTNAME @H5_HAVE_GETHOSTNAME@
-/* Define to 1 if you have the `getpwuid' function. */
-#cmakedefine H5_HAVE_GETPWUID @H5_HAVE_GETPWUID@
-
/* Define to 1 if you have the `getrusage' function. */
#cmakedefine H5_HAVE_GETRUSAGE @H5_HAVE_GETRUSAGE@
@@ -191,22 +179,16 @@
/* Define to 1 if you have the header file. */
#cmakedefine H5_HAVE_HDFS_H @H5_HAVE_HDFS_H@
-/* Define if the compiler understands inline */
-#cmakedefine H5_HAVE_INLINE @H5_HAVE_INLINE@
-
/* Define if parallel library will contain instrumentation to detect correct
optimization operation */
#cmakedefine H5_HAVE_INSTRUMENTED_LIBRARY @H5_HAVE_INSTRUMENTED_LIBRARY@
-/* Define to 1 if you have the header file. */
-#cmakedefine H5_HAVE_INTTYPES_H @H5_HAVE_INTTYPES_H@
+/* Define if IOC VFD is built */
+#cmakedefine H5_HAVE_IOC_VFD @H5_HAVE_IOC_VFD@
/* Define to 1 if you have the `ioctl' function. */
#cmakedefine H5_HAVE_IOCTL @H5_HAVE_IOCTL@
-/* Define to 1 if you have the header file. */
-#cmakedefine H5_HAVE_IO_H @H5_HAVE_IO_H@
-
/* Define to 1 if you have the `crypto' library (-lcrypto). */
#cmakedefine H5_HAVE_LIBCRYPTO @H5_HAVE_LIBCRYPTO@
@@ -216,9 +198,6 @@
/* Define to 1 if you have the `dl' library (-ldl). */
#cmakedefine H5_HAVE_LIBDL @H5_HAVE_LIBDL@
-/* Define to 1 if you have the `dmalloc' library (-ldmalloc). */
-#cmakedefine H5_HAVE_LIBDMALLOC @H5_HAVE_LIBDMALLOC@
-
/* Proceed to build with libhdfs */
#cmakedefine H5_HAVE_LIBHDFS @H5_HAVE_LIBHDFS@
@@ -228,9 +207,6 @@
/* Define to 1 if you have the `m' library (-lm). */
#cmakedefine H5_HAVE_LIBM @H5_HAVE_LIBM@
-/* Define to 1 if you have the `mpe' library (-lmpe). */
-#cmakedefine H5_HAVE_LIBMPE @H5_HAVE_LIBMPE@
-
/* Define to 1 if you have the `pthread' library (-lpthread). */
#cmakedefine H5_HAVE_LIBPTHREAD @H5_HAVE_LIBPTHREAD@
@@ -243,42 +219,12 @@
/* Define to 1 if you have the `z' library (-lz). */
#cmakedefine H5_HAVE_LIBZ @H5_HAVE_LIBZ@
-/* Define to 1 if you have the `llround' function. */
-#cmakedefine H5_HAVE_LLROUND @H5_HAVE_LLROUND@
-
-/* Define to 1 if you have the `llroundf' function. */
-#cmakedefine H5_HAVE_LLROUNDF @H5_HAVE_LLROUNDF@
-
-/* Define to 1 if you have the `longjmp' function. */
-#cmakedefine H5_HAVE_LONGJMP @H5_HAVE_LONGJMP@
-
-/* Define to 1 if you have the `lround' function. */
-#cmakedefine H5_HAVE_LROUND @H5_HAVE_LROUND@
-
-/* Define to 1 if you have the `lroundf' function. */
-#cmakedefine H5_HAVE_LROUNDF @H5_HAVE_LROUNDF@
-
-/* Define to 1 if you have the `lseek64' function. */
-#cmakedefine H5_HAVE_LSEEK64 @H5_HAVE_LSEEK64@
-
-/* Define to 1 if you have the `lstat' function. */
-#cmakedefine H5_HAVE_LSTAT @H5_HAVE_LSTAT@
-
/* Define if the map API (H5M) should be compiled */
#cmakedefine H5_HAVE_MAP_API @H5_HAVE_MAP_API@
-/* Define to 1 if you have the header file. */
-#cmakedefine H5_HAVE_MEMORY_H @H5_HAVE_MEMORY_H@
-
/* Define whether the Mirror virtual file driver (VFD) will be compiled */
#cmakedefine H5_HAVE_MIRROR_VFD @H5_HAVE_MIRROR_VFD@
-/* Define if we have MPE support */
-#cmakedefine H5_HAVE_MPE @H5_HAVE_MPE@
-
-/* Define to 1 if you have the header file. */
-#cmakedefine H5_HAVE_MPE_H @H5_HAVE_MPE_H@
-
/* Define if MPI_Comm_c2f and MPI_Comm_f2c exist */
#cmakedefine H5_HAVE_MPI_MULTI_LANG_Comm @H5_HAVE_MPI_MULTI_LANG_Comm@
@@ -303,106 +249,55 @@
/* Define if we have parallel support */
#cmakedefine H5_HAVE_PARALLEL @H5_HAVE_PARALLEL@
+/* Define if MPI Fortran supports mpi_f08 module */
+#cmakedefine H5_HAVE_MPI_F08 @H5_HAVE_MPI_F08@
+
+/* Define if we have support for writing to filtered datasets in parallel */
+#cmakedefine H5_HAVE_PARALLEL_FILTERED_WRITES @H5_HAVE_PARALLEL_FILTERED_WRITES@
+
/* Define if both pread and pwrite exist. */
#cmakedefine H5_HAVE_PREADWRITE @H5_HAVE_PREADWRITE@
/* Define to 1 if you have the header file. */
#cmakedefine H5_HAVE_PTHREAD_H @H5_HAVE_PTHREAD_H@
-/* Define to 1 if you have the header file. */
-#cmakedefine H5_HAVE_QUADMATH_H @H5_HAVE_QUADMATH_H@
+/* Define to 1 if 'pthread_condattr_setclock()' is available */
+#cmakedefine H5_HAVE_PTHREAD_CONDATTR_SETCLOCK @H5_HAVE_PTHREAD_CONDATTR_SETCLOCK@
-/* Define to 1 if you have the `random' function. */
-#cmakedefine H5_HAVE_RANDOM @H5_HAVE_RANDOM@
+/* Define to 1 if PTHREAD_MUTEX_ADAPTIVE_NP is available */
+#cmakedefine H5_HAVE_PTHREAD_MUTEX_ADAPTIVE_NP @H5_HAVE_PTHREAD_MUTEX_ADAPTIVE_NP@
-/* Define to 1 if you have the `rand_r' function. */
-#cmakedefine H5_HAVE_RAND_R @H5_HAVE_RAND_R@
+/* Define to 1 if you have the header file. */
+#cmakedefine H5_HAVE_PWD_H @H5_HAVE_PWD_H@
/* Define whether the Read-Only S3 virtual file driver (VFD) should be
compiled */
#cmakedefine H5_HAVE_ROS3_VFD @H5_HAVE_ROS3_VFD@
-/* Define to 1 if you have the `round' function. */
-#cmakedefine H5_HAVE_ROUND @H5_HAVE_ROUND@
-
-/* Define to 1 if you have the `roundf' function. */
-#cmakedefine H5_HAVE_ROUNDF @H5_HAVE_ROUNDF@
-
-/* Define to 1 if you have the `setjmp' function. */
-#cmakedefine H5_HAVE_SETJMP @H5_HAVE_SETJMP@
-
-/* Define to 1 if you have the header file. */
-#cmakedefine H5_HAVE_SETJMP_H @H5_HAVE_SETJMP_H@
-
-/* Define to 1 if you have the `setsysinfo' function. */
-#cmakedefine H5_HAVE_SETSYSINFO @H5_HAVE_SETSYSINFO@
-
-/* Define to 1 if you have the `siglongjmp' function. */
-#cmakedefine H5_HAVE_SIGLONGJMP @H5_HAVE_SIGLONGJMP@
-
-/* Define to 1 if you have the `signal' function. */
-#cmakedefine H5_HAVE_SIGNAL @H5_HAVE_SIGNAL@
-
-/* Define to 1 if you have the `sigprocmask' function. */
-#cmakedefine H5_HAVE_SIGPROCMASK @H5_HAVE_SIGPROCMASK@
-
-/* Define to 1 if you have the `sigsetjmp' function. */
-#cmakedefine H5_HAVE_SIGSETJMP @H5_HAVE_SIGSETJMP@
-
-/* Define to 1 if you have the `snprintf' function. */
-#cmakedefine H5_HAVE_SNPRINTF @H5_HAVE_SNPRINTF@
-
-/* Define to 1 if you have the `srandom' function. */
-#cmakedefine H5_HAVE_SRANDOM @H5_HAVE_SRANDOM@
-
-/* Define to 1 if you have the `stat64' function. */
-#cmakedefine H5_HAVE_STAT64 @H5_HAVE_STAT64@
-
-/* Define if `struct stat' has the `st_blocks' field */
+/* Define if struct stat has the st_blocks field */
#cmakedefine H5_HAVE_STAT_ST_BLOCKS @H5_HAVE_STAT_ST_BLOCKS@
-/* Define to 1 if you have the header file. */
-#cmakedefine H5_HAVE_STDBOOL_H @H5_HAVE_STDBOOL_H@
-
-/* Define to 1 if you have the header file. */
-#cmakedefine H5_HAVE_STDDEF_H @H5_HAVE_STDDEF_H@
-
-/* Define to 1 if you have the header file. */
-#cmakedefine H5_HAVE_STDINT_H @H5_HAVE_STDINT_H@
-
-/* Define to 1 if you have the header file for Cplusplus. */
-#cmakedefine H5_HAVE_STDINT_H_CXX @H5_HAVE_STDINT_H_CXX@
-
-/* Define to 1 if you have the header file. */
-#cmakedefine H5_HAVE_STDLIB_H @H5_HAVE_STDLIB_H@
+/* Define to 1 if you have the `strcasestr' function. */
+#cmakedefine H5_HAVE_STRCASESTR @H5_HAVE_STRCASESTR@
/* Define to 1 if you have the `strdup' function. */
#cmakedefine H5_HAVE_STRDUP @H5_HAVE_STRDUP@
-/* Define to 1 if you have the header file. */
-#cmakedefine H5_HAVE_STRINGS_H @H5_HAVE_STRINGS_H@
-
-/* Define to 1 if you have the header file. */
-#cmakedefine H5_HAVE_STRING_H @H5_HAVE_STRING_H@
-
-/* Define to 1 if you have the `strtoll' function. */
-#cmakedefine H5_HAVE_STRTOLL @H5_HAVE_STRTOLL@
-
-/* Define to 1 if you have the `strtoull' function. */
-#cmakedefine H5_HAVE_STRTOULL @H5_HAVE_STRTOULL@
-
/* Define if struct text_info is defined */
#cmakedefine H5_HAVE_STRUCT_TEXT_INFO @H5_HAVE_STRUCT_TEXT_INFO@
/* Define if struct videoconfig is defined */
#cmakedefine H5_HAVE_STRUCT_VIDEOCONFIG @H5_HAVE_STRUCT_VIDEOCONFIG@
+/* Define if Subfiling VFD is built */
+#cmakedefine H5_HAVE_SUBFILING_VFD @H5_HAVE_SUBFILING_VFD@
+
+/* Define if have stdatomic.h for Subfiling VFD */
+#cmakedefine H5_HAVE_STDATOMIC_H @H5_HAVE_STDATOMIC_H@
+
/* Define to 1 if you have the `symlink' function. */
#cmakedefine H5_HAVE_SYMLINK @H5_HAVE_SYMLINK@
-/* Define to 1 if you have the `system' function. */
-#cmakedefine H5_HAVE_SYSTEM @H5_HAVE_SYSTEM@
-
/* Define to 1 if you have the header file. */
#cmakedefine H5_HAVE_SYS_FILE_H @H5_HAVE_SYS_FILE_H@
@@ -427,6 +322,9 @@
/* Define to 1 if you have the header file. */
#cmakedefine H5_HAVE_SZLIB_H @H5_HAVE_SZLIB_H@
+/* Define to 1 if the compiler supports the __builtin_expect() extension */
+#cmakedefine H5_HAVE_BUILTIN_EXPECT @H5_HAVE_BUILTIN_EXPECT@
+
#if defined(_WIN32) && !defined(H5_BUILT_AS_DYNAMIC_LIB)
/* Not supported on WIN32 platforms with static linking */
/* #undef H5_HAVE_THREADSAFE */
@@ -456,21 +354,15 @@
/* Define to 1 if you have the `vasprintf' function. */
#cmakedefine H5_HAVE_VASPRINTF @H5_HAVE_VASPRINTF@
-/* Define to 1 if you have the `vsnprintf' function. */
-#cmakedefine H5_HAVE_VSNPRINTF @H5_HAVE_VSNPRINTF@
-
/* Define to 1 if you have the `waitpid' function. */
#cmakedefine H5_HAVE_WAITPID @H5_HAVE_WAITPID@
-/* Define to 1 if you have the 'InitOnceExecuteOnce' function. */
+/* Define to 1 if you have Win32 threads */
#cmakedefine H5_HAVE_WIN_THREADS @H5_HAVE_WIN_THREADS@
-/* Define if your system has window style path name. */
+/* Define if your system has Windows-style path name. */
#cmakedefine H5_HAVE_WINDOW_PATH @H5_HAVE_WINDOW_PATH@
-/* Define to 1 if you have the header file. */
-#cmakedefine H5_HAVE_WINSOCK2_H @H5_HAVE_WINSOCK2_H@
-
/* Define to 1 if you have the header file. */
#cmakedefine H5_HAVE_ZLIB_H @H5_HAVE_ZLIB_H@
@@ -480,18 +372,18 @@
/* Define to 1 if you have the `_scrsize' function. */
#cmakedefine H5_HAVE__SCRSIZE @H5_HAVE__SCRSIZE@
-/* Define if the compiler understands __inline */
-#cmakedefine H5_HAVE___INLINE @H5_HAVE___INLINE@
-
-/* Define if the compiler understands __inline__ */
-#cmakedefine H5_HAVE___INLINE__ @H5_HAVE___INLINE__@
-
/* Define if the library will ignore file locks when disabled */
#cmakedefine H5_IGNORE_DISABLED_FILE_LOCKS @H5_IGNORE_DISABLED_FILE_LOCKS@
/* Define if the high-level library headers should be included in hdf5.h */
#cmakedefine H5_INCLUDE_HL @H5_INCLUDE_HL@
+/* Define if new-style references should be used with dimension scales */
+#cmakedefine H5_DIMENSION_SCALES_WITH_NEW_REF @H5_DIMENSION_SCALES_WITH_NEW_REF@
+
+/* Define if your system can convert long double to _Float16 values correctly. */
+#cmakedefine H5_LDOUBLE_TO_FLOAT16_CORRECT @H5_LDOUBLE_TO_FLOAT16_CORRECT@
+
/* Define if your system can convert long double to (unsigned) long long
values correctly. */
#cmakedefine H5_LDOUBLE_TO_LLONG_ACCURATE @H5_LDOUBLE_TO_LLONG_ACCURATE@
@@ -508,18 +400,9 @@
with special algorithm. */
#cmakedefine H5_LONG_TO_LDOUBLE_SPECIAL @H5_LONG_TO_LDOUBLE_SPECIAL@
-/* Define if your system is power6 and cannot convert some long double values. */
-#cmakedefine H5_DISABLE_SOME_LDOUBLE_CONV @H5_DISABLE_SOME_LDOUBLE_CONV@
-
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#cmakedefine H5_LT_OBJDIR @H5_LT_OBJDIR@
-/* Define to enable internal memory allocation sanity checking. */
-#cmakedefine H5_MEMORY_ALLOC_SANITY_CHECK @H5_MEMORY_ALLOC_SANITY_CHECK@
-
-/* Define if we can violate pointer alignment restrictions */
-#cmakedefine H5_NO_ALIGNMENT_RESTRICTIONS @H5_NO_ALIGNMENT_RESTRICTIONS@
-
/* Define if deprecated public API symbols are disabled */
#cmakedefine H5_NO_DEPRECATED_SYMBOLS @H5_NO_DEPRECATED_SYMBOLS@
@@ -550,9 +433,6 @@
/* Define Fortran Maximum Real Decimal Precision */
#define H5_PAC_FC_MAX_REAL_PRECISION @H5_PAC_FC_MAX_REAL_PRECISION@
-/* Width for printf() for type `long long' or `__int64', use `ll' */
-#cmakedefine H5_PRINTF_LL_WIDTH @H5_PRINTF_LL_WIDTH@
-
/* The size of `bool', as computed by sizeof. */
#cmakedefine H5_SIZEOF_BOOL @H5_SIZEOF_BOOL@
@@ -645,17 +525,13 @@
#endif
-/* Define size of long long and/or __int64 bit integer type only if the type
- exists. */
+/* The size of `long long', as computed by sizeof. */
#if !defined(__APPLE__)
#cmakedefine H5_SIZEOF_LONG_LONG @H5_SIZEOF_LONG_LONG@
#else
#define H5_SIZEOF_LONG_LONG 8
#endif
-/* The size of `off64_t', as computed by sizeof. */
-#cmakedefine H5_SIZEOF_OFF64_T @H5_SIZEOF_OFF64_T@
-
/* The size of `off_t', as computed by sizeof. */
#cmakedefine H5_SIZEOF_OFF_T @H5_SIZEOF_OFF_T@
@@ -707,17 +583,8 @@
/* The size of `unsigned', as computed by sizeof. */
#cmakedefine H5_SIZEOF_UNSIGNED @H5_SIZEOF_UNSIGNED@
-/* The size of `_Quad', as computed by sizeof. */
-#define H5_SIZEOF__QUAD @H5_SIZEOF__QUAD@
-
-/* The size of `__float128', as computed by sizeof. */
-#define H5_SIZEOF___FLOAT128 @H5_SIZEOF___FLOAT128@
-
-/* The size of `__int64', as computed by sizeof. */
-#define H5_SIZEOF___INT64 @H5_SIZEOF___INT64@
-
-/* Define to 1 if you have the ANSI C header files. */
-#cmakedefine H5_STDC_HEADERS @H5_STDC_HEADERS@
+/* The size of `_Float16', as computed by sizeof. */
+#define H5_SIZEOF__FLOAT16 @H5_SIZEOF__FLOAT16@
/* Define if strict file format checks are enabled */
#cmakedefine H5_STRICT_FORMAT_CHECKS @H5_STRICT_FORMAT_CHECKS@
@@ -726,9 +593,6 @@
PTHREAD_SCOPE_SYSTEM) call. */
#cmakedefine H5_SYSTEM_SCOPE_THREADS @H5_SYSTEM_SCOPE_THREADS@
-/* Define to 1 if you can safely include both and . */
-#cmakedefine H5_TIME_WITH_SYS_TIME @H5_TIME_WITH_SYS_TIME@
-
/* Define using v1.6 public API symbols by default */
#cmakedefine H5_USE_16_API_DEFAULT @H5_USE_16_API_DEFAULT@
@@ -741,12 +605,12 @@
/* Define using v1.12 public API symbols by default */
#cmakedefine H5_USE_112_API_DEFAULT @H5_USE_112_API_DEFAULT@
+/* Define using v1.14 public API symbols by default */
+#cmakedefine H5_USE_114_API_DEFAULT @H5_USE_114_API_DEFAULT@
+
/* Define if the library will use file locking */
#cmakedefine H5_USE_FILE_LOCKING @H5_USE_FILE_LOCKING@
-/* Define if the library will use recursive RW locks for thread safety */
-#cmakedefine H5_USE_RECURSIVE_RW_LOCKS @H5_USE_RECURSIVE_RW_LOCKS@
-
/* Define if a memory checking tool will be used on the library, to cause
library to be very picky about memory operations and also disable the
internal free list manager code. */
@@ -755,12 +619,15 @@
/* Version number of package */
#define H5_VERSION "@HDF5_PACKAGE_VERSION_STRING@"
-/* Data accuracy is prefered to speed during data conversions */
+/* Data accuracy is preferred to speed during data conversions */
#cmakedefine H5_WANT_DATA_ACCURACY @H5_WANT_DATA_ACCURACY@
/* Check exception handling functions during data conversions */
#cmakedefine H5_WANT_DCONV_EXCEPTION @H5_WANT_DCONV_EXCEPTION@
+/* Define if showing all compiler warnings are desired (i.e. don't suppress them internally) */
+#cmakedefine H5_SHOW_ALL_WARNINGS @H5_SHOW_ALL_WARNINGS@
+
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if !defined(__APPLE__)
@@ -781,18 +648,9 @@
/* Define for large files, on AIX-style hosts. */
#cmakedefine H5__LARGE_FILES
-/* Define to empty if `const' does not conform to ANSI C. */
-#cmakedefine H5_const
-
/* Define to `long int' if does not define. */
#cmakedefine H5_off_t
-/* Define to `long' if does not define. */
-#cmakedefine H5_ptrdiff_t
-
-/* Define to `unsigned long' if does not define. */
-#cmakedefine H5_size_t
-
/* Define to `long' if does not define. */
#cmakedefine H5_ssize_t
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5DeveloperBuild.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5DeveloperBuild.cmake
new file mode 100644
index 00000000000..a8c128d7e70
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5DeveloperBuild.cmake
@@ -0,0 +1,175 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+# CMake settings for HDF5 Developer mode builds
+
+# Set CMake C++ flags based off of Debug build flags
+set (CMAKE_CXX_FLAGS_DEVELOPER ${CMAKE_CXX_FLAGS_DEBUG} CACHE STRING
+ "Flags used by the C++ compiler during developer builds." FORCE
+)
+
+# Set CMake C flags based off of Debug build flags. Add in -Og
+# option to disable some GCC optimizations that might affect
+# debugging negatively and also include some GCC compiler passes
+# that collect debugging information
+set (CMAKE_C_FLAGS_DEVELOPER "${CMAKE_C_FLAGS_DEBUG} -Og" CACHE STRING
+ "Flags used by the C compiler during developer builds." FORCE
+)
+
+# Set CMake binary linker flags based off of Debug binary linker flags
+set (CMAKE_EXE_LINKER_FLAGS_DEVELOPER ${CMAKE_EXE_LINKER_FLAGS_DEBUG}
+ CACHE STRING "Flags used for linking binaries during developer builds."
+ FORCE
+)
+
+# Set CMake shared library linker flags based off of Debug shared library
+# linker flags
+set (CMAKE_SHARED_LINKER_FLAGS_DEVELOPER ${CMAKE_SHARED_LINKER_FLAGS_DEBUG}
+ CACHE STRING "Flags used by the shared libraries linker during developer builds."
+ FORCE
+)
+
+mark_as_advanced (
+ CMAKE_CXX_FLAGS_DEVELOPER
+ CMAKE_C_FLAGS_DEVELOPER
+ CMAKE_EXE_LINKER_FLAGS_DEVELOPER
+ CMAKE_SHARED_LINKER_FLAGS_DEVELOPER
+)
+
+#-----------------------------------------------------------------------------
+# Define various HDF5 macros for debugging the library
+#-----------------------------------------------------------------------------
+
+# Enable debugging of various HDF5 modules
+set (HDF5_ENABLE_DEBUG_APIS ON CACHE BOOL "Turn on extra debug output in all packages" FORCE)
+
+# HDF5 module debug definitions for debug code which either isn't
+# currently integrated with HDF5_ENABLE_DEBUG_APIS, or which isn't
+# well integrated with HDF5's H5DEBUG(X) (where 'X' is a package
+# letter) system. This type of debug code usually always prints output
+# to stdout, regardless of whether debugging for its particular module
+# has been requested via the HDF5_DEBUG environment variable. Therefore,
+# we don't automatically enable this debug code, but allow developers
+# to quickly add those definitions into their build here, without
+# needing to hack up source files.
+option (HDF5_ENABLE_DEBUG_H5AC_DIRTY_BYTES "Enable printing of H5AC module dirty bytes information" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5AC_DIRTY_BYTES)
+if (HDF5_ENABLE_DEBUG_H5AC_DIRTY_BYTES)
+ list (APPEND HDF5_DEBUG_APIS H5AC_DEBUG_DIRTY_BYTES_CREATION)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5FA "Enable debugging of H5FA module" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5FA)
+if (HDF5_ENABLE_DEBUG_H5FA)
+ list (APPEND HDF5_DEBUG_APIS H5FA_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5FD_ALLOC "Enable debugging of H5FD module allocation code" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5FD_ALLOC)
+if (HDF5_ENABLE_DEBUG_H5FD_ALLOC)
+ list (APPEND HDF5_DEBUG_APIS H5FD_ALLOC_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5FL "Enable debugging of H5FL module" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5FL)
+if (HDF5_ENABLE_DEBUG_H5FL)
+ list (APPEND HDF5_DEBUG_APIS H5FL_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5FS "Enable debugging of H5FS module" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5FS)
+if (HDF5_ENABLE_DEBUG_H5FS)
+ list (APPEND HDF5_DEBUG_APIS H5FS_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5FS_SINFO "Enable debugging of H5FS module section info" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5FS_SINFO)
+if (HDF5_ENABLE_DEBUG_H5FS_SINFO)
+ list (APPEND HDF5_DEBUG_APIS H5FS_SINFO_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5MF_AGGR "Enable debugging of H5MF module aggregation code" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5MF_AGGR)
+if (HDF5_ENABLE_DEBUG_H5MF_AGGR)
+ list (APPEND HDF5_DEBUG_APIS H5MF_AGGR_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5MF_ALLOC "Enable debugging of H5MF module allocation code" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5MF_ALLOC)
+if (HDF5_ENABLE_DEBUG_H5MF_ALLOC)
+ list (APPEND HDF5_DEBUG_APIS H5MF_ALLOC_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5MF_ALLOC_MORE "Enable extra debugging of H5MF module allocation code" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5MF_ALLOC_MORE)
+if (HDF5_ENABLE_DEBUG_H5MF_ALLOC_MORE)
+ list (APPEND HDF5_DEBUG_APIS H5MF_ALLOC_DEBUG_MORE)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5MF_ALLOC_DUMP "Enable printing of debugging info for H5MF module allocation code" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5MF_ALLOC_DUMP)
+if (HDF5_ENABLE_DEBUG_H5MF_ALLOC_DUMP)
+ list (APPEND HDF5_DEBUG_APIS H5MF_ALLOC_DEBUG_DUMP)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5R "Enable debugging of H5R module" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5R)
+if (HDF5_ENABLE_DEBUG_H5R)
+ list (APPEND HDF5_DEBUG_APIS H5R_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5S_HYPER "Enable debugging of H5S hyperslab code" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5S_HYPER)
+if (HDF5_ENABLE_DEBUG_H5S_HYPER)
+ list (APPEND HDF5_DEBUG_APIS H5S_HYPER_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5T_REF "Enable debugging of H5T module reference code" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5T_REF)
+if (HDF5_ENABLE_DEBUG_H5T_REF)
+ list (APPEND HDF5_DEBUG_APIS H5T_REF_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5B2 "Enable debugging of H5B2 module" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5B2)
+if (HDF5_ENABLE_DEBUG_H5B2)
+ list (APPEND HDF5_DEBUG_APIS H5B2_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5C_SANITY_CHECKS "Enable full sanity checking in H5C module" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5C_SANITY_CHECKS)
+if (HDF5_ENABLE_DEBUG_H5C_SANITY_CHECKS)
+ list (APPEND HDF5_DEBUG_APIS H5C_DO_SANITY_CHECKS)
+ list (APPEND HDF5_DEBUG_APIS H5C_DO_SLIST_SANITY_CHECKS)
+ list (APPEND HDF5_DEBUG_APIS H5C_DO_TAGGING_SANITY_CHECKS)
+ list (APPEND HDF5_DEBUG_APIS H5C_DO_EXTREME_SANITY_CHECKS)
+
+ # See note in H5Cprivate.h about this #define
+ # list (APPEND HDF5_DEBUG_APIS H5C_DO_MEMORY_SANITY_CHECKS=1)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5FS_ASSERT "Enable extra debugging of H5FS module" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5FS_ASSERT)
+if (HDF5_ENABLE_DEBUG_H5FS_ASSERT)
+ list (APPEND HDF5_DEBUG_APIS H5FS_DEBUG_ASSERT)
+endif ()
+
+# If HDF5 free list debugging wasn't specifically enabled, disable
+# free lists entirely for developer build modes, as they can
+# make certain types of issues (like references to stale pointers)
+# much more difficult to debug
+if (NOT HDF5_ENABLE_DEBUG_H5FL)
+ list (APPEND HDF5_DEVELOPER_DEFS H5_NO_FREE_LISTS)
+endif ()
+
+# Enable strict checking of the file format
+list (APPEND HDF5_DEVELOPER_DEFS H5_STRICT_FORMAT_CHECKS)
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5ExampleCache.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5ExampleCache.cmake
new file mode 100644
index 00000000000..99232cc06ca
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5ExampleCache.cmake
@@ -0,0 +1,80 @@
+# CMake cache file for examples
+
+#########################
+# EXTERNAL cache entries
+#########################
+
+# set example options to match build options
+set (H5EX_BUILD_TESTING ${BUILD_TESTING} CACHE BOOL "Enable examples testing" FORCE)
+set (H5EX_BUILD_EXAMPLES ${HDF5_BUILD_EXAMPLES} CACHE BOOL "Build Examples" FORCE)
+set (H5EX_BUILD_FORTRAN ${HDF5_BUILD_FORTRAN} CACHE BOOL "Build examples FORTRAN support" FORCE)
+set (H5EX_BUILD_JAVA ${HDF5_BUILD_JAVA} CACHE BOOL "Build examples JAVA support" FORCE)
+set (H5EX_BUILD_FILTERS ${HDF5_ENABLE_PLUGIN_SUPPORT} CACHE BOOL "Build examples PLUGIN filter support" FORCE)
+set (H5EX_BUILD_CPP_LIB ${HDF5_BUILD_CPP_LIB} CACHE BOOL "Build HDF5 C++ Library" FORCE)
+set (H5EX_BUILD_HL_LIB ${HDF5_BUILD_HL_LIB} CACHE BOOL "Build HIGH Level examples" FORCE)
+set (H5EX_ENABLE_THREADSAFE ${HDF5_ENABLE_THREADSAFE} CACHE BOOL "Enable examples thread-safety" FORCE)
+set (H5EX_ENABLE_PARALLEL ${HDF5_ENABLE_PARALLEL} CACHE BOOL "Enable examples parallel build (requires MPI)" FORCE)
+set (H5EX_USE_GNU_DIRS ${HDF5_USE_GNU_DIRS} CACHE BOOL "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" FORCE)
+
+#preset HDF5 cache vars to this projects libraries instead of searching
+set (H5EX_HDF5_HEADER "H5pubconf.h" CACHE STRING "Name of HDF5 header" FORCE)
+#set (H5EX_HDF5_INCLUDE_DIRS $ CACHE PATH "HDF5 include dirs" FORCE)
+set (H5EX_HDF5_INCLUDE_DIRS "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR}" CACHE PATH "HDF5 include dirs" FORCE)
+set (H5EX_HDF5_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE STRING "HDF5 build folder" FORCE)
+set (EXAMPLES_EXTERNALLY_CONFIGURED ON CACHE BOOL "Examples build is used in another project" FORCE)
+
+set (EXAMPLE_VARNAME "H5")
+set (H5EX_RESOURCES_DIR ${HDF_RESOURCES_DIR})
+message (STATUS "HDF5 Example H5EX_RESOURCES_DIR: ${H5EX_RESOURCES_DIR}")
+if (DEFAULT_API_VERSION MATCHES "v16")
+ set (H5_USE_16_API ON)
+elseif (DEFAULT_API_VERSION MATCHES "v18")
+ set (H5_USE_18_API ON)
+elseif (DEFAULT_API_VERSION MATCHES "v110")
+ set (H5_USE_110_API ON)
+elseif (DEFAULT_API_VERSION MATCHES "v112")
+ set (H5_USE_112_API ON)
+elseif (DEFAULT_API_VERSION MATCHES "v114")
+ set (H5_USE_114_API ON)
+elseif (DEFAULT_API_VERSION MATCHES "v116")
+ set (H5_USE_116_API ON)
+endif ()
+message (STATUS "HDF5 H5_LIBVER_DIR: ${H5_LIBVER_DIR} HDF5_API_VERSION: ${DEFAULT_API_VERSION}")
+
+if (NOT BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS)
+ set (USE_SHARED_LIBS OFF CACHE BOOL "Use Shared Libraries for Examples" FORCE)
+ set (H5EX_HDF5_LINK_LIBS ${HDF5_LIB_TARGET} CACHE STRING "HDF5 target" FORCE)
+ if (HDF5_BUILD_FORTRAN)
+ set (H5EX_HDF5_LINK_LIBS ${H5EX_HDF5_LINK_LIBS} ${HDF5_F90_LIB_TARGET})
+ set (H5EX_MOD_EXT "/static" CACHE STRING "Use Static Modules for Examples" FORCE)
+ endif ()
+ if (HDF5_BUILD_CPP_LIB)
+ set (H5EX_HDF5_LINK_LIBS ${H5EX_HDF5_LINK_LIBS} ${HDF5_CPP_LIB_TARGET})
+ endif ()
+else ()
+ set (USE_SHARED_LIBS ON CACHE BOOL "Use Shared Libraries for Examples" FORCE)
+ set (H5EX_HDF5_LINK_LIBS ${HDF5_LIBSH_TARGET} CACHE STRING "HDF5 target" FORCE)
+ if (HDF5_BUILD_FORTRAN)
+ set (H5EX_HDF5_LINK_LIBS ${H5EX_HDF5_LINK_LIBS} ${HDF5_F90_LIBSH_TARGET})
+ set (H5EX_MOD_EXT "/shared" CACHE STRING "Use Shared Modules for Examples" FORCE)
+ endif ()
+ if (HDF5_BUILD_CPP_LIB)
+ set (H5EX_HDF5_LINK_LIBS ${H5EX_HDF5_LINK_LIBS} ${HDF5_CPP_LIBSH_TARGET})
+ endif ()
+ if (HDF5_BUILD_JAVA)
+ set (HDF5_JAVA_INCLUDE_DIRS ${HDF5_JAVA_JARS} ${HDF5_JAVA_LOGGING_JAR})
+ set (H5EX_JAVA_LIBRARY ${HDF5_JAVA_JNI_LIB_TARGET})
+ set (H5EX_JAVA_LIBRARIES ${HDF5_JAVA_HDF5_LIB_TARGET} ${HDF5_JAVA_JNI_LIB_TARGET})
+ set (HDF5_LIBRARY_PATH ${CMAKE_TEST_OUTPUT_DIRECTORY})
+ message (STATUS "HDF5 Example java lib: ${H5EX_JAVA_LIBRARY} jars: ${HDF5_JAVA_INCLUDE_DIRS}")
+ endif ()
+ if (HDF5_ENABLE_PLUGIN_SUPPORT)
+ set (H5EX_HDF5_PLUGIN_PATH "${CMAKE_BINARY_DIR}/plugins")
+ endif ()
+endif ()
+message (STATUS "HDF5 Example link libs: ${H5EX_HDF5_LINK_LIBS} Includes: ${H5EX_HDF5_INCLUDE_DIRS}")
+
+set (HDF5_TOOLS_DIR ${CMAKE_TEST_OUTPUT_DIRECTORY} CACHE STRING "HDF5 Directory for all Executables" FORCE)
+set (H5EX_HDF5_DUMP_EXECUTABLE $ CACHE STRING "HDF5 h5dump target" FORCE)
+set (H5EX_HDF5_REPACK_EXECUTABLE $ CACHE STRING "HDF5 h5repack target" FORCE)
+
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5Macros.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5Macros.cmake
index 090524a1406..e17d6bc46b2 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5Macros.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5Macros.cmake
@@ -58,5 +58,63 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype libpackage)
endif ()
endif ()
endif ()
+endmacro ()
+
+# Initialize the list of VFDs to be used for testing and create a test folder for each VFD
+macro (H5_SET_VFD_LIST)
+ set (VFD_LIST
+ sec2
+ stdio
+ core
+ core_paged
+ split
+ multi
+ family
+ # Splitter VFD currently can't be tested with the h5_fileaccess()
+ # approach due to it trying to lock the same W/O file when two
+ # files are created/opened with the same FAPL that has the VFD
+ # set on it. When tested with the environment variable and a
+ # default FAPL, the VFD appends "_wo" to the filename when the
+ # W/O path isn't specified, which works for all the tests.
+ #splitter
+ # Log VFD currently has file space allocation bugs
+ #log
+ # Onion VFD not currently tested with VFD tests
+ #onion
+ )
+
+ if (H5_HAVE_DIRECT)
+ list (APPEND VFD_LIST direct)
+ endif ()
+ if (H5_HAVE_PARALLEL)
+ # MPI I/O VFD is currently incompatible with too many tests in the VFD test set
+ # list (APPEND VFD_LIST mpio)
+ endif ()
+ if (H5_HAVE_MIRROR_VFD)
+ # Mirror VFD needs network configuration, etc. and isn't easy to set
+ # reasonable defaults for that info.
+ # list (APPEND VFD_LIST mirror)
+ endif ()
+ if (H5_HAVE_ROS3_VFD)
+ # This would require a custom test suite
+ # list (APPEND VFD_LIST ros3)
+ endif ()
+ if (H5_HAVE_LIBHDFS)
+ # This would require a custom test suite
+ # list (APPEND VFD_LIST hdfs)
+ endif ()
+ if (H5_HAVE_SUBFILING_VFD)
+ # Subfiling has a few VFD test failures to be resolved
+ # list (APPEND VFD_LIST subfiling)
+ endif ()
+ if (H5_HAVE_WINDOWS)
+ list (APPEND VFD_LIST windows)
+ endif ()
+endmacro ()
+# Initialize the list of VFDs to be used for testing and create a test folder for each VFD
+macro (H5_CREATE_VFD_DIR)
+ foreach (vfdtest ${VFD_LIST})
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}")
+ endforeach ()
endmacro ()
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5PluginCache.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5PluginCache.cmake
index 3b085ddf54b..8c667077b88 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5PluginCache.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5PluginCache.cmake
@@ -1,29 +1,42 @@
-# This is the CMakeCache file.
+# CMake cache file for external HDF5 filter plugins
-########################
+#########################
# EXTERNAL cache entries
-########################
+#########################
# examples are the tests for plugins
-set (H5PL_BUILD_TESTING ON CACHE BOOL "Enable h5pl testing" FORCE)
-set (BUILD_EXAMPLES ON CACHE BOOL "Build h5pl Examples" FORCE)
+set (H5PL_BUILD_TESTING ON CACHE BOOL "Enable H5PL testing" FORCE)
+set (H5PL_BUILD_EXAMPLES ${HDF5_BUILD_EXAMPLES} CACHE BOOL "Build H5PL Examples" FORCE)
-set (HDF5_HDF5_HEADER "h5pubconf.h" CACHE STRING "Name of HDF5 header" FORCE)
-set (HDF5_LINK_LIBS ${HDF5_LIBSH_TARGET} CACHE STRING "hdf5 target" FORCE)
-#set (HDF5_INCLUDE_DIR $ CACHE PATH "hdf5 include dirs" FORCE)
-set (HDF5_INCLUDE_DIR "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}" CACHE PATH "hdf5 include dirs" FORCE)
-set (HDF5_INCLUDE_DIRS "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}" CACHE PATH "hdf5 include dirs" FORCE)
-set (HDF5_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE STRING "hdf5 build folder" FORCE)
+#preset HDF5 cache vars to this projects libraries instead of searching
+set (H5PL_HDF5_HEADER "H5pubconf.h" CACHE STRING "Name of HDF5 header" FORCE)
+set (H5PL_HDF5_LINK_LIBS ${HDF5_LIBSH_TARGET} CACHE STRING "HDF5 target" FORCE)
+#set (H5PL_HDF5_INCLUDE_DIRS $ CACHE PATH "HDF5 include dirs" FORCE)
+set (H5PL_HDF5_INCLUDE_DIRS "${HDF5_SRC_INCLUDE_DIRS};${HDF5_SRC_BINARY_DIR}" CACHE PATH "HDF5 include dirs" FORCE)
+set (H5PL_HDF5_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE STRING "HDF5 build folder" FORCE)
-set (HDF5_DUMP_EXECUTABLE $ CACHE STRING "hdf5 h5dump target" FORCE)
-set (HDF5_REPACK_EXECUTABLE $ CACHE STRING "hdf5 h5repack target" FORCE)
+set (H5PL_HDF5_DUMP_EXECUTABLE $ CACHE STRING "HDF5 h5dump target" FORCE)
+set (H5PL_HDF5_REPACK_EXECUTABLE $ CACHE STRING "HDF5 h5repack target" FORCE)
-set (H5PL_ALLOW_EXTERNAL_SUPPORT "${HDF5_ALLOW_EXTERNAL_SUPPORT}" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE)
+if (NOT DEFINED H5PL_ALLOW_EXTERNAL_SUPPORT)
+ set (H5PL_ALLOW_EXTERNAL_SUPPORT "${HDF5_ALLOW_EXTERNAL_SUPPORT}" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE)
+endif ()
-set (H5PL_GIT_URL "https://github.com/HDFGroup/hdf5_plugins.git" CACHE STRING "Use plugins from HDF repository" FORCE)
-set (H5PL_GIT_BRANCH "master" CACHE STRING "" FORCE)
+if (H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
+ set (ENABLE_JPEG OFF CACHE BOOL "" FORCE)
+ set (ENABLE_LZF OFF CACHE BOOL "" FORCE)
+endif ()
+
+if (NOT DEFINED H5PL_TGZPATH)
+ set (H5PL_TGZPATH "${TGZPATH}" CACHE PATH "PATH for finding plugin tgz file" FORCE)
+endif ()
+
+set (H5PL_GIT_URL "${PLUGIN_GIT_URL}" CACHE STRING "Use plugins from HDF Group repository" FORCE)
+set (H5PL_GIT_BRANCH "${PLUGIN_GIT_BRANCH}" CACHE STRING "" FORCE)
set (H5PL_TGZ_NAME "${PLUGIN_TGZ_NAME}" CACHE STRING "Use plugins from compressed file" FORCE)
set (PL_PACKAGE_NAME "${PLUGIN_PACKAGE_NAME}" CACHE STRING "Name of plugins package" FORCE)
-set (H5PL_CPACK_ENABLE OFF CACHE BOOL "Enable the CPACK include and components" FORCE)
+set (H5PL_CPACK_ENABLE OFF CACHE BOOL "Enable CPack include and components" FORCE)
+
+set (H5PL_USE_GNU_DIRS ${HDF5_USE_GNU_DIRS} CACHE BOOL "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" FORCE)
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5PluginMacros.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5PluginMacros.cmake
index 4e05399becb..b361917bcf2 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5PluginMacros.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5PluginMacros.cmake
@@ -1,3 +1,14 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
#-------------------------------------------------------------------------------
# Plugins must be built SHARED
#-------------------------------------------------------------------------------
@@ -13,64 +24,9 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type)
URL_HASH ""
)
endif ()
- FetchContent_GetProperties(PLUGIN)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}")
- endif ()
- if(NOT PLUGIN_POPULATED)
- FetchContent_Populate(PLUGIN)
- include (${HDF_RESOURCES_DIR}/HDF5PluginCache.cmake)
- set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
- add_subdirectory(${plugin_SOURCE_DIR} ${plugin_BINARY_DIR})
- if (ENABLE_BLOSC)
- add_dependencies (h5blosc ${HDF5_LIBSH_TARGET})
- add_dependencies (h5ex_d_blosc ${HDF5_LIBSH_TARGET})
- target_include_directories (h5ex_d_blosc PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
- endif ()
- if (ENABLE_BSHUF)
- add_dependencies (h5bshuf ${HDF5_LIBSH_TARGET})
- add_dependencies (h5ex_d_bshuf ${HDF5_LIBSH_TARGET})
- target_include_directories (h5ex_d_bshuf PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
- endif ()
- if (ENABLE_BZIP2)
- add_dependencies (h5bz2 ${HDF5_LIBSH_TARGET})
- add_dependencies (h5ex_d_bzip2 ${HDF5_LIBSH_TARGET})
- target_include_directories (h5ex_d_bzip2 PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
- endif ()
- if (ENABLE_JPEG)
- add_dependencies (h5jpeg ${HDF5_LIBSH_TARGET})
- add_dependencies (h5ex_d_jpeg ${HDF5_LIBSH_TARGET})
- target_include_directories (h5ex_d_jpeg PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
- endif ()
- if (ENABLE_LZ4)
- add_dependencies (h5lz4 ${HDF5_LIBSH_TARGET})
- add_dependencies (h5ex_d_lz4 ${HDF5_LIBSH_TARGET})
- target_include_directories (h5ex_d_lz4 PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
- endif ()
- if (ENABLE_LZF)
- add_dependencies (h5lzf ${HDF5_LIBSH_TARGET})
- add_dependencies (h5ex_d_lzf ${HDF5_LIBSH_TARGET})
- target_include_directories (h5ex_d_lzf PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
- endif ()
- if (ENABLE_MAFISC)
- add_dependencies (h5mafisc ${HDF5_LIBSH_TARGET})
- add_dependencies (h5ex_d_mafisc ${HDF5_LIBSH_TARGET})
- target_include_directories (h5ex_d_mafisc PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
- endif ()
- if (ENABLE_SZF)
- add_dependencies (h5szf ${HDF5_LIBSH_TARGET})
- add_dependencies (h5ex_d_sz ${HDF5_LIBSH_TARGET})
- target_include_directories (h5ex_d_sz PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
- endif ()
- if (ENABLE_ZFP)
- add_dependencies (h5zfp ${HDF5_LIBSH_TARGET})
- add_dependencies (h5ex_d_zfp ${HDF5_LIBSH_TARGET})
- target_include_directories (h5ex_d_zfp PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
- endif ()
- endif ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}")
- endif ()
+ include (${HDF_RESOURCES_DIR}/HDF5PluginCache.cmake)
+ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
+ FetchContent_MakeAvailable(PLUGIN)
set (PLUGIN_BINARY_DIR "${plugin_BINARY_DIR}")
set (PLUGIN_SOURCE_DIR "${plugin_SOURCE_DIR}")
set (PLUGIN_LIBRARY "PLUGIN")
@@ -82,17 +38,18 @@ macro (FILTER_OPTION plname)
string(TOLOWER ${plname} PLUGIN_NAME)
option (ENABLE_${plname} "Enable Library Building for ${plname} plugin" ON)
if (ENABLE_${plname})
- option (HDF_${plname}_USE_EXTERNAL "Use External Library Building for ${PLUGIN_NAME} plugin" 0)
- if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- set (HDF_${plname}_USE_EXTERNAL 1 CACHE BOOL "Use External Library Building for ${PLUGIN_NAME} plugin" FORCE)
- if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
+ option (HDF_${plname}_USE_EXTERNAL "Use External Library Building for ${PLUGIN_NAME} plugin else search" OFF)
+ mark_as_advanced (HDF_${plname}_USE_EXTERNAL)
+ if (H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ set (HDF_${plname}_USE_EXTERNAL ON CACHE BOOL "Use External Library Building for ${PLUGIN_NAME} plugin" FORCE)
+ if (H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
set (HDF_${plname}_URL ${HDF_${plname}_GIT_URL})
set (HDF_${plname}_BRANCH ${HDF_${plname}_GIT_BRANCH})
- elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- if (NOT TGZPATH)
- set (TGZPATH ${H5PL_SOURCE_DIR})
+ elseif (H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ if (NOT H5PL_COMP_TGZPATH)
+ set (H5PL_COMP_TGZPATH ${H5PL_SOURCE_DIR}/libs)
endif ()
- set (HDF_${plname}_URL ${TGZPATH}/${HDF_${plname}_TGZ_NAME})
+ set (HDF_${plname}_URL ${H5PL_COMP_TGZPATH}/${HDF_${plname}_TGZ_NAME})
endif ()
endif ()
add_subdirectory (${plname})
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5UseFortran.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5UseFortran.cmake
index e192ec4dd65..ce33c7036e3 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5UseFortran.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDF5UseFortran.cmake
@@ -14,83 +14,70 @@
# This file provides functions for HDF5 specific Fortran support.
#
#-------------------------------------------------------------------------------
-enable_language (Fortran)
+include (${HDF_RESOURCES_DIR}/HDFUseFortran.cmake)
-set (HDF_PREFIX "H5")
include (CheckFortranFunctionExists)
-if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- include (CheckFortranSourceRuns)
- include (CheckFortranSourceCompiles)
+# Force lowercase Fortran module file names
+if (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray")
+ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ef")
endif ()
-# Read source line beginning at the line matching Input:"START" and ending at the line matching Input:"END"
-macro (READ_SOURCE SOURCE_START SOURCE_END RETURN_VAR)
- file (READ "${HDF5_SOURCE_DIR}/m4/aclocal_fc.f90" SOURCE_MASTER)
- string (REGEX MATCH "${SOURCE_START}[\\\t\\\n\\\r[].+]*${SOURCE_END}" SOURCE_CODE ${SOURCE_MASTER})
- set (RETURN_VAR "${SOURCE_CODE}")
-endmacro ()
-
set (RUN_OUTPUT_PATH_DEFAULT ${CMAKE_BINARY_DIR})
-if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- if (HDF5_REQUIRED_LIBRARIES)
- set (CMAKE_REQUIRED_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}")
- endif ()
-else ()
# The provided CMake Fortran macros don't provide a general compile/run function
# so this one is used.
#-----------------------------------------------------------------------------
-macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 RETURN_VAR)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Detecting Fortran ${FUNCTION_NAME}")
- endif ()
+macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 RETURN_VAR RETURN_OUTPUT_VAR)
+ message (VERBOSE "Detecting Fortran ${FUNCTION_NAME}")
file (WRITE
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90
"${SOURCE_CODE}"
)
+ if (CMAKE_VERSION VERSION_LESS 3.25)
+ set (_RUN_OUTPUT_VARIABLE "RUN_OUTPUT_VARIABLE")
+ else ()
+ set (_RUN_OUTPUT_VARIABLE "RUN_OUTPUT_STDOUT_VARIABLE")
+ endif()
+ if (${FUNCTION_NAME} STREQUAL "SIZEOF NATIVE KINDs")
+ set(TMP_CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
+ else ()
+ set(TMP_CMAKE_Fortran_FLAGS "")
+ endif ()
TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90
+ CMAKE_FLAGS "${TMP_CMAKE_Fortran_FLAGS}"
LINK_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}"
+ ${_RUN_OUTPUT_VARIABLE} OUTPUT_VAR
)
+ set (${RETURN_OUTPUT_VAR} ${OUTPUT_VAR})
if (${COMPILE_RESULT_VAR})
set(${RETURN_VAR} ${RUN_RESULT_VAR})
if (${RUN_RESULT_VAR} MATCHES 0)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Testing Fortran ${FUNCTION_NAME} - OK")
- endif ()
+ message (VERBOSE "Testing Fortran ${FUNCTION_NAME} - OK")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran ${FUNCTION_NAME} exists passed\n"
)
else ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Testing Fortran ${FUNCTION_NAME} - Fail")
- endif ()
+ message (VERBOSE "Testing Fortran ${FUNCTION_NAME} - Fail")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Fortran ${FUNCTION_NAME} exists failed: ${RUN_RESULT_VAR}\n"
)
endif ()
else ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Compiling Fortran ${FUNCTION_NAME} - Fail")
- endif ()
+ message (VERBOSE "Compiling Fortran ${FUNCTION_NAME} - Fail")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Fortran ${FUNCTION_NAME} compiles failed: ${COMPILE_RESULT_VAR}\n"
)
set(${RETURN_VAR} ${COMPILE_RESULT_VAR})
endif ()
endmacro ()
-endif ()
#-----------------------------------------------------------------------------
# Check to see C_LONG_DOUBLE is available
READ_SOURCE("PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" "END PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE" SOURCE_CODE)
-if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_HAVE_C_LONG_DOUBLE SRC_EXT f90)
-else ()
- CHECK_FORTRAN_FEATURE(c_long_double "${SOURCE_CODE}" FORTRAN_HAVE_C_LONG_DOUBLE)
-endif ()
+check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_HAVE_C_LONG_DOUBLE SRC_EXT f90)
if (${FORTRAN_HAVE_C_LONG_DOUBLE})
set (${HDF_PREFIX}_FORTRAN_HAVE_C_LONG_DOUBLE 1)
@@ -101,17 +88,33 @@ endif ()
# Check to see C_LONG_DOUBLE is different from C_DOUBLE
READ_SOURCE("MODULE type_mod" "END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE" SOURCE_CODE)
-if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_C_LONG_DOUBLE_IS_UNIQUE SRC_EXT f90)
-else ()
- CHECK_FORTRAN_FEATURE(c_long_double "${SOURCE_CODE}" FORTRAN_C_LONG_DOUBLE_IS_UNIQUE)
-endif ()
+check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_C_LONG_DOUBLE_IS_UNIQUE SRC_EXT f90)
if (${FORTRAN_C_LONG_DOUBLE_IS_UNIQUE})
set (${HDF_PREFIX}_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 1)
else ()
set (${HDF_PREFIX}_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE 0)
endif ()
+# Check to see C_BOOL is different from default LOGICAL
+
+READ_SOURCE("MODULE l_type_mod" "END PROGRAM PROG_FC_C_BOOL_EQ_LOGICAL" SOURCE_CODE)
+check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_C_BOOL_IS_UNIQUE SRC_EXT f90)
+if (${FORTRAN_C_BOOL_IS_UNIQUE})
+ set (${HDF_PREFIX}_FORTRAN_C_BOOL_IS_UNIQUE 1)
+else ()
+ set (${HDF_PREFIX}_FORTRAN_C_BOOL_IS_UNIQUE 0)
+endif ()
+
+# Check if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV" (F08)
+
+READ_SOURCE("PROGRAM PROG_FC_ISO_FORTRAN_ENV" "END PROGRAM PROG_FC_ISO_FORTRAN_ENV" SOURCE_CODE)
+check_fortran_source_compiles (${SOURCE_CODE} HAVE_ISO_FORTRAN_ENV SRC_EXT f90)
+if (${HAVE_ISO_FORTRAN_ENV})
+ set (${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV 1)
+else ()
+ set (${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV 0)
+endif ()
+
## Set the sizeof function for use later in the fortran tests
if (${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE)
set (FC_SIZEOF_A "STORAGE_SIZE(a, c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t)")
@@ -125,32 +128,43 @@ else ()
message (FATAL_ERROR "Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE")
endif ()
+# Check to see of Fortran supports allocatable character
+READ_SOURCE("PROGRAM PROG_CHAR_ALLOC" "END PROGRAM PROG_CHAR_ALLOC" SOURCE_CODE)
+check_fortran_source_compiles (${SOURCE_CODE} FORTRAN_CHAR_ALLOC SRC_EXT f90)
+if (${FORTRAN_CHAR_ALLOC})
+ set (${HDF_PREFIX}_FORTRAN_HAVE_CHAR_ALLOC 1)
+else ()
+ set (${HDF_PREFIX}_FORTRAN_HAVE_CHAR_ALLOC 0)
+endif ()
+
#-----------------------------------------------------------------------------
# Determine the available KINDs for REALs and INTEGERs
#-----------------------------------------------------------------------------
-
-READ_SOURCE ("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" SOURCE_CODE)
-if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- check_fortran_source_runs (${SOURCE_CODE} FC_AVAIL_KINDS_RESULT SRC_EXT f90)
+if (${HAVE_ISO_FORTRAN_ENV})
+ READ_SOURCE ("PROGRAM FC08_AVAIL_KINDS" "END PROGRAM FC08_AVAIL_KINDS" SOURCE_CODE)
else ()
+ READ_SOURCE ("PROGRAM FC_AVAIL_KINDS" "END PROGRAM FC_AVAIL_KINDS" SOURCE_CODE)
+endif ()
+
FORTRAN_RUN ("REAL and INTEGER KINDs"
"${SOURCE_CODE}"
XX
YY
FC_AVAIL_KINDS_RESULT
+ PROG_OUTPUT
)
-endif ()
-
# dnl The output from the above program will be:
-# dnl -- LINE 1 -- valid integer kinds (comma seperated list)
-# dnl -- LINE 2 -- valid real kinds (comma seperated list)
+# dnl -- LINE 1 -- valid integer kinds (comma separated list)
+# dnl -- LINE 2 -- valid real kinds (comma separated list)
# dnl -- LINE 3 -- max decimal precision for reals
# dnl -- LINE 4 -- number of valid integer kinds
# dnl -- LINE 5 -- number of valid real kinds
+# dnl -- LINE 6 -- number of valid logical kinds
+# dnl -- LINE 7 -- valid logical kinds (comma separated list)
-file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_fconftest.out" PROG_OUTPUT)
+#
# Convert the string to a list of strings by replacing the carriage return with a semicolon
-string (REGEX REPLACE "\n" ";" PROG_OUTPUT "${PROG_OUTPUT}")
+string (REGEX REPLACE "[\r\n]+" ";" PROG_OUTPUT "${PROG_OUTPUT}")
list (GET PROG_OUTPUT 0 pac_validIntKinds)
list (GET PROG_OUTPUT 1 pac_validRealKinds)
@@ -183,6 +197,61 @@ message (STATUS "....REAL KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}")
message (STATUS "....INTEGER KINDS FOUND ${PAC_FC_ALL_INTEGER_KINDS}")
message (STATUS "....MAX DECIMAL PRECISION ${${HDF_PREFIX}_PAC_FC_MAX_REAL_PRECISION}")
+if (${HAVE_ISO_FORTRAN_ENV})
+
+ list (GET PROG_OUTPUT 5 NUM_LKIND)
+ set (PAC_FORTRAN_NUM_LOGICAL_KINDS "${NUM_LKIND}")
+
+ list (GET PROG_OUTPUT 6 pac_validLogicalKinds)
+ # If the list is empty then something went wrong.
+ if (NOT pac_validLogicalKinds)
+ message (FATAL_ERROR "Failed to find available LOGICAL KINDs for Fortran")
+ endif ()
+
+ set (PAC_FC_ALL_LOGICAL_KINDS "\{${pac_validLogicalKinds}\}")
+ message (STATUS "....LOGICAL KINDS FOUND ${PAC_FC_ALL_LOGICAL_KINDS}")
+
+# ********************
+# LOGICAL KIND FOR MPI
+# ********************
+ if (HDF5_ENABLE_PARALLEL AND BUILD_TESTING)
+ string (REGEX REPLACE "," ";" VAR "${pac_validLogicalKinds}")
+
+ set(CMAKE_REQUIRED_QUIET TRUE)
+ set(save_CMAKE_Fortran_FLAGS ${CMAKE_Fortran_FLAGS})
+ if (CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
+ set(CMAKE_Fortran_FLAGS "-warn error")
+ endif ()
+
+ foreach (KIND ${VAR})
+ unset(MPI_LOGICAL_KIND CACHE)
+ set (PROG_SRC
+ "
+ PROGRAM main
+ USE MPI
+ IMPLICIT NONE
+ LOGICAL(KIND=${KIND}) :: flag
+ INTEGER(KIND=MPI_INTEGER_KIND) :: info_ret, mpierror
+ CHARACTER(LEN=3) :: info_val
+ CALL mpi_info_get(info_ret,\"foo\", 3_MPI_INTEGER_KIND, info_val, flag, mpierror)
+ END
+ "
+ )
+ check_fortran_source_compiles (${PROG_SRC} MPI_LOGICAL_KIND SRC_EXT f90)
+
+ if (MPI_LOGICAL_KIND)
+ set (${HDF_PREFIX}_MPI_LOGICAL_KIND ${KIND})
+ message (STATUS "....FORTRAN LOGICAL KIND for MPI is ${KIND}")
+ endif ()
+ endforeach ()
+ if (${HDF_PREFIX}_MPI_LOGICAL_KIND STREQUAL "")
+ message (FATAL_ERROR "Failed to determine LOGICAL KIND for MPI")
+ endif ()
+ set(CMAKE_REQUIRED_QUIET FALSE)
+ set(CMAKE_Fortran_FLAGS ${save_CMAKE_Fortran_FLAGS})
+ endif()
+endif()
+
#-----------------------------------------------------------------------------
# Determine the available KINDs for REALs and INTEGERs
#-----------------------------------------------------------------------------
@@ -196,21 +265,15 @@ foreach (KIND ${VAR})
"
PROGRAM main
USE ISO_C_BINDING
+ USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : stdout=>OUTPUT_UNIT
IMPLICIT NONE
INTEGER (KIND=${KIND}) a
- OPEN(8,FILE='pac_validIntKinds.${KIND}.out',FORM='formatted')
- WRITE(8,'(I0)') ${FC_SIZEOF_A}
- CLOSE(8)
+ WRITE(stdout,'(I0)') ${FC_SIZEOF_A}
END
"
)
- if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- check_fortran_source_runs (${PROG_SRC_${KIND}} VALIDINTKINDS_RESULT_${KIND} SRC_EXT f90)
- else ()
- FORTRAN_RUN("INTEGER KIND SIZEOF" ${PROG_SRC_${KIND}} XX YY VALIDINTKINDS_RESULT_${KIND})
- endif ()
- file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validIntKinds.${KIND}.out" PROG_OUTPUT1)
- string (REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}")
+ FORTRAN_RUN("INTEGER KIND SIZEOF" ${PROG_SRC_${KIND}} XX YY VALIDINTKINDS_RESULT_${KIND} PROG_OUTPUT1)
+ string (REGEX REPLACE "[\r\n]+" "" PROG_OUTPUT1 "${PROG_OUTPUT1}")
set (pack_int_sizeof "${pack_int_sizeof} ${PROG_OUTPUT1},")
endforeach ()
@@ -227,9 +290,7 @@ string (REGEX REPLACE " " "" pack_int_sizeof "${pack_int_sizeof}")
set (PAC_FC_ALL_INTEGER_KINDS_SIZEOF "\{${pack_int_sizeof}\}")
-if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "....FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}")
-endif ()
+message (VERBOSE "....FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}")
# **********
# REALS
# **********
@@ -245,22 +306,16 @@ foreach (KIND ${VAR} )
"
PROGRAM main
USE ISO_C_BINDING
+ USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : stdout=>OUTPUT_UNIT
IMPLICIT NONE
REAL (KIND=${KIND}) a
- OPEN(8,FILE='pac_validRealKinds.${KIND}.out',FORM='formatted')
- WRITE(8,'(I0)') ${FC_SIZEOF_A}
- CLOSE(8)
+ WRITE(stdout,'(I0)') ${FC_SIZEOF_A}
END
"
)
- if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- check_fortran_source_runs (${PROG_SRC2_${KIND}} VALIDREALKINDS_RESULT_${KIND} SRC_EXT f90)
- else ()
- FORTRAN_RUN ("REAL KIND SIZEOF" ${PROG_SRC2_${KIND}} XX YY VALIDREALKINDS_RESULT_${KIND})
- endif ()
- file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_validRealKinds.${KIND}.out" PROG_OUTPUT1)
- string (REGEX REPLACE "\n" "" PROG_OUTPUT1 "${PROG_OUTPUT1}")
- set (pack_real_sizeof "${pack_real_sizeof} ${PROG_OUTPUT1},")
+ FORTRAN_RUN ("REAL KIND SIZEOF" ${PROG_SRC2_${KIND}} XX YY VALIDREALKINDS_RESULT_${KIND} PROG_OUTPUT2)
+ string (REGEX REPLACE "[\r\n]+" "" PROG_OUTPUT2 "${PROG_OUTPUT2}")
+ set (pack_real_sizeof "${pack_real_sizeof} ${PROG_OUTPUT2},")
endforeach ()
if (pack_real_sizeof STREQUAL "")
@@ -293,37 +348,31 @@ set (PROG_SRC3
"
PROGRAM main
USE ISO_C_BINDING
+ USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : stdout=>OUTPUT_UNIT
IMPLICIT NONE
INTEGER a
REAL b
DOUBLE PRECISION c
- OPEN(8,FILE='pac_sizeof_native_kinds.out',FORM='formatted')
- WRITE(8,*) ${FC_SIZEOF_A}
- WRITE(8,*) kind(a)
- WRITE(8,*) ${FC_SIZEOF_B}
- WRITE(8,*) kind(b)
- WRITE(8,*) ${FC_SIZEOF_C}
- WRITE(8,*) kind(c)
- CLOSE(8)
+ WRITE(stdout,*) ${FC_SIZEOF_A}
+ WRITE(stdout,*) kind(a)
+ WRITE(stdout,*) ${FC_SIZEOF_B}
+ WRITE(stdout,*) kind(b)
+ WRITE(stdout,*) ${FC_SIZEOF_C}
+ WRITE(stdout,*) kind(c)
END
"
)
-if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
- check_fortran_source_runs (${PROG_SRC3} PAC_SIZEOF_NATIVE_KINDS_RESULT SRC_EXT f90)
-else ()
- FORTRAN_RUN ("SIZEOF NATIVE KINDs" ${PROG_SRC3} XX YY PAC_SIZEOF_NATIVE_KINDS_RESULT)
-endif ()
-file (READ "${RUN_OUTPUT_PATH_DEFAULT}/pac_sizeof_native_kinds.out" PROG_OUTPUT3)
-# dnl The output from the above program will be:
-# dnl -- LINE 1 -- sizeof INTEGER
-# dnl -- LINE 2 -- kind of INTEGER
-# dnl -- LINE 3 -- sizeof REAL
-# dnl -- LINE 4 -- kind of REAL
-# dnl -- LINE 5 -- sizeof DOUBLE PRECISION
-# dnl -- LINE 6 -- kind of DOUBLE PRECISION
-
+FORTRAN_RUN ("SIZEOF NATIVE KINDs" ${PROG_SRC3} XX YY PAC_SIZEOF_NATIVE_KINDS_RESULT PROG_OUTPUT3)
+# The output from the above program will be:
+# -- LINE 1 -- sizeof INTEGER
+# -- LINE 2 -- kind of INTEGER
+# -- LINE 3 -- sizeof REAL
+# -- LINE 4 -- kind of REAL
+# -- LINE 5 -- sizeof DOUBLE PRECISION
+# -- LINE 6 -- kind of DOUBLE PRECISION
+#
# Convert the string to a list of strings by replacing the carriage return with a semicolon
-string (REGEX REPLACE "\n" ";" PROG_OUTPUT3 "${PROG_OUTPUT3}")
+string (REGEX REPLACE "[\r\n]+" ";" PROG_OUTPUT3 "${PROG_OUTPUT3}")
list (GET PROG_OUTPUT3 0 PAC_FORTRAN_NATIVE_INTEGER_SIZEOF)
list (GET PROG_OUTPUT3 1 PAC_FORTRAN_NATIVE_INTEGER_KIND)
@@ -351,14 +400,12 @@ if (NOT PAC_FORTRAN_NATIVE_DOUBLE_KIND)
message (FATAL_ERROR "Failed to find KIND of NATIVE DOUBLE for Fortran")
endif ()
-
set (${HDF_PREFIX}_FORTRAN_SIZEOF_LONG_DOUBLE ${${HDF_PREFIX}_SIZEOF_LONG_DOUBLE})
-# remove the invalid kind from the list
-if (NOT(${${HDF_PREFIX}_SIZEOF___FLOAT128} EQUAL 0))
- if (NOT(${${HDF_PREFIX}_SIZEOF___FLOAT128} EQUAL ${max_real_fortran_sizeof})
- AND NOT(${${HDF_PREFIX}_FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof})
- # account for the fact that the C compiler can have 16-byte __float128 and the fortran compiler only has 8-byte doubles,
+# Remove the invalid kind from the list
+if (${${HDF_PREFIX}_HAVE_FLOAT128})
+ if (NOT(16 EQUAL ${max_real_fortran_sizeof}) AND NOT(${${HDF_PREFIX}_FORTRAN_SIZEOF_LONG_DOUBLE} EQUAL ${max_real_fortran_sizeof})
+ # Account for the fact that the C compiler can have 16-byte __float128 and the fortran compiler only has 8-byte doubles,
# so we don't want to remove the 8-byte fortran doubles.
AND NOT(${PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF} EQUAL ${max_real_fortran_sizeof}))
message (WARNING "
@@ -381,7 +428,7 @@ string (REGEX REPLACE "}" "" OUT_VAR2 ${OUT_VAR2})
set (${HDF_PREFIX}_H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${OUT_VAR2}/)")
# Setting definition if there is a 16 byte fortran integer
-string (FIND ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF} "16" pos)
+string (FIND "${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}" "16" pos)
if (${pos} EQUAL -1)
set (${HDF_PREFIX}_HAVE_Fortran_INTEGER_SIZEOF_16 0)
else ()
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFCXXCompilerFlags.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFCXXCompilerFlags.cmake
index 64ec0107d2c..5f977f534f6 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFCXXCompilerFlags.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFCXXCompilerFlags.cmake
@@ -9,20 +9,65 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-set(CMAKE_CXX_STANDARD 98)
-set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
-set(CMAKE_CXX_EXTENSIONS OFF)
+ENABLE_LANGUAGE (CXX)
+
+set (CMAKE_CXX_STANDARD 11)
+set (CMAKE_CXX_STANDARD_REQUIRED TRUE)
+
+set (CMAKE_CXX_EXTENSIONS OFF)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}")
-if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Warnings Configuration: CXX default: ${CMAKE_CXX_FLAGS}")
-endif ()
+message (VERBOSE "Warnings Configuration: CXX default: ${CMAKE_CXX_FLAGS}")
#-----------------------------------------------------------------------------
# Compiler specific flags : Shouldn't there be compiler tests for these
#-----------------------------------------------------------------------------
-if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
+if (WIN32 AND (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" OR CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM"))
+ set (_INTEL_WINDOWS 1)
+endif ()
+
+if (WIN32 AND CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang" AND "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
+ set (_CLANG_MSVC_WINDOWS 1)
+endif()
+
+# MSVC 14.28 enables C5105, but the Windows SDK 10.0.18362.0 triggers it.
+if ((_CLANG_MSVC_WINDOWS OR CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") AND CMAKE_CXX_COMPILER_LOADED)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.28)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd5105")
+ endif ()
+endif ()
+
+if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro AND CMAKE_CXX_COMPILER_LOADED)
+ if (NOT DEFINED CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION)
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13)
+ if (NOT CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD EQUAL 98)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++03")
+ endif ()
+ else ()
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=stlport4")
+ endif ()
+ endif ()
+endif ()
+
+if (CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC" AND CMAKE_CXX_COMPILER_LOADED)
+ if (NOT DEFINED CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION)
+ if (NOT CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD EQUAL 11)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C11_STANDARD_COMPILE_OPTION}")
+ endif ()
+ endif ()
+ if (NOT ${HDF_CFG_NAME} MATCHES "Debug" AND NOT ${HDF_CFG_NAME} MATCHES "Developer")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Minform=warn")
+ if (NOT ${HDF_CFG_NAME} MATCHES "RelWithDebInfo")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s")
+ endif ()
+ else ()
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Mbounds -gopt -g")
+ endif ()
+endif ()
+
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_LOADED)
set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS}")
- if (${HDF_CFG_NAME} MATCHES "Debug")
+ if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer")
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og -ftrapv -fno-common")
endif ()
@@ -68,166 +113,172 @@ if (HDF5_DISABLE_COMPILER_WARNINGS)
endif ()
#-----------------------------------------------------------------------------
-# HDF5 library compile options
+# HDF5 library compile options - to be made available to all targets
#-----------------------------------------------------------------------------
-if (NOT MSVC AND NOT MINGW)
- if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
- list (APPEND HDF5_CMAKE_CXX_FLAGS "-erroff=%none -DBSD_COMP")
- else ()
- # General flags
- #
- # Note that some of the flags listed here really should be developer
- # flags (listed in a separate variable, below) but we put them here
- # because they are not raised by the current code and we'd like to
- # know if they do start showing up.
- #
- # NOTE: Don't add -Wpadded here since we can't/won't fix the (many)
- # warnings that are emitted. If you need it, add it at configure time.
- if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
- ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/general")
+if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ list (APPEND HDF5_CMAKE_CXX_FLAGS "-erroff=%none -DBSD_COMP")
+else ()
+ # General flags
+ #
+ # Note that some of the flags listed here really should be developer
+ # flags (listed in a separate variable, below) but we put them here
+ # because they are not raised by the current code and we'd like to
+ # know if they do start showing up.
+ #
+ # NOTE: Don't add -Wpadded here since we can't/won't fix the (many)
+ # warnings that are emitted. If you need it, add it at configure time.
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+ if (_INTEL_WINDOWS)
+ ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/win-general")
+ else ()
+ ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/general")
+ endif()
+ if (NOT _INTEL_WINDOWS)
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0)
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/15")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/15")
endif()
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/18")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/18")
endif()
- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED
- AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
- # add the general CXX flags for g++ compiler versions 4.8 and above.
- ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-general")
- if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-general")
- else ()
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-noerror-general")
- endif ()
- endif ()
- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general")
- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
- list (APPEND HDF5_CMAKE_CXX_FLAGS "-Minform=inform")
- endif ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "CMAKE_CXX_FLAGS_GENERAL=${HDF5_CMAKE_CXX_FLAGS}")
+ endif()
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_LOADED
+ AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
+ # add the general CXX flags for g++ compiler versions 4.8 and above.
+ ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-general")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-general")
endif ()
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
+ if (_INTEL_WINDOWS)
+ ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/win-general")
+ else ()
+ ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/general")
+ endif()
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
+ ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general")
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
+ list (APPEND HDF5_CMAKE_CXX_FLAGS "-Minform=inform")
endif ()
+ message (VERBOSE "CMAKE_CXX_FLAGS_GENERAL=${HDF5_CMAKE_CXX_FLAGS}")
+endif ()
- #-----------------------------------------------------------------------------
- # Option to allow the user to enable developer warnings
- # Developer warnings (suggestions from gcc, not code problems)
- #-----------------------------------------------------------------------------
- if (HDF5_ENABLE_DEV_WARNINGS)
- message (STATUS "....HDF5 developer group warnings are enabled")
- if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/developer-general")
- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- # Use the C warnings as CXX warnings are the same
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general")
- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general")
- endif ()
- else ()
- if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- # Use the C warnings as CXX warnings are the same
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general")
- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general")
- endif ()
+#-----------------------------------------------------------------------------
+# Option to allow the user to enable developer warnings
+# Developer warnings (suggestions from gcc, not code problems)
+#-----------------------------------------------------------------------------
+if (HDF5_ENABLE_DEV_WARNINGS)
+ message (STATUS "....HDF5 developer group warnings are enabled")
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+ if (_INTEL_WINDOWS)
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/win-developer-general")
+ else ()
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/developer-general")
+ endif()
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ # Use the C warnings as CXX warnings are the same
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general")
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
+ if (_INTEL_WINDOWS)
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/win-developer-general")
+ else ()
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/developer-general")
+ endif()
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general")
endif ()
-
+else ()
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- # Technically, variable-length arrays are part of the C99 standard, but
- # we should approach them a bit cautiously... Only needed for gcc 4.X
- if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
- # Use the C warnings as CXX warnings are the same
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last")
- endif ()
+ # Use the C warnings as CXX warnings are the same
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general")
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general")
+ endif ()
+endif ()
- # Append more extra warning flags that only gcc 4.8+ knows about
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-4.8")
- if (HDF5_ENABLE_DEV_WARNINGS)
- # Use the C warnings as CXX warnings are the same
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.8")
- else ()
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.8")
- endif ()
- endif ()
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... Only needed for gcc 4.X
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
+ # Use the C warnings as CXX warnings are the same
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last")
+ endif ()
- # Append more extra warning flags that only gcc 4.9+ knows about
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
+ # Append more extra warning flags that only gcc 4.8+ knows about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-4.8")
+ if (HDF5_ENABLE_DEV_WARNINGS)
# Use the C warnings as CXX warnings are the same
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-4.9")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-developer-4.8")
+ else ()
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-cxx-developer-4.8")
endif ()
+ endif ()
- # Append more extra warning flags that only gcc 5.1+ knows about
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
- # autotools always add the C flags with the CXX flags
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-5")
- if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-5")
- else ()
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-noerror-5")
- endif ()
- endif ()
+ # Append more extra warning flags that only gcc 4.9+ knows about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
+ # Use the C warnings as CXX warnings are the same
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-4.9")
+ endif ()
- # Append more extra warning flags that only gcc 6.x+ knows about
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
- # Use the C warnings as CXX warnings are the same
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/6")
- endif ()
+ # Append more extra warning flags that only gcc 5.1+ knows about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
+ # autotools always add the C flags with the CXX flags
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-5")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-5")
+ endif ()
- # Append more extra warning flags that only gcc 7.x+ knows about
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
- # Use the C warnings as CXX warnings are the same
- ADD_H5_FLAGS (H5_CXxFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/7")
- if (HDF5_ENABLE_DEV_WARNINGS)
- # Use the C warnings as CXX warnings are the same
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-7")
- #else ()
- # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-7")
- endif ()
- endif ()
+ # Append more extra warning flags that only gcc 6.x+ knows about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
+ # Use the C warnings as CXX warnings are the same
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/6")
+ endif ()
- # Append more extra warning flags that only gcc 8.x+ knows about
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
- # Use the C warnings as CXX warnings are the same
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/8")
- if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
- else ()
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-8")
- endif ()
- if (HDF5_ENABLE_DEV_WARNINGS)
- # Use the C warnings as CXX warnings are the same
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8")
- else ()
- # autotools always add the C flags with the CXX flags
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-8")
- endif ()
+ # Append more extra warning flags that only gcc 7.x+ knows about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
+ # Use the C warnings as CXX warnings are the same
+ ADD_H5_FLAGS (H5_CXxFLAGS2 "${HDF5_SOURCE_DIR}/config/gnu-warnings/7")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ # Use the C warnings as CXX warnings are the same
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-7")
+ #else ()
+ # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-7")
endif ()
+ endif ()
- # Append more extra warning flags that only gcc 9.x+ knows about
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
+ # Append more extra warning flags that only gcc 8.x+ knows about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
+ # Use the C warnings as CXX warnings are the same
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/8")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
+ if (HDF5_ENABLE_DEV_WARNINGS)
# Use the C warnings as CXX warnings are the same
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-9")
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8")
+ else ()
+ # autotools always add the C flags with the CXX flags
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-8")
endif ()
+ endif ()
- # Append more extra warning flags that only gcc 9.3+ knows about
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.3)
- # do not use C warnings, gnu-warnings 9.3, no cxx warniings
- # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9.3")
- endif ()
+ # Append more extra warning flags that only gcc 9.x+ knows about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
+ # Use the C warnings as CXX warnings are the same
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-9")
+ endif ()
- # Append more extra warning flags that only gcc 10.x+ knows about
- if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0)
- if (HDF5_ENABLE_DEV_WARNINGS)
- # Use the C warnings as CXX warnings are the same
- ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-10")
- #else ()
- # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-10")
- endif ()
+ # Append more extra warning flags that only gcc 9.3+ knows about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.3)
+ # do not use C warnings, gnu-warnings 9.3, no cxx warnings
+ # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9.3")
+ endif ()
+
+ # Append more extra warning flags that only gcc 10.x+ knows about
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0)
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ # Use the C warnings as CXX warnings are the same
+ ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-10")
+ #else ()
+ # ADD_H5_FLAGS (H5_CXXFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-10")
endif ()
endif ()
endif ()
@@ -260,7 +311,7 @@ endif ()
# This is in here to help some of the GCC based IDES like Eclipse
# and code blocks parse the compiler errors and warnings better.
#-----------------------------------------------------------------------------
-if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_LOADED)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0")
endif ()
@@ -269,17 +320,21 @@ endif ()
# This option will force/override the default setting for all configurations
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_SYMBOLS MATCHES "YES")
- if(CMAKE_CXX_COMPILER_LOADED)
- if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+ if (CMAKE_CXX_COMPILER_LOADED)
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT _INTEL_WINDOWS)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
+ elseif (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM" AND NOT _INTEL_WINDOWS)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
endif ()
endif ()
elseif (HDF5_ENABLE_SYMBOLS MATCHES "NO")
- if(CMAKE_CXX_COMPILER_LOADED)
- if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
- set (CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wl,-s")
+ if (CMAKE_CXX_COMPILER_LOADED)
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT _INTEL_WINDOWS)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-s")
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM" AND NOT _INTEL_WINDOWS)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-s")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s")
endif ()
@@ -291,7 +346,7 @@ endif ()
# This option will force/override the default setting for all configurations
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_PROFILING)
- if(CMAKE_CXX_COMPILER_LOADED)
+ if (CMAKE_CXX_COMPILER_LOADED)
list (APPEND HDF5_CMAKE_CXX_FLAGS "${PROFILE_CXXFLAGS}")
endif ()
endif ()
@@ -301,7 +356,7 @@ endif ()
# This option will force/override the default setting for all configurations
#-----------------------------------------------------------------------------
if (HDF5_ENABLE_OPTIMIZATION)
- if(CMAKE_CXX_COMPILER_LOADED)
+ if (CMAKE_CXX_COMPILER_LOADED)
list (APPEND HDF5_CMAKE_CXX_FLAGS "${OPTIMIZE_CXXFLAGS}")
endif ()
endif ()
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFCompilerFlags.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFCompilerFlags.cmake
index 39a0322c355..e3364826ba6 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFCompilerFlags.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFCompilerFlags.cmake
@@ -9,32 +9,65 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-set(CMAKE_C_STANDARD 99)
-set(CMAKE_C_STANDARD_REQUIRED TRUE)
+set (CMAKE_C_STANDARD 99)
+set (CMAKE_C_STANDARD_REQUIRED TRUE)
set (CMAKE_C_FLAGS "${CMAKE_C99_STANDARD_COMPILE_OPTION} ${CMAKE_C_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_SANITIZER_FLAGS} ${CMAKE_C_FLAGS}")
-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}")
-
-#[[ ITK --start
-if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Warnings Configuration: default: ${CMAKE_C_FLAGS} : ${CMAKE_CXX_FLAGS}")
-endif ()
-# ITK --stop ]]
+message (VERBOSE "Warnings Configuration: C default: ${CMAKE_C_FLAGS}")
#-----------------------------------------------------------------------------
# Compiler specific flags : Shouldn't there be compiler tests for these
#-----------------------------------------------------------------------------
-set(CMAKE_C_STANDARD 99)
-set(CMAKE_C_EXTENSIONS ON)
-if (CMAKE_COMPILER_IS_GNUCC)
+if (WIN32 AND (CMAKE_C_COMPILER_ID STREQUAL "Intel" OR CMAKE_C_COMPILER_ID MATCHES "IntelLLVM"))
+ set (_INTEL_WINDOWS 1)
+endif ()
+
+if (WIN32 AND CMAKE_C_COMPILER_ID MATCHES "[Cc]lang" AND "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
+ set (_CLANG_MSVC_WINDOWS 1)
+endif ()
+
+# Disable deprecation warnings for standard C functions.
+# really only needed for newer versions of VS, but should
+# not hurt other versions, and this will work into the
+# future
+if (MSVC OR _INTEL_WINDOWS OR _CLANG_MSVC_WINDOWS)
+ add_definitions (-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
+endif ()
+
+if (MSVC)
+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stack:10000000")
+endif ()
+
+# MSVC 14.28 enables C5105, but the Windows SDK 10.0.18362.0 triggers it.
+if (CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 19.28)
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd5105")
+endif ()
+
+if(_CLANG_MSVC_WINDOWS AND "x${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Xlinker -stack:20000000")
+endif()
+
+if (CMAKE_C_COMPILER_ID STREQUAL "NVHPC" )
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Minform=warn")
+ if (NOT ${HDF_CFG_NAME} MATCHES "Debug" AND NOT ${HDF_CFG_NAME} MATCHES "Developer")
+ if (NOT ${HDF_CFG_NAME} MATCHES "RelWithDebInfo")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s")
+ endif ()
+ else ()
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Mbounds -gopt")
+ endif ()
+endif ()
+
+if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
- if (${HDF_CFG_NAME} MATCHES "Debug")
+ if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer")
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og -ftrapv -fno-common")
endif ()
else ()
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0 AND
NOT CMAKE_C_CLANG_TIDY)
+ # `clang-tidy` does not understand -fstdarg-opt
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstdarg-opt")
endif ()
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 10.0)
@@ -43,19 +76,14 @@ if (CMAKE_COMPILER_IS_GNUCC)
#
# This should NOT be on by default as it can cause process issues.
#-----------------------------------------------------------------------------
- if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_ENABLE_BUILD_DIAGS "Enable color and URL extended diagnostic messages" OFF)
- else ()
- set(HDF5_ENABLE_BUILD_DIAGS OFF)
- endif ()
- #[[ ITK --start
+ mark_as_advanced (HDF5_ENABLE_BUILD_DIAGS)
if (HDF5_ENABLE_BUILD_DIAGS)
message (STATUS "... default color and URL extended diagnostic messages enabled")
else ()
message (STATUS "... disable color and URL extended diagnostic messages")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-urls=never -fno-diagnostics-color")
endif ()
- # ITK --stop ]]
endif ()
endif ()
endif ()
@@ -63,11 +91,7 @@ endif ()
#-----------------------------------------------------------------------------
# Option to allow the user to disable compiler warnings
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" OFF)
-else ()
-set(HDF5_DISABLE_COMPILER_WARNINGS OFF)
-endif ()
if (HDF5_DISABLE_COMPILER_WARNINGS)
message (STATUS "....Compiler warnings are suppressed")
# MSVC uses /w to suppress warnings. It also complains if another
@@ -93,193 +117,237 @@ if (HDF5_DISABLE_COMPILER_WARNINGS)
endif ()
#-----------------------------------------------------------------------------
-# HDF5 library compile options
+# HDF5 library compile options - to be made available to all targets
#-----------------------------------------------------------------------------
-if (NOT MSVC AND NOT MINGW)
- #-----------------------------------------------------------------------------
- # Option to allow the user to interpret certain warnings as errors
- #
- # This should NOT be on by default as it can cause a lot of conflicts with
- # new operating systems and compiler versions. Header files that are out of
- # our control (MPI, HDFS, etc.) can also raise warnings.
- #-----------------------------------------------------------------------------
- if (FALSE) # XXX(kitware): Hardcode settings.
- option (HDF5_ENABLE_WARNINGS_AS_ERRORS "Interpret some warnings as errors" OFF)
- else ()
- set(HDF5_ENABLE_WARNINGS_AS_ERRORS OFF)
- endif ()
- if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
- message (STATUS "...some warnings will be interpreted as errors")
- endif ()
+#-----------------------------------------------------------------------------
+# Option to allow the user to interpret certain warnings as errors
+#
+# This should NOT be on by default as it can cause a lot of conflicts with
+# new operating systems and compiler versions. Header files that are out of
+# our control (MPI, HDFS, etc.) can also raise warnings.
+#-----------------------------------------------------------------------------
+option (HDF5_ENABLE_WARNINGS_AS_ERRORS "Interpret some warnings as errors" OFF)
+if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
+ message (STATUS "...some warnings will be interpreted as errors")
+endif ()
- if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
- list (APPEND HDF5_CMAKE_C_FLAGS "-erroff=%none -DBSD_COMP")
- else ()
- # General flags
- #
- # Note that some of the flags listed here really should be developer
- # flags (listed in a separate variable, below) but we put them here
- # because they are not raised by the current code and we'd like to
- # know if they do start showing up.
- #
- # NOTE: Don't add -Wpadded here since we can't/won't fix the (many)
- # warnings that are emitted. If you need it, add it at configure time.
- if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
- ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/general")
- if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/15")
- endif()
- # this is just a failsafe
- list (APPEND H5_CFLAGS "-finline-functions")
- if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/18")
- endif()
- elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
- # Add general CFlags for GCC versions 4.8 and above
- if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
- ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/general")
- if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-general")
- else ()
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-general")
- endif ()
+if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ list (APPEND HDF5_CMAKE_C_FLAGS "-erroff=%none -DBSD_COMP")
+else ()
+ # General flags
+ #
+ # Note that some of the flags listed here really should be developer
+ # flags (listed in a separate variable, below) but we put them here
+ # because they are not raised by the current code and we'd like to
+ # know if they do start showing up.
+ #
+ # NOTE: Don't add -Wpadded here since we can't/won't fix the (many)
+ # warnings that are emitted. If you need it, add it at configure time.
+ if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
+ if (_INTEL_WINDOWS)
+ ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/win-general")
+ else ()
+ ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/general")
+ endif()
+ if (NOT _INTEL_WINDOWS)
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/15")
endif ()
- # gcc automatically inlines based on the optimization level
# this is just a failsafe
list (APPEND H5_CFLAGS "-finline-functions")
- elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
- ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general")
- if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/error-general")
- else ()
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/noerror-general")
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 18.0)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/18")
endif ()
- elseif (CMAKE_C_COMPILER_ID STREQUAL "PGI")
- list (APPEND HDF5_CMAKE_C_FLAGS "-Minform=inform")
endif ()
- #[[ ITK --start
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "CMAKE_C_FLAGS_GENERAL=${HDF5_CMAKE_C_FLAGS}")
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ # Add general CFlags for GCC versions 4.8 and above
+ if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
+ ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/general")
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-general")
+ endif ()
+ # gcc automatically inlines based on the optimization level
+ # this is just a failsafe
+ list (APPEND H5_CFLAGS "-finline-functions")
+ elseif (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM")
+ if (_INTEL_WINDOWS)
+ ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/win-general")
+ else ()
+ # this is just a failsafe
+ list (APPEND H5_CFLAGS "-finline-functions")
+ ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/general")
endif ()
- # ITK --stop ]]
+ elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
+ ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general")
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/error-general")
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "PGI")
+ list (APPEND HDF5_CMAKE_C_FLAGS "-Minform=inform")
endif ()
+ message (VERBOSE "CMAKE_C_FLAGS_GENERAL=${HDF5_CMAKE_C_FLAGS}")
+endif ()
- #-----------------------------------------------------------------------------
- # Option to allow the user to enable developer warnings
- # Developer warnings (suggestions from gcc, not code problems)
- #-----------------------------------------------------------------------------
- if (FALSE) # XXX(kitware): Hardcode settings.
- option (HDF5_ENABLE_DEV_WARNINGS "Enable HDF5 developer group warnings" OFF)
- else ()
- set(HDF5_ENABLE_DEV_WARNINGS OFF)
- endif ()
- if (HDF5_ENABLE_DEV_WARNINGS)
- message (STATUS "....HDF5 developer group warnings are enabled")
- if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/developer-general")
- elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general")
- elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general")
+#-----------------------------------------------------------------------------
+# Option to allow the user to enable developer warnings
+# Developer warnings (suggestions from gcc, not code problems)
+#-----------------------------------------------------------------------------
+option (HDF5_ENABLE_DEV_WARNINGS "Enable HDF5 developer group warnings" OFF)
+if (${HDF_CFG_NAME} MATCHES "Developer")
+ # Developer build modes should always have these types of warnings enabled
+ set (HDF5_ENABLE_DEV_WARNINGS ON CACHE BOOL "Enable HDF5 developer group warnings" FORCE)
+endif ()
+if (HDF5_ENABLE_DEV_WARNINGS)
+ message (STATUS "....HDF5 developer group warnings are enabled")
+ if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
+ if (_INTEL_WINDOWS)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/win-developer-general")
+ else ()
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/developer-general")
endif ()
- else ()
- if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general")
- elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general")
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-general")
+ elseif (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM")
+ if (_INTEL_WINDOWS)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/win-developer-general")
+ else ()
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/developer-general")
endif ()
+ elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general")
endif ()
- if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
- # Technically, variable-length arrays are part of the C99 standard, but
- # we should approach them a bit cautiously... Only needed for gcc 4.X
- if (CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last")
+ # Turn on -Winline warnings now only for non-Debug and
+ # non-Developer builds. For at least GNU compilers this
+ # flag appears to conflict specifically with the -Og
+ # optimization flag and will produce warnings about functions
+ # not being considered for inlining
+ if (NOT ${HDF_CFG_NAME} MATCHES "Debug" AND NOT ${HDF_CFG_NAME} MATCHES "Developer")
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ list (APPEND H5_CFLAGS "-Winline")
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "Intel" AND NOT _INTEL_WINDOWS)
+ list (APPEND H5_CFLAGS "-Winline")
+ elseif (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM" AND NOT _INTEL_WINDOWS)
+ list (APPEND H5_CFLAGS "-Winline")
+ elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
+ list (APPEND H5_CFLAGS "-Winline")
endif ()
+ endif ()
+else ()
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general")
+ elseif (CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/no-developer-general")
+ endif ()
+endif ()
- # Append more extra warning flags that only gcc 4.8+ knows about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.8)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8")
- if (HDF5_ENABLE_DEV_WARNINGS)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.8")
- else ()
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.8")
- endif ()
- endif ()
+if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ # Technically, variable-length arrays are part of the C99 standard, but
+ # we should approach them a bit cautiously... Only needed for gcc 4.X
+ if (CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0 AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8-4.last")
+ endif ()
- # Append more extra warning flags that only gcc 4.9+ knows about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.9")
+ # Append more extra warning flags that only gcc 4.8+ knows about
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.8)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.8")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-4.8")
+ else ()
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-4.8")
endif ()
+ endif ()
- # Append more extra warning flags that only gcc 5.x+ knows about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/5")
- if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5")
- else ()
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5")
- endif ()
- endif ()
+ # Append more extra warning flags that only gcc 4.9+ knows about
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/4.9")
+ endif ()
- # Append more extra warning flags that only gcc 6.x+ knows about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/6")
- endif ()
+ # Append more extra warning flags that only gcc 5.x+ knows about
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/5")
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5")
+ endif ()
- # Append more extra warning flags that only gcc 7.x+ knows about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 7.0)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/7")
- if (HDF5_ENABLE_DEV_WARNINGS)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-7")
- #else ()
- # ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-7")
- endif ()
- endif ()
+ # Append more extra warning flags that only gcc 6.x+ knows about
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/6")
+ endif ()
- # Append more extra warning flags that only gcc 8.x+ knows about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.0)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/8")
- if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
- endif ()
- if (HDF5_ENABLE_DEV_WARNINGS)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8")
- else ()
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-8")
- endif ()
+ # Append more extra warning flags that only gcc 7.x+ knows about
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 7.0)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/7")
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-7")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-7")
+ #else ()
+ # ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-7")
endif ()
+ endif ()
- # Append more extra warning flags that only gcc 9.x+ knows about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.0)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9")
+ # Append more extra warning flags that only gcc 8.x+ knows about
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.0)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/8")
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8")
+ else ()
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-8")
endif ()
+ endif ()
+
+ # Append more extra warning flags that only gcc 9.x+ knows about
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.0)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9")
+ endif ()
+
+ # Append more extra warning flags that only gcc 9.3+ knows about
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.3)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9.3")
+ endif ()
- # Append more extra warning flags that only gcc 9.3+ knows about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.3)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/9.3")
+ # Append more extra warning flags that only gcc 10.x+ knows about
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 10.0)
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-10")
+ #else ()
+ # ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-10")
endif ()
+ endif ()
- # Append more extra warning flags that only gcc 10.x+ knows about
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 10.0)
- if (HDF5_ENABLE_DEV_WARNINGS)
- ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-10")
- #else ()
- # ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-10")
- endif ()
+ # Append more extra warning flags that only gcc 12.x+ knows about
+ # or which should only be enabled for gcc 12.x+
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0)
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-12")
+ #else ()
+ # ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-12")
endif ()
endif ()
endif ()
+#-----------------------------------------------------------------------------
+# Option to allow the user to enable debug output
+# from various HDF5 modules
+#-----------------------------------------------------------------------------
+option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
+if (HDF5_ENABLE_DEBUG_APIS)
+ # Add standard debug definitions to any existing ones
+ list (APPEND HDF5_DEBUG_APIS
+ H5AC_DEBUG
+ H5CX_DEBUG
+ H5D_DEBUG
+ H5D_CHUNK_DEBUG
+ H5F_DEBUG
+ H5MM_DEBUG
+ H5O_DEBUG
+ H5T_DEBUG
+ H5Z_DEBUG
+ )
+endif ()
+
#-----------------------------------------------------------------------------
# Option to allow the user to enable all warnings
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_ENABLE_ALL_WARNINGS "Enable all warnings" ON)
-else ()
-set(HDF5_ENABLE_ALL_WARNINGS OFF)
-endif ()
if (HDF5_ENABLE_ALL_WARNINGS)
message (STATUS "....All Warnings are enabled")
if (MSVC)
@@ -299,7 +367,7 @@ endif ()
# This is in here to help some of the GCC based IDES like Eclipse
# and code blocks parse the compiler errors and warnings better.
#-----------------------------------------------------------------------------
-if (CMAKE_COMPILER_IS_GNUCC)
+if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
endif ()
@@ -308,70 +376,54 @@ endif ()
# By default, CMake adds NDEBUG to CMAKE_${lang}_FLAGS for Release build types
# This option will force/override the default setting for all configurations
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
#option (HDF5_ENABLE_ASSERTS "Determines whether NDEBUG is defined to control assertions." OFF)
set (HDF5_ENABLE_ASSERTS "OFF" CACHE STRING "Determines whether NDEBUG is defined to control assertions (OFF NO YES)")
set_property (CACHE HDF5_ENABLE_ASSERTS PROPERTY STRINGS OFF NO YES)
-mark_as_advanced (HDF5_ENABLE_ASSERTS)
-else ()
-set(HDF5_ENABLE_ASSERTS OFF)
-endif ()
if (HDF5_ENABLE_ASSERTS MATCHES "YES")
add_compile_options ("-UNDEBUG")
elseif (HDF5_ENABLE_ASSERTS MATCHES "NO")
add_compile_options ("-DNDEBUG")
endif ()
+MARK_AS_ADVANCED (HDF5_ENABLE_ASSERTS)
#-----------------------------------------------------------------------------
# Option for --enable-symbols
# This option will force/override the default setting for all configurations
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
#option (HDF5_ENABLE_SYMBOLS "Add debug symbols to the library independent of the build mode and optimization level." OFF)
set (HDF5_ENABLE_SYMBOLS "OFF" CACHE STRING "Add debug symbols to the library independent of the build mode and optimization level (OFF NO YES)")
set_property (CACHE HDF5_ENABLE_SYMBOLS PROPERTY STRINGS OFF NO YES)
-mark_as_advanced (HDF5_ENABLE_SYMBOLS)
-else ()
-set(HDF5_ENABLE_SYMBOLS OFF)
-endif ()
-if (HDF5_ENABLE_SYMBOLS STREQUAL "YES")
- if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
+if (HDF5_ENABLE_SYMBOLS MATCHES "YES")
+ if (CMAKE_C_COMPILER_ID STREQUAL "Intel" AND NOT _INTEL_WINDOWS)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -fno-omit-frame-pointer")
endif ()
-elseif (HDF5_ENABLE_SYMBOLS STREQUAL "NO")
- if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
+elseif (HDF5_ENABLE_SYMBOLS MATCHES "NO")
+ if (CMAKE_C_COMPILER_ID STREQUAL "Intel" AND NOT _INTEL_WINDOWS)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-s")
elseif (CMAKE_C_COMPILER_ID STREQUAL "GNU")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s")
endif ()
endif ()
+MARK_AS_ADVANCED (HDF5_ENABLE_SYMBOLS)
#-----------------------------------------------------------------------------
# Option for --enable-profiling
# This option will force/override the default setting for all configurations
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_ENABLE_PROFILING "Enable profiling flags independently from the build mode." OFF)
-mark_as_advanced (HDF5_ENABLE_PROFILING)
-else ()
-set(HDF5_ENABLE_PROFILING OFF)
-endif ()
if (HDF5_ENABLE_PROFILING)
list (APPEND HDF5_CMAKE_C_FLAGS "${PROFILE_CFLAGS}")
endif ()
+MARK_AS_ADVANCED (HDF5_ENABLE_PROFILING)
#-----------------------------------------------------------------------------
# Option for --enable-optimization
# This option will force/override the default setting for all configurations
#-----------------------------------------------------------------------------
-if (FALSE) # XXX(kitware): Hardcode settings.
option (HDF5_ENABLE_OPTIMIZATION "Enable optimization flags/settings independently from the build mode" OFF)
-mark_as_advanced (HDF5_ENABLE_OPTIMIZATION)
-else ()
-set(HDF5_ENABLE_OPTIMIZATION OFF)
-endif ()
if (HDF5_ENABLE_OPTIMIZATION)
list (APPEND HDF5_CMAKE_C_FLAGS "${OPTIMIZE_CFLAGS}")
endif ()
+MARK_AS_ADVANCED (HDF5_ENABLE_OPTIMIZATION)
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFFortranCompilerFlags.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFFortranCompilerFlags.cmake
index 18ab62186de..8ac3f490cc3 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFFortranCompilerFlags.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFFortranCompilerFlags.cmake
@@ -10,9 +10,7 @@
# help@hdfgroup.org.
#
-if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Warnings Configuration: default Fortran: ${CMAKE_Fortran_FLAGS}")
-endif ()
+message (VERBOSE "Warnings Configuration: default Fortran: ${CMAKE_Fortran_FLAGS}")
#-----------------------------------------------------------------------------
# Option to allow the user to disable compiler warnings
@@ -25,6 +23,8 @@ if (HDF5_DISABLE_COMPILER_WARNINGS)
set (HDF5_WARNINGS_BLOCKED 1)
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /warn:none")
+ elseif (CMAKE_Fortran_COMPILER_ID MATCHES "IntelLLVM")
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /warn:none")
endif ()
endif ()
if (WIN32)
@@ -43,7 +43,7 @@ if (HDF5_DISABLE_COMPILER_WARNINGS)
endif ()
#-----------------------------------------------------------------------------
-# HDF5 library compile options
+# HDF5 library compile options - to be made available to all targets
#-----------------------------------------------------------------------------
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 10.0)
if (HDF5_ENABLE_BUILD_DIAGS)
@@ -54,35 +54,64 @@ if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERS
endif ()
endif ()
-#-----------------------------------------------------------------------------
-# CDash is configured to only allow 3000 warnings, so
-# break into groups (from the config/gnu-flags file)
-#-----------------------------------------------------------------------------
+if (CMAKE_Fortran_COMPILER_ID STREQUAL "NAG")
+ message (STATUS "... Select IEEE floating-point mode full")
+ list (APPEND HDF5_CMAKE_Fortran_FLAGS "-ieee=full")
+endif ()
+if (CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC")
+ if (NOT ${HDF_CFG_NAME} MATCHES "Debug" AND NOT ${HDF_CFG_NAME} MATCHES "Developer")
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Mnoframe")
+ if (NOT ${HDF_CFG_NAME} MATCHES "RelWithDebInfo")
+ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -s")
+ endif ()
+ else ()
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Mbounds -Mchkptr -Mdclchk -g")
+ endif ()
+endif ()
+
if (NOT MSVC AND NOT MINGW)
# General flags
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
- ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/ifort-general")
- list (APPEND HDF5_CMAKE_Fortran_FLAGS "-stand:f03" "-free")
+ if (_INTEL_WINDOWS)
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/win-ifort-general")
+ else ()
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/ifort-general")
+ endif()
+ list (APPEND HDF5_CMAKE_Fortran_FLAGS "-free")
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-general")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-developer-general")
+ else ()
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-no-developer-general")
+ endif ()
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-ffree-form" "-fimplicit-none")
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8.0 AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.6)
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-std=f2008ts")
else ()
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-std=f2008")
endif ()
+ elseif (CMAKE_Fortran_COMPILER_ID MATCHES "IntelLLVM")
+ if (_INTEL_WINDOWS)
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/win-ifort-general")
+ else ()
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/ifort-general")
+ endif()
+ list (APPEND HDF5_CMAKE_Fortran_FLAGS "-free")
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "PGI")
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-Mfreeform" "-Mdclchk" "-Mstandard" "-Mallocatable=03")
endif ()
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}")
- endif ()
+ message (VERBOSE "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}")
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
-
# Append more extra warning flags that only gcc 4.8+ knows about
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.8)
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.8")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-developer-4.8")
+ else ()
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-no-developer-4.8")
+ endif ()
endif ()
# Append more extra warning flags that only gcc 4.9+ knows about
@@ -92,7 +121,9 @@ if (NOT MSVC AND NOT MINGW)
# Append more extra warning flags that only gcc 5.x+ knows about
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 5.0)
- ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-5")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-developer-5")
+ endif ()
endif ()
# Append more extra warning flags that only gcc 6.x+ knows about
@@ -117,8 +148,11 @@ if (NOT MSVC AND NOT MINGW)
endif ()
else ()
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
- #ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/win-ifort-general")
- list (APPEND HDF5_CMAKE_Fortran_FLAGS "/warn:all" "/stand:f03" "/free")
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/classic/win-ifort-general")
+ list (APPEND HDF5_CMAKE_Fortran_FLAGS "/stand:f03" "/free")
+ elseif (CMAKE_Fortran_COMPILER_ID MATCHES "IntelLLVM")
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/oneapi/win-ifort-general")
+ list (APPEND HDF5_CMAKE_Fortran_FLAGS "/stand:f03" "/free")
endif ()
endif ()
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFLibMacros.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFLibMacros.cmake
new file mode 100644
index 00000000000..09f40680b72
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFLibMacros.cmake
@@ -0,0 +1,82 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+#-------------------------------------------------------------------------------
+macro (EXTERNAL_ZLIB_LIBRARY compress_type)
+ if (HDF5_USE_ZLIB_NG)
+ set (zlib_folder "ZLIBNG")
+ else ()
+ set (zlib_folder "ZLIB")
+ endif ()
+ if (${compress_type} MATCHES "GIT")
+ FetchContent_Declare (HDF5_ZLIB
+ GIT_REPOSITORY ${ZLIB_URL}
+ GIT_TAG ${ZLIB_BRANCH}
+ PATCH_COMMAND ${CMAKE_COMMAND} -E copy
+ ${HDF_RESOURCES_DIR}/${zlib_folder}/CMakeLists.txt
+ /CMakeLists.txt
+ )
+ elseif (${compress_type} MATCHES "TGZ")
+ message (VERBOSE "Filter ZLIB file ${ZLIB_URL}")
+ FetchContent_Declare (HDF5_ZLIB
+ URL ${ZLIB_URL}
+ URL_HASH ""
+ PATCH_COMMAND ${CMAKE_COMMAND} -E copy
+ ${HDF_RESOURCES_DIR}/${zlib_folder}/CMakeLists.txt
+ /CMakeLists.txt
+ )
+ endif ()
+
+ FetchContent_MakeAvailable(HDF5_ZLIB)
+
+ add_library(${HDF_PACKAGE_NAMESPACE}zlib-static ALIAS zlib-static)
+ set (H5_ZLIB_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}zlib-static")
+ set (H5_ZLIB_LIBRARIES ${H5_ZLIB_STATIC_LIBRARY})
+
+ set (H5_ZLIB_INCLUDE_DIR_GEN "${hdf5_zlib_BINARY_DIR}")
+ set (H5_ZLIB_INCLUDE_DIR "${hdf5_zlib_SOURCE_DIR}")
+ set (H5_ZLIB_FOUND 1)
+ set (H5_ZLIB_INCLUDE_DIRS ${H5_ZLIB_INCLUDE_DIR_GEN} ${H5_ZLIB_INCLUDE_DIR})
+endmacro ()
+
+#-------------------------------------------------------------------------------
+macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
+ # Only libaec library is usable
+ if (${compress_type} MATCHES "GIT")
+ FetchContent_Declare (SZIP
+ GIT_REPOSITORY ${SZIP_URL}
+ GIT_TAG ${SZIP_BRANCH}
+ PATCH_COMMAND ${CMAKE_COMMAND} -E copy
+ ${HDF_RESOURCES_DIR}/LIBAEC/CMakeLists.txt
+ /CMakeLists.txt
+ )
+ elseif (${compress_type} MATCHES "TGZ")
+ message (VERBOSE "Filter SZIP file ${SZIP_URL}")
+ FetchContent_Declare (SZIP
+ URL ${SZIP_URL}
+ URL_HASH ""
+ PATCH_COMMAND ${CMAKE_COMMAND} -E copy
+ ${HDF_RESOURCES_DIR}/LIBAEC/CMakeLists.txt
+ /CMakeLists.txt
+ )
+ endif ()
+ FetchContent_MakeAvailable(SZIP)
+
+ add_library (${HDF_PACKAGE_NAMESPACE}szaec-static ALIAS szaec-static)
+ add_library (${HDF_PACKAGE_NAMESPACE}aec-static ALIAS aec-static)
+ set (H5_SZIP_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}szaec-static;${HDF_PACKAGE_NAMESPACE}aec-static")
+ set (H5_SZIP_LIBRARIES ${H5_SZIP_STATIC_LIBRARY})
+
+ set (H5_SZIP_INCLUDE_DIR_GEN "${szip_BINARY_DIR}")
+ set (H5_SZIP_INCLUDE_DIR "${szip_SOURCE_DIR}/include")
+ set (H5_SZIP_FOUND 1)
+ set (H5_SZIP_INCLUDE_DIRS ${H5_SZIP_INCLUDE_DIR_GEN} ${H5_SZIP_INCLUDE_DIR})
+endmacro ()
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake_ext_mod/HDFMacros.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFMacros.cmake
similarity index 75%
rename from Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake_ext_mod/HDFMacros.cmake
rename to Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFMacros.cmake
index 45533587d00..3be3e6a6a60 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake_ext_mod/HDFMacros.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFMacros.cmake
@@ -10,32 +10,79 @@
# help@hdfgroup.org.
#
+#-------------------------------------------------------------------------------
+# Setup output Directories
+#-----------------------------------------------------------------------------
+macro (SET_HDF_OUTPUT_DIRS package_prefix)
+ if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED)
+ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY
+ ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables."
+ )
+ set (CMAKE_LIBRARY_OUTPUT_DIRECTORY
+ ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries"
+ )
+ set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY
+ ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries."
+ )
+ set (CMAKE_Fortran_MODULE_DIRECTORY
+ ${PROJECT_BINARY_DIR}/mod CACHE PATH "Single Directory for all fortran modules."
+ )
+ get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+ if(_isMultiConfig)
+ set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF_CFG_NAME})
+ set (CMAKE_PDB_OUTPUT_DIRECTORY
+ ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files."
+ )
+ else ()
+ set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+ endif ()
+ else ()
+ # if we are externally configured, but the project uses old cmake scripts
+ # this may not be set and utilities like H5detect will fail
+ if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
+ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
+ endif ()
+ endif ()
+
+ if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+ if (CMAKE_HOST_UNIX)
+ set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
+ CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
+ else ()
+ GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
+ set (CMAKE_INSTALL_PREFIX
+ "${CMAKE_GENERIC_PROGRAM_FILES}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
+ CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
+ set (CMAKE_GENERIC_PROGRAM_FILES)
+ endif ()
+ set (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 0 CACHE PATH "" FORCE)
+ endif ()
+endmacro ()
+
#-------------------------------------------------------------------------------
macro (SET_HDF_BUILD_TYPE)
- get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
- if(_isMultiConfig)
- set(HDF_CFG_NAME ${CMAKE_BUILD_TYPE})
- set(HDF_BUILD_TYPE ${CMAKE_CFG_INTDIR})
- set(HDF_CFG_BUILD_TYPE \${CMAKE_INSTALL_CONFIG_NAME})
- else()
- set(HDF_CFG_BUILD_TYPE ".")
- if(CMAKE_BUILD_TYPE)
- set(HDF_CFG_NAME ${CMAKE_BUILD_TYPE})
- set(HDF_BUILD_TYPE ${CMAKE_BUILD_TYPE})
- else()
- set(HDF_CFG_NAME "Release")
- set(HDF_BUILD_TYPE "Release")
- endif()
- endif()
- if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE "Setting build type to 'RelWithDebInfo' as none was specified.")
- endif()
- set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE)
- # Set the possible values of build type for cmake-gui
- set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
- "MinSizeRel" "RelWithDebInfo")
- endif()
+ get_property (_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+ if (_isMultiConfig)
+ # HDF_CFG_BUILD_TYPE is used in the Fortran install commands for the build location of the .mod files
+ set (HDF_CFG_BUILD_TYPE \${CMAKE_INSTALL_CONFIG_NAME})
+ if (CMAKE_BUILD_TYPE)
+ # set the default to the specified command line define
+ set (HDF_CFG_NAME ${CMAKE_BUILD_TYPE})
+ else ()
+ # set the default to the MultiConfig variable
+ set (HDF_CFG_NAME "$")
+ endif ()
+ else ()
+ set (HDF_CFG_BUILD_TYPE ".")
+ if (CMAKE_BUILD_TYPE)
+ set (HDF_CFG_NAME ${CMAKE_BUILD_TYPE})
+ else ()
+ set (HDF_CFG_NAME "Release")
+ endif ()
+ # Set available build types for cmake-gui/ccmake convenience
+ set_property (CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
+ "Debug" "Release" "RelWithDebInfo" "MinSizeRel" "Developer")
+ endif ()
endmacro ()
#-------------------------------------------------------------------------------
@@ -45,7 +92,7 @@ endmacro ()
#-------------------------------------------------------------------------------
macro (IDE_GENERATED_PROPERTIES SOURCE_PATH HEADERS SOURCES)
- #set(source_group_path "Source/AIM/${NAME}")
+ #set (source_group_path "Source/AIM/${NAME}")
string (REPLACE "/" "\\\\" source_group_path ${SOURCE_PATH})
source_group (${source_group_path} FILES ${HEADERS} ${SOURCES})
@@ -75,12 +122,14 @@ endmacro ()
#-------------------------------------------------------------------------------
macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent)
+ option (DISABLE_PDB_FILES "Do not install PDB files" OFF)
+ mark_as_advanced (DISABLE_PDB_FILES)
if (WIN32 AND MSVC AND NOT DISABLE_PDB_FILES)
get_target_property (target_type ${libtarget} TYPE)
- if (${libtype} MATCHES "SHARED")
+ if (${target_type} MATCHES "SHARED")
set (targetfilename $)
else ()
- get_property (target_name TARGET ${libtarget} PROPERTY $,OUTPUT_NAME_DEBUG,OUTPUT_NAME_RELWITHDEBINFO>)
+ get_property (target_name TARGET ${libtarget} PROPERTY "$,$>,OUTPUT_NAME_DEBUG,OUTPUT_NAME_RELWITHDEBINFO>")
set (targetfilename $/${target_name}.pdb)
endif ()
install (
@@ -108,10 +157,6 @@ endmacro ()
#-------------------------------------------------------------------------------
macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
-# ITK --start
-# ITK: use ITK library naming
- if(FALSE)
-# ITK --stop
if (${libtype} MATCHES "SHARED")
set (LIB_RELEASE_NAME "${libname}")
set (LIB_DEBUG_NAME "${libname}${CMAKE_DEBUG_POSTFIX}")
@@ -128,6 +173,7 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
set_target_properties (${libtarget} PROPERTIES
OUTPUT_NAME ${LIB_RELEASE_NAME}
# OUTPUT_NAME_DEBUG ${LIB_DEBUG_NAME}
+ OUTPUT_NAME_DEVELOPER ${LIB_DEBUG_NAME}
OUTPUT_NAME_RELEASE ${LIB_RELEASE_NAME}
OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME}
OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME}
@@ -137,6 +183,7 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
if (WIN32)
set_target_properties (${libtarget} PROPERTIES
COMPILE_PDB_NAME_DEBUG ${LIB_DEBUG_NAME}
+ COMPILE_PDB_NAME_DEVELOPER ${LIB_DEBUG_NAME}
COMPILE_PDB_NAME_RELEASE ${LIB_RELEASE_NAME}
COMPILE_PDB_NAME_MINSIZEREL ${LIB_RELEASE_NAME}
COMPILE_PDB_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME}
@@ -153,9 +200,6 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
PREFIX ""
)
endif ()
-# ITK --start
- endif()
-# ITK --stop
endmacro ()
#-------------------------------------------------------------------------------
@@ -165,7 +209,7 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion)
if (${importtype} MATCHES "IMPORT")
set (importprefix "${CMAKE_STATIC_LIBRARY_PREFIX}")
endif ()
- if (${HDF_CFG_NAME} MATCHES "Debug")
+ if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer")
set (IMPORT_LIB_NAME ${LIB_DEBUG_NAME})
else ()
set (IMPORT_LIB_NAME ${LIB_RELEASE_NAME})
@@ -180,8 +224,8 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion)
)
else ()
set_target_properties (${libtarget} PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${HDF_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${HDF_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
+ IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
endif ()
else ()
@@ -206,7 +250,7 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion)
else ()
if (WIN32 AND NOT MINGW)
set_target_properties (${libtarget} PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${HDF_BUILD_TYPE}/${IMPORT_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
+ IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${HDF_CFG_NAME}/${IMPORT_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
)
else ()
@@ -221,16 +265,18 @@ endmacro ()
#-------------------------------------------------------------------------------
macro (TARGET_C_PROPERTIES wintarget libtype)
target_compile_options(${wintarget} PRIVATE
- $<$:${WIN_COMPILE_FLAGS}>
- $<$:${WIN_COMPILE_FLAGS}>
+ "$<$:${WIN_COMPILE_FLAGS}>"
+ "$<$:${WIN_COMPILE_FLAGS}>"
)
if(MSVC)
set_property(TARGET ${wintarget} APPEND PROPERTY LINK_FLAGS "${WIN_LINK_FLAGS}")
endif()
+ #Disable UNITY_BUILD for now
+ set_property(TARGET ${wintarget} APPEND PROPERTY UNITY_BUILD OFF)
endmacro ()
#-----------------------------------------------------------------------------
-# Configure the README.txt file for the binary package
+# Configure the README.md file for the binary package
#-----------------------------------------------------------------------------
macro (HDF_README_PROPERTIES target_fortran)
set (BINARY_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
@@ -238,6 +284,7 @@ macro (HDF_README_PROPERTIES target_fortran)
if (WIN32)
set (BINARY_EXAMPLE_ENDING "zip")
set (BINARY_INSTALL_ENDING "msi")
+ set (BINARY_COMPRESS_ENDING "zip")
if (CMAKE_CL_64)
set (BINARY_SYSTEM_NAME "win64")
else ()
@@ -274,10 +321,16 @@ macro (HDF_README_PROPERTIES target_fortran)
elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.*")
if (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.0.*")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2015")
- elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.16.*")
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.1.*")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2017")
- else () #19.23
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.2.*")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2019")
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.3.*")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2022")
+ elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "^19.4.*")
+ set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2022")
+ else ()
+ set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ????")
endif ()
else ()
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}")
@@ -285,12 +338,14 @@ macro (HDF_README_PROPERTIES target_fortran)
endif ()
elseif (APPLE)
set (BINARY_EXAMPLE_ENDING "tar.gz")
+ set (BINARY_COMPRESS_ENDING "tar.gz")
set (BINARY_INSTALL_ENDING "sh") # if packaging changes - use dmg
set (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}")
else ()
set (BINARY_EXAMPLE_ENDING "tar.gz")
- set (BINARY_INSTALL_ENDING "sh")
+ set (BINARY_COMPRESS_ENDING "tar.gz")
+ set (BINARY_INSTALL_ENDING "sh/deb/rpm")
set (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}")
endif ()
@@ -308,8 +363,8 @@ macro (HDF_README_PROPERTIES target_fortran)
endif ()
configure_file (
- ${HDF_RESOURCES_DIR}/README.txt.cmake.in
- ${CMAKE_BINARY_DIR}/README.txt @ONLY
+ ${HDF_RESOURCES_DIR}/README.md.cmake.in
+ ${CMAKE_BINARY_DIR}/README.md @ONLY
)
endmacro ()
@@ -324,8 +379,38 @@ macro (HDFTEST_COPY_FILE src dest target)
endmacro ()
macro (HDF_DIR_PATHS package_prefix)
+ option (HDF5_USE_GNU_DIRS "ON to use GNU Coding Standard install directory variables, OFF to use historical settings" OFF)
+ if (HDF5_USE_GNU_DIRS)
+ include(GNUInstallDirs)
+ if (NOT ${package_prefix}_INSTALL_BIN_DIR)
+ set (${package_prefix}_INSTALL_BIN_DIR ${CMAKE_INSTALL_BINDIR})
+ endif ()
+ if (NOT ${package_prefix}_INSTALL_LIB_DIR)
+ set (${package_prefix}_INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR})
+ endif ()
+ if (NOT ${package_prefix}_INSTALL_JAR_DIR)
+ set (${package_prefix}_INSTALL_JAR_DIR ${CMAKE_INSTALL_LIBDIR})
+ endif ()
+ if (NOT ${package_prefix}_INSTALL_INCLUDE_DIR)
+ set (${package_prefix}_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR})
+ endif ()
+ if (NOT ${package_prefix}_INSTALL_MODULE_DIR)
+ set (${package_prefix}_INSTALL_MODULE_DIR ${CMAKE_INSTALL_INCLUDEDIR}/mod)
+ endif ()
+ if (NOT ${package_prefix}_INSTALL_DATA_DIR)
+ set (${package_prefix}_INSTALL_DATA_DIR ${CMAKE_INSTALL_DATADIR})
+ endif ()
+ if (NOT ${package_prefix}_INSTALL_CMAKE_DIR)
+ set (${package_prefix}_INSTALL_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake)
+ endif ()
+ if (NOT ${package_prefix}_INSTALL_DOC_DIR)
+ set (${package_prefix}_INSTALL_DOC_DIR ${CMAKE_INSTALL_DOCDIR})
+ endif ()
+ message(STATUS "GNU: ${${package_prefix}_INSTALL_DOC_DIR}")
+ endif ()
+
if (APPLE)
- option (${package_prefix}_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE)
+ option (${package_prefix}_BUILD_FRAMEWORKS "ON to build as frameworks libraries, OFF to build according to BUILD_SHARED_LIBS" OFF)
endif ()
if (NOT ${package_prefix}_INSTALL_BIN_DIR)
@@ -347,6 +432,9 @@ macro (HDF_DIR_PATHS package_prefix)
if (NOT ${package_prefix}_INSTALL_INCLUDE_DIR)
set (${package_prefix}_INSTALL_INCLUDE_DIR include)
endif ()
+ if (NOT ${package_prefix}_INSTALL_MODULE_DIR)
+ set (${package_prefix}_INSTALL_MODULE_DIR mod)
+ endif ()
if (NOT ${package_prefix}_INSTALL_DATA_DIR)
if (NOT MSVC)
if (APPLE)
@@ -363,14 +451,18 @@ macro (HDF_DIR_PATHS package_prefix)
endif ()
endif ()
if (NOT ${package_prefix}_INSTALL_CMAKE_DIR)
- set (${package_prefix}_INSTALL_CMAKE_DIR share/cmake)
+ set (${package_prefix}_INSTALL_CMAKE_DIR cmake)
endif ()
+ if (NOT ${package_prefix}_INSTALL_DOC_DIR)
+ set (${package_prefix}_INSTALL_DOC_DIR ${${package_prefix}_INSTALL_DATA_DIR})
+ endif ()
+ message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}")
# Always use full RPATH, i.e. don't skip the full RPATH for the build tree
- set (CMAKE_SKIP_BUILD_RPATH FALSE)
+ set (CMAKE_SKIP_BUILD_RPATH OFF)
# when building, don't use the install RPATH already
# (but later on when installing)
- set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
+ set (CMAKE_INSTALL_RPATH_USE_LINK_PATH OFF)
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
set (CMAKE_BUILD_WITH_INSTALL_RPATH ON)
@@ -391,76 +483,19 @@ macro (HDF_DIR_PATHS package_prefix)
endif ()
#set the default debug suffix for all library targets
- if(NOT CMAKE_DEBUG_POSTFIX)
- if (WIN32)
- set (CMAKE_DEBUG_POSTFIX "_D")
- else ()
- set (CMAKE_DEBUG_POSTFIX "_debug")
- endif ()
- endif ()
-
- SET_HDF_BUILD_TYPE()
-
-#-----------------------------------------------------------------------------
-# Setup output Directories
-#-----------------------------------------------------------------------------
- if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED)
- set (CMAKE_RUNTIME_OUTPUT_DIRECTORY
- ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Executables."
- )
- set (CMAKE_LIBRARY_OUTPUT_DIRECTORY
- ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all Libraries"
- )
- set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY
- ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all static libraries."
- )
- set (CMAKE_Fortran_MODULE_DIRECTORY
- ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all fortran modules."
- )
- get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
- if(_isMultiConfig)
- set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE})
- set (CMAKE_PDB_OUTPUT_DIRECTORY
- ${PROJECT_BINARY_DIR}/bin CACHE PATH "Single Directory for all pdb files."
- )
+ if(NOT CMAKE_DEBUG_POSTFIX)
+ if (WIN32)
+ set (CMAKE_DEBUG_POSTFIX "_D")
else ()
- set (CMAKE_TEST_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
- endif ()
- else ()
- # if we are externally configured, but the project uses old cmake scripts
- # this may not be set and utilities like H5detect will fail
- if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
- set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
+ set (CMAKE_DEBUG_POSTFIX "_debug")
endif ()
endif ()
-# ITK --start. Do not let HDF5 set the CMAKE_INSTALL_PREFIX for externally configured projects. Submitted upstream: https://github.com/HDFGroup/hdf5/pull/1380
- if (NOT ${package_prefix}_EXTERNALLY_CONFIGURED AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-# ITK -- stop
- if (CMAKE_HOST_UNIX)
- set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
- CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
- else ()
- GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)
- set (CMAKE_INSTALL_PREFIX
- "${CMAKE_GENERIC_PROGRAM_FILES}/HDF_Group/${HDF5_PACKAGE_NAME}/${HDF5_PACKAGE_VERSION}"
- CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
- set (CMAKE_GENERIC_PROGRAM_FILES)
- endif ()
- endif ()
+ SET_HDF_BUILD_TYPE()
-#-----------------------------------------------------------------------------
-# Setup pre-3.14 FetchContent
-#-----------------------------------------------------------------------------
- if(${CMAKE_VERSION} VERSION_LESS 3.14)
- macro(FetchContent_MakeAvailable NAME)
- FetchContent_GetProperties(${NAME})
- if(NOT ${NAME}_POPULATED)
- FetchContent_Populate(${NAME})
- add_subdirectory(${${NAME}_SOURCE_DIR} ${${NAME}_BINARY_DIR})
- endif()
- endmacro()
- endif()
+ SET_HDF_OUTPUT_DIRS(${package_prefix})
+
+ include (FetchContent)
endmacro ()
macro (ADD_H5_FLAGS h5_flag_var infile)
@@ -473,6 +508,9 @@ macro (ADD_H5_FLAGS h5_flag_var infile)
list (GET TEST_FLAG_STREAM ${line} str_flag)
string (REGEX REPLACE "^#.*" "" str_flag "${str_flag}")
#message (TRACE "str_flag=${str_flag}")
+ if (NOT HDF5_ENABLE_WARNINGS_AS_ERRORS)
+ string (REGEX REPLACE "-Werror=" "-W" str_flag "${str_flag}")
+ endif ()
if (str_flag)
list (APPEND ${h5_flag_var} "${str_flag}")
endif ()
@@ -480,4 +518,3 @@ macro (ADD_H5_FLAGS h5_flag_var infile)
endif ()
#message (TRACE "h5_flag_var=${${h5_flag_var}}")
endmacro ()
-
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFTests.c b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFTests.c
new file mode 100644
index 00000000000..042a34dfd51
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFTests.c
@@ -0,0 +1,132 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/* A simple test program to see if a function "works" */
+#define SIMPLE_TEST(x) int main(void){ x; return 0; }
+
+#ifdef HAVE___FLOAT128
+
+/* Check if __float128 works (only used in the Fortran interface) */
+int
+main ()
+{
+ __float128 x;
+
+ return 0;
+}
+
+#endif /* HAVE___FLOAT128 */
+
+#ifdef HAVE_BUILTIN_EXPECT
+
+int
+main ()
+{
+ void *ptr = (void*) 0;
+
+ if (__builtin_expect (ptr != (void*) 0, 1))
+ return 0;
+
+ return 0;
+}
+
+#endif /* HAVE_BUILTIN_EXPECT */
+
+#ifdef HAVE_ATTRIBUTE
+
+int
+main ()
+{
+ int __attribute__((unused)) x;
+
+ return 0;
+}
+
+#endif /* HAVE_ATTRIBUTE */
+
+#ifdef HAVE_TIMEZONE
+
+#ifdef HAVE_SYS_TIME_H
+# include
+#endif
+#include
+SIMPLE_TEST(timezone = 0);
+
+#endif /* HAVE_TIMEZONE */
+
+#ifdef SYSTEM_SCOPE_THREADS
+#include
+#include
+
+int main(void)
+{
+ pthread_attr_t attribute;
+ int ret;
+
+ pthread_attr_init(&attribute);
+ ret = pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM);
+ if (ret == 0)
+ return 0;
+ return 1;
+}
+
+#endif /* SYSTEM_SCOPE_THREADS */
+
+#ifdef HAVE_SOCKLEN_T
+
+#include
+#include
+#ifdef HAVE_UNISTD_H
+# include
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include
+#endif
+
+SIMPLE_TEST(socklen_t foo);
+
+#endif /* HAVE_SOCKLEN_T */
+
+#ifdef DEV_T_IS_SCALAR
+
+#ifdef HAVE_SYS_TYPES_H
+#include
+#endif
+
+int main ()
+{
+ dev_t d1, d2;
+ if (d1 == d2)
+ return 0;
+ return 1;
+}
+
+#endif /* DEV_T_IS_SCALAR */
+
+#ifdef HAVE_DEFAULT_SOURCE
+/* Check default source */
+#include
+
+int
+main(void)
+{
+#ifdef __GLIBC_PREREQ
+ return __GLIBC_PREREQ(2,19);
+#else
+ return 0;
+#endif
+}
+#endif
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFUseFortran.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFUseFortran.cmake
new file mode 100644
index 00000000000..44d3e7cfd2b
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/HDFUseFortran.cmake
@@ -0,0 +1,89 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+#
+# This file provides functions for Fortran support.
+#
+#-------------------------------------------------------------------------------
+enable_language (Fortran)
+set (HDF_PREFIX "H5")
+
+include (CheckFortranSourceRuns)
+include (CheckFortranSourceCompiles)
+
+#-----------------------------------------------------------------------------
+# Detect name mangling convention used between Fortran and C
+#-----------------------------------------------------------------------------
+include (FortranCInterface)
+
+#-----------------------------------------------------------------------------
+# Verify that the Fortran and C/C++ compilers work together
+#-----------------------------------------------------------------------------
+FortranCInterface_VERIFY()
+
+FortranCInterface_HEADER (
+ ${CMAKE_BINARY_DIR}/FCMangle.h
+ MACRO_NAMESPACE "H5_FC_"
+ SYMBOL_NAMESPACE "H5_FC_"
+)
+
+file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL\\(.*,.*\\) +(.*)")
+string (REGEX MATCH "H5_FC_GLOBAL\\(.*,.*\\) +(.*)" RESULT ${CONTENTS})
+set (H5_FC_FUNC "H5_FC_FUNC(name,NAME) ${CMAKE_MATCH_1}")
+
+file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)")
+string (REGEX MATCH "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)" RESULT ${CONTENTS})
+set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}")
+
+# Read source line beginning at the line matching Input:"START" and ending at the line matching Input:"END"
+macro (READ_SOURCE SOURCE_START SOURCE_END RETURN_VAR)
+ file (READ "${HDF5_SOURCE_DIR}/m4/aclocal_fc.f90" SOURCE_MASTER)
+ string (REGEX MATCH "${SOURCE_START}[\\\t\\\n\\\r[].+]*${SOURCE_END}" SOURCE_CODE ${SOURCE_MASTER})
+ set (RETURN_VAR "${SOURCE_CODE}")
+endmacro ()
+
+if (HDF5_REQUIRED_LIBRARIES)
+ set (CMAKE_REQUIRED_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}")
+endif ()
+
+READ_SOURCE("PROGRAM PROG_FC_SIZEOF" "END PROGRAM PROG_FC_SIZEOF" SOURCE_CODE)
+check_fortran_source_compiles (${SOURCE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF SRC_EXT f90)
+
+READ_SOURCE("PROGRAM PROG_FC_C_SIZEOF" "END PROGRAM PROG_FC_C_SIZEOF" SOURCE_CODE)
+check_fortran_source_compiles (${SOURCE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF SRC_EXT f90)
+
+READ_SOURCE("PROGRAM PROG_FC_STORAGE_SIZE" "END PROGRAM PROG_FC_STORAGE_SIZE" SOURCE_CODE)
+check_fortran_source_compiles (${SOURCE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE SRC_EXT f90)
+
+set (ISO_C_BINDING_CODE
+ "
+ PROGRAM main
+ USE iso_c_binding
+ IMPLICIT NONE
+ TYPE(C_PTR) :: ptr
+ TYPE(C_FUNPTR) :: funptr
+ INTEGER(C_INT64_T) :: c_int64_type
+ CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr
+ ptr = C_LOC(ichr(1:1))
+ END PROGRAM
+ "
+)
+check_fortran_source_compiles (${ISO_C_BINDING_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING SRC_EXT f90)
+
+#-----------------------------------------------------------------------------
+# Add debug information (intel Fortran : JB)
+#-----------------------------------------------------------------------------
+if (CMAKE_Fortran_COMPILER MATCHES ifort)
+ if (WIN32 AND NOT MINGW)
+ set (CMAKE_Fortran_FLAGS_DEBUG "/debug:full /dbglibs " CACHE STRING "flags" FORCE)
+ set (CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG" CACHE STRING "flags" FORCE)
+ endif ()
+endif ()
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/LIBAEC/CMakeLists.txt b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/LIBAEC/CMakeLists.txt
new file mode 100644
index 00000000000..5d978275565
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/LIBAEC/CMakeLists.txt
@@ -0,0 +1,311 @@
+cmake_minimum_required (VERSION 3.18)
+project (LIBAEC C)
+
+#-----------------------------------------------------------------------------
+# Basic LIBAEC stuff here
+#-----------------------------------------------------------------------------
+set (CMAKE_C_STANDARD 99)
+set (CMAKE_C_VISIBILITY_PRESET hidden)
+set (CMAKE_POSITION_INDEPENDENT_CODE ON)
+
+set (LIBAEC_PACKAGE_EXT ${HDF_PACKAGE_EXT})
+set (HDF_USE_GNU_DIRS ${HDF5_USE_GNU_DIRS})
+set (CMAKE_OSX_ARCHITECTURES ${CMAKE_OSX_ARCHITECTURES})
+set (CMAKE_TOOLCHAIN_FILE ${CMAKE_TOOLCHAIN_FILE})
+set (PACKAGE_NAMESPACE ${HDF_PACKAGE_NAMESPACE})
+if (MINGW)
+ set (WINDOWS 1) # MinGW tries to imitate Windows
+endif ()
+if (WINDOWS)
+ set (HAVE_SYS_STAT_H 1)
+ set (HAVE_SYS_TYPES_H 1)
+endif ()
+
+if (NOT WINDOWS)
+ include (TestBigEndian)
+ test_big_endian (WORDS_BIGENDIAN)
+endif ()
+
+# Check for __builtin_clzll for faster decoding
+include (CheckCSourceCompiles)
+check_c_source_compiles(
+ "int main(void)\n{return __builtin_clzll(1LL);}"
+ HAVE_DECL___BUILTIN_CLZLL)
+
+if (NOT HAVE_DECL___BUILTIN_CLZLL)
+ # With MSVC we can use _BitScanReverse64
+ check_c_source_compiles (
+ "int main(void){unsigned long foo; unsigned __int64 bar=1LL;
+return _BitScanReverse64(&foo, bar);}"
+ HAVE_BSR64)
+endif ()
+
+include (CheckSymbolExists)
+check_symbol_exists (snprintf "stdio.h" HAVE_SNPRINTF)
+if (NOT HAVE_SNPRINTF)
+ check_symbol_exists (_snprintf "stdio.h" HAVE__SNPRINTF)
+ check_symbol_exists (_snprintf_s "stdio.h" HAVE__SNPRINTF_S)
+endif ()
+
+#-----------------------------------------------------------------------------
+# Define some CMake variables for use later in the project
+#-----------------------------------------------------------------------------
+set (LIBAEC_RESOURCES_DIR ${HDF_RESOURCES_DIR}/LIBAEC)
+set (LIBAEC_SRC_DIR ${LIBAEC_SOURCE_DIR}/src)
+set (LIBAEC_INC_DIR ${LIBAEC_SOURCE_DIR}/include)
+
+#-----------------------------------------------------------------------------
+# Set the core names of all the libraries
+#-----------------------------------------------------------------------------
+set (LIBAEC_LIB_CORENAME "aec")
+set (SZIP_LIB_CORENAME "szaec")
+
+#-----------------------------------------------------------------------------
+# Set the true names of all the libraries if customized by external project
+#-----------------------------------------------------------------------------
+set (LIBAEC_LIB_NAME "${LIBAEC_EXTERNAL_LIB_PREFIX}${LIBAEC_LIB_CORENAME}")
+set (SZIP_LIB_NAME "${LIBAEC_EXTERNAL_LIB_PREFIX}${SZIP_LIB_CORENAME}")
+
+#-----------------------------------------------------------------------------
+# Set the target names of all the libraries
+#-----------------------------------------------------------------------------
+set (LIBAEC_LIB_TARGET "${LIBAEC_LIB_CORENAME}-static")
+set (SZIP_LIB_TARGET "${SZIP_LIB_CORENAME}-static")
+
+set (libaec_VERS_MAJOR 1)
+set (libaec_VERS_MINOR 1)
+set (libaec_VERS_RELEASE 3)
+
+#-----------------------------------------------------------------------------
+set (LIBAEC_PACKAGE "libaec")
+set (LIBAEC_PACKAGE_NAME "LIBAEC")
+set (LIBAEC_PACKAGE_VERSION "${libaec_VERS_MAJOR}.${libaec_VERS_MINOR}")
+set (LIBAEC_PACKAGE_VERSION_MAJOR "${libaec_VERS_MAJOR}.${libaec_VERS_MINOR}")
+set (LIBAEC_PACKAGE_VERSION_MINOR "${libaec_VERS_RELEASE}")
+set (LIBAEC_PACKAGE_STRING "${LIBAEC_PACKAGE_NAME} ${LIBAEC_PACKAGE_VERSION}")
+set (LIBAEC_PACKAGE_TARNAME "${LIBAEC_PACKAGE_NAME}${LIBAEC_PACKAGE_EXT}")
+set (LIBAEC_PACKAGE_URL "http://www.hdfgroup.org")
+set (LIBAEC_PACKAGE_BUGREPORT "help@hdfgroup.org")
+set (LIBAEC_PACKAGE_SOVERSION "${libaec_VERS_MAJOR}.${libaec_VERS_MINOR}.${libaec_VERS_RELEASE}")
+set (LIBAEC_PACKAGE_SOVERSION_MAJOR "${libaec_VERS_MAJOR}")
+
+HDF_DIR_PATHS(${LIBAEC_PACKAGE_NAME})
+
+#-----------------------------------------------------------------------------
+# Targets built within this project are exported at Install time for use
+# by other projects
+#-----------------------------------------------------------------------------
+if (NOT LIBAEC_EXPORTED_TARGETS)
+ set (LIBAEC_EXPORTED_TARGETS "libaec-targets")
+endif ()
+
+set_global_variable (LIBAEC_LIBRARIES_TO_EXPORT "")
+
+#-----------------------------------------------------------------------------
+# All libs/tests/examples need the main include directories
+#-----------------------------------------------------------------------------
+set_directory_properties (PROPERTIES INCLUDE_DIRECTORIES
+ "${LIBAEC_BINARY_DIR};${LIBAEC_SOURCE_DIR}/src;${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
+)
+
+if (MSVC)
+ set (CMAKE_MFC_FLAG 0)
+ set(CMAKE_DEBUG_POSTFIX "d")
+endif ()
+
+set (EXE_EXT "")
+if (WIN32)
+ set (EXE_EXT ".exe")
+ add_compile_definitions (_BIND_TO_CURRENT_VCLIBS_VERSION=1)
+ add_compile_definitions (_CRT_SECURE_NO_WARNINGS)
+ add_compile_definitions (_CONSOLE)
+endif ()
+
+#-----------------------------------------------------------------------------
+# Compiler specific flags : Shouldn't there be compiler tests for these
+#-----------------------------------------------------------------------------
+if (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM" OR CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
+ set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
+endif ()
+
+#-----------------------------------------------------------------------------
+# This is in here to help some of the GCC based IDES like Eclipse
+# and code blocks parse the compiler errors and warnings better.
+#-----------------------------------------------------------------------------
+if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0")
+endif ()
+
+#-----------------------------------------------------------------------------
+# Generate the aec_config.h file containing user settings needed by compilation
+#-----------------------------------------------------------------------------
+configure_file (${LIBAEC_RESOURCES_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+# Create libaec.h with current version information
+configure_file(
+ "include/libaec.h.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/libaec.h")
+
+#-----------------------------------------------------------------------------
+# Define LIBAEC Library
+#-----------------------------------------------------------------------------
+
+set (LIBAEC_PUBLIC_HEADERS
+ ${CMAKE_CURRENT_BINARY_DIR}/libaec.h
+)
+
+set(LIBAEC_SRCS
+ ${LIBAEC_SRC_DIR}/encode.c
+ ${LIBAEC_SRC_DIR}/encode_accessors.c
+ ${LIBAEC_SRC_DIR}/decode.c
+ ${LIBAEC_SRC_DIR}/vector.c
+)
+
+add_library (${LIBAEC_LIB_TARGET} STATIC ${LIBAEC_SRCS} ${LIBAEC_PUBLIC_HEADERS})
+target_include_directories (${LIBAEC_LIB_TARGET} PUBLIC
+ "$"
+ "$"
+ "$"
+ "$")
+TARGET_C_PROPERTIES (${LIBAEC_LIB_TARGET} STATIC)
+H5_SET_LIB_OPTIONS (${LIBAEC_LIB_TARGET} ${LIBAEC_LIB_NAME} STATIC 0)
+set_target_properties (${LIBAEC_LIB_TARGET} PROPERTIES
+ VERSION 0.0.12 SOVERSION 0
+ PUBLIC_HEADER ""
+ LINKER_LANGUAGE C
+ INTERFACE_INCLUDE_DIRECTORIES "$/include>"
+)
+set_global_variable (LIBAEC_LIBRARIES_TO_EXPORT ${LIBAEC_LIB_TARGET})
+set (install_targets ${LIBAEC_LIB_TARGET})
+
+set(SZIP_SRCS
+ ${LIBAEC_SRC_DIR}/sz_compat.c
+)
+
+set (SZIP_PUBLIC_HEADERS
+ ${LIBAEC_INC_DIR}/szlib.h
+)
+
+add_library (${SZIP_LIB_TARGET} STATIC ${SZIP_SRCS} ${SZIP_PUBLIC_HEADERS})
+target_include_directories (${SZIP_LIB_TARGET} PUBLIC "${LIBAEC_SOURCE_DIR};${LIBAEC_SOURCE_DIR}/include;${CMAKE_BINARY_DIR}")
+TARGET_C_PROPERTIES (${SZIP_LIB_TARGET} STATIC)
+target_link_libraries (${SZIP_LIB_TARGET} PRIVATE ${LIBAEC_LIB_TARGET})
+H5_SET_LIB_OPTIONS (${SZIP_LIB_TARGET} ${SZIP_LIB_NAME} STATIC 0)
+set_target_properties (${SZIP_LIB_TARGET} PROPERTIES
+ VERSION 2.0.1 SOVERSION 2
+ PUBLIC_HEADER ""
+ LINKER_LANGUAGE C
+ INTERFACE_INCLUDE_DIRECTORIES "$/include>"
+)
+
+set_global_variable (LIBAEC_LIBRARIES_TO_EXPORT "${LIBAEC_LIBRARIES_TO_EXPORT};${SZIP_LIB_TARGET}")
+set (install_targets ${install_targets} ${SZIP_LIB_TARGET})
+
+#-----------------------------------------------------------------------------
+# Add Target(s) to CMake Install for import into other projects
+#-----------------------------------------------------------------------------
+if (LIBAEC_EXPORTED_TARGETS)
+ INSTALL_TARGET_PDB (${LIBAEC_LIB_TARGET} ${LIBAEC_INSTALL_BIN_DIR} libraries)
+
+ install (
+ TARGETS
+ ${install_targets}
+ EXPORT
+ ${LIBAEC_EXPORTED_TARGETS}
+ LIBRARY DESTINATION ${LIBAEC_INSTALL_LIB_DIR} COMPONENT libraries
+ ARCHIVE DESTINATION ${LIBAEC_INSTALL_LIB_DIR} COMPONENT libraries
+ RUNTIME DESTINATION ${LIBAEC_INSTALL_BIN_DIR} COMPONENT libraries
+ FRAMEWORK DESTINATION ${LIBAEC_INSTALL_FWRK_DIR} COMPONENT libraries
+ PUBLIC_HEADER DESTINATION ${LIBAEC_INSTALL_INCLUDE_DIR} COMPONENT headers
+ )
+endif ()
+
+include (CMakePackageConfigHelpers)
+
+#-----------------------------------------------------------------------------
+# Set includes needed for build
+#-----------------------------------------------------------------------------
+set (LIBAEC_INCLUDES_BUILD_TIME
+ ${LIBAEC_SRC_DIR} ${LIBAEC_INC_DIR} ${LIBAEC_BINARY_DIR}
+)
+
+#-----------------------------------------------------------------------------
+# Set variables needed for installation
+#-----------------------------------------------------------------------------
+set (LIBAEC_VERSION_STRING ${LIBAEC_PACKAGE_VERSION})
+set (LIBAEC_VERSION_MAJOR ${LIBAEC_PACKAGE_VERSION_MAJOR})
+set (LIBAEC_VERSION_MINOR ${LIBAEC_PACKAGE_VERSION_MINOR})
+
+#-----------------------------------------------------------------------------
+# Configure the libaec-config.cmake file for the build directory
+#-----------------------------------------------------------------------------
+set (INCLUDE_INSTALL_DIR ${LIBAEC_INSTALL_INCLUDE_DIR})
+set (SHARE_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/${LIBAEC_INSTALL_CMAKE_DIR}" )
+set (CURRENT_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}" )
+configure_package_config_file (
+ ${LIBAEC_RESOURCES_DIR}/libaec-config.cmake.in
+ "${LIBAEC_BINARY_DIR}/${LIBAEC_PACKAGE}${LIBAEC_PACKAGE_EXT}-config.cmake"
+ INSTALL_DESTINATION "${LIBAEC_INSTALL_CMAKE_DIR}"
+ PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
+ INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}"
+)
+
+#-----------------------------------------------------------------------------
+# Configure the libaec-config.cmake file for the install directory
+#-----------------------------------------------------------------------------
+set (INCLUDE_INSTALL_DIR ${LIBAEC_INSTALL_INCLUDE_DIR})
+set (SHARE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIBAEC_INSTALL_CMAKE_DIR}" )
+set (CURRENT_BUILD_DIR "${CMAKE_INSTALL_PREFIX}")
+configure_package_config_file (
+ ${LIBAEC_RESOURCES_DIR}/libaec-config.cmake.in
+ "${LIBAEC_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${LIBAEC_PACKAGE}${LIBAEC_PACKAGE_EXT}-config.cmake"
+ INSTALL_DESTINATION "${LIBAEC_INSTALL_CMAKE_DIR}"
+ PATH_VARS INCLUDE_INSTALL_DIR SHARE_INSTALL_DIR CURRENT_BUILD_DIR
+)
+if (NOT LIBAEC_EXTERNALLY_CONFIGURED)
+ install (
+ FILES ${LIBAEC_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${LIBAEC_PACKAGE}${LIBAEC_PACKAGE_EXT}-config.cmake
+ DESTINATION ${LIBAEC_INSTALL_CMAKE_DIR}
+ COMPONENT configinstall
+ )
+endif ()
+
+#-----------------------------------------------------------------------------
+# Configure the libaec-config-version.cmake file for the install directory
+#-----------------------------------------------------------------------------
+if (NOT LIBAEC_EXTERNALLY_CONFIGURED)
+ configure_file (
+ ${LIBAEC_RESOURCES_DIR}/libaec-config-version.cmake.in
+ ${LIBAEC_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${LIBAEC_PACKAGE}${LIBAEC_PACKAGE_EXT}-config-version.cmake @ONLY
+ )
+ install (
+ FILES ${LIBAEC_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${LIBAEC_PACKAGE}${LIBAEC_PACKAGE_EXT}-config-version.cmake
+ DESTINATION ${LIBAEC_INSTALL_CMAKE_DIR}
+ COMPONENT configinstall
+ )
+endif ()
+
+#-----------------------------------------------------------------------------
+# Add Target(s) to CMake Install for import into other projects
+#-----------------------------------------------------------------------------
+if (NOT LIBAEC_EXTERNALLY_CONFIGURED)
+ install (
+ EXPORT ${LIBAEC_EXPORTED_TARGETS}
+ DESTINATION ${LIBAEC_INSTALL_CMAKE_DIR}
+ FILE ${LIBAEC_PACKAGE}${LIBAEC_PACKAGE_EXT}-targets.cmake
+ NAMESPACE ${PACKAGE_NAMESPACE}
+ COMPONENT configinstall
+ )
+endif ()
+
+#-----------------------------------------------------------------------------
+# Export all exported targets to the build tree for use by parent project
+#-----------------------------------------------------------------------------
+if (NOT LIBAEC_EXTERNALLY_CONFIGURED)
+ export (
+ TARGETS ${LIBAEC_LIBRARIES_TO_EXPORT} ${LIBAEC_LIB_DEPENDENCIES}
+ FILE ${LIBAEC_PACKAGE}${LIBAEC_PACKAGE_EXT}-targets.cmake
+ NAMESPACE ${PACKAGE_NAMESPACE}
+ )
+ export (PACKAGE ${LIBAEC_PACKAGE}${LIBAEC_PACKAGE_EXT})
+endif ()
+
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/LIBAEC/CPack.Info.plist.in b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/LIBAEC/CPack.Info.plist.in
new file mode 100644
index 00000000000..b936470fc29
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/LIBAEC/CPack.Info.plist.in
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ English
+ CFBundleExecutable
+ @CPACK_PACKAGE_FILE_NAME@
+ CFBundleIconFile
+ @CPACK_BUNDLE_ICON@
+ CFBundleIdentifier
+ org.@CPACK_PACKAGE_VENDOR@.@CPACK_PACKAGE_NAME@@CPACK_MODULE_VERSION_SUFFIX@
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundlePackageType
+ FMWK
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ @CPACK_PACKAGE_VERSION@
+ CFBundleShortVersionString
+ @CPACK_SHORT_VERSION_STRING@
+ CSResourcesFileMapped
+
+
+
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/LIBAEC/config.h.in b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/LIBAEC/config.h.in
new file mode 100644
index 00000000000..25f30ee60ca
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/LIBAEC/config.h.in
@@ -0,0 +1,6 @@
+#cmakedefine WORDS_BIGENDIAN
+#cmakedefine01 HAVE_DECL___BUILTIN_CLZLL
+#cmakedefine HAVE_BSR64
+#cmakedefine HAVE_SNPRINTF
+#cmakedefine HAVE__SNPRINTF
+#cmakedefine HAVE__SNPRINTF_S
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/LIBAEC/libaec-config-version.cmake.in b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/LIBAEC/libaec-config-version.cmake.in
new file mode 100644
index 00000000000..d32ef969a13
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/LIBAEC/libaec-config-version.cmake.in
@@ -0,0 +1,15 @@
+set(PACKAGE_VERSION_MAJOR @PROJECT_VERSION_MAJOR@)
+set(PACKAGE_VERSION_MINOR @PROJECT_VERSION_MINOR@)
+set(PACKAGE_VERSION_PATCH @PROJECT_VERSION_PATCH@)
+set(PACKAGE_VERSION @PROJECT_VERSION@)
+
+# Check whether the requested PACKAGE_FIND_VERSION is compatible
+if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION OR
+ PACKAGE_VERSION_MAJOR GREATER PACKAGE_FIND_VERSION_MAJOR)
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
+else()
+ set(PACKAGE_VERSION_COMPATIBLE TRUE)
+ if(PACKAGE_VERSION VERSION_EQUAL PACKAGE_FIND_VERSION)
+ set(PACKAGE_VERSION_EXACT TRUE)
+ endif()
+endif()
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/LIBAEC/libaec-config.cmake.in b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/LIBAEC/libaec-config.cmake.in
new file mode 100644
index 00000000000..6f6c9e9ea8d
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/LIBAEC/libaec-config.cmake.in
@@ -0,0 +1,101 @@
+# libaec-config.cmake
+# ----------------
+#
+# Finds the AEC library, specify the starting search path in libaec_ROOT.
+#
+# Static vs. shared
+# -----------------
+# To make use of the static library instead of the shared one, one needs
+# to set the variable libaec_USE_STATIC_LIBS to ON before calling find_package.
+# Example:
+# set(libaec_USE_STATIC_LIBS ON)
+# find_package(libaec CONFIG)
+#
+# This will define the following variables:
+#
+# libaec_FOUND - True if the system has the AEC library.
+# libaec_VERSION - The version of the AEC library which was found.
+# SZIP_FOUND - True if the system has the SZIP library.
+# SZIP_VERSION - The version of the SZIP library which was found.
+# SZIP_LIBRARIES - All the required libraries to make use of SZIP.
+#
+# and the following imported targets:
+#
+# libaec::aec - The AEC library.
+# libaec::sz - The SZIP compatible version of the AEC library.
+
+find_path(libaec_INCLUDE_DIR NAMES libaec.h DOC "AEC include directory")
+find_path(SZIP_INCLUDE_DIR NAMES szlib.h DOC "SZIP include directory")
+if (libaec_USE_STATIC_LIBS)
+ if (MSVC)
+ find_library(libaec_LIBRARY NAMES aec-static.lib DOC "AEC library")
+ find_library(SZIP_LIBRARY NAMES szip-static.lib DOC "SZIP compatible version of the AEC library")
+ else ()
+ find_library(libaec_LIBRARY NAMES libaec.a DOC "AEC library")
+ find_library(SZIP_LIBRARY NAMES libsz.a DOC "SZIP compatible version of the AEC library")
+ endif ()
+else ()
+ find_library(libaec_LIBRARY NAMES aec DOC "AEC library")
+ find_library(SZIP_LIBRARY NAMES sz szip DOC "SZIP compatible version of the AEC library")
+endif ()
+
+# Check version here
+if (libaec_INCLUDE_DIR AND libaec_LIBRARY)
+ set(libaec_VERSION "@PROJECT_VERSION@")
+ set(SZIP_VERSION "2.0.1")
+endif ()
+
+include(FindPackageHandleStandardArgs)
+set(${CMAKE_FIND_PACKAGE_NAME}_CONFIG "${CMAKE_CURRENT_LIST_FILE}")
+find_package_handle_standard_args(libaec
+ FOUND_VAR libaec_FOUND
+ REQUIRED_VARS libaec_LIBRARY libaec_INCLUDE_DIR SZIP_LIBRARY SZIP_INCLUDE_DIR
+ VERSION_VAR libaec_VERSION
+ CONFIG_MODE
+)
+
+if (libaec_FOUND)
+ if (libaec_USE_STATIC_LIBS)
+ add_library(libaec::aec STATIC IMPORTED)
+ else ()
+ add_library(libaec::aec SHARED IMPORTED)
+ target_compile_definitions(libaec::aec INTERFACE LIBAEC_SHARED)
+ if (MSVC)
+ set_target_properties(libaec::aec PROPERTIES
+ IMPORTED_IMPLIB "${libaec_LIBRARY}"
+ )
+ endif ()
+ endif ()
+ set_target_properties(libaec::aec PROPERTIES
+ IMPORTED_LOCATION "${libaec_LIBRARY}"
+ INTERFACE_INCLUDE_DIRECTORIES "${libaec_INCLUDE_DIR}"
+ )
+
+ # SZIP
+ if (libaec_USE_STATIC_LIBS)
+ add_library(libaec::sz STATIC IMPORTED)
+ else ()
+ add_library(libaec::sz SHARED IMPORTED)
+ target_compile_definitions(libaec::sz INTERFACE LIBAEC_SHARED)
+ if (MSVC)
+ set_target_properties(libaec::sz PROPERTIES
+ IMPORTED_IMPLIB "${SZIP_LIBRARY}"
+ )
+ endif ()
+ endif ()
+ set_target_properties(libaec::sz PROPERTIES
+ IMPORTED_LOCATION "${SZIP_LIBRARY}"
+ INTERFACE_INCLUDE_DIRECTORIES "${SZIP_INCLUDE_DIR}"
+ )
+
+ # Set SZIP variables.
+ set(SZIP_FOUND TRUE)
+ set(SZIP_LIBRARIES "${SZIP_LIBRARY}")
+endif ()
+
+mark_as_advanced(
+ libaec_LIBRARY
+ libaec_INCLUDE_DIR
+ SZIP_LIBRARY
+ SZIP_INCLUDE_DIR
+)
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake_ext_mod/NSIS.InstallOptions.ini.in b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/NSIS.InstallOptions.ini.in
similarity index 100%
rename from Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake_ext_mod/NSIS.InstallOptions.ini.in
rename to Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/NSIS.InstallOptions.ini.in
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake_ext_mod/NSIS.template.in b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/NSIS.template.in
similarity index 99%
rename from Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake_ext_mod/NSIS.template.in
rename to Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/NSIS.template.in
index ecced05b28c..bbd6ae96ed3 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake_ext_mod/NSIS.template.in
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/NSIS.template.in
@@ -385,7 +385,7 @@ Function un.RemoveFromPath
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Uninstall sutff
+; Uninstall stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
###########################################
@@ -849,7 +849,7 @@ Section "Uninstall"
@CPACK_NSIS_DELETE_ICONS@
@CPACK_NSIS_DELETE_ICONS_EXTRA@
- ;Delete empty start menu parent diretories
+ ;Delete empty start menu parent directories
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
startMenuDeleteLoop:
@@ -868,7 +868,7 @@ Section "Uninstall"
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
@CPACK_NSIS_DELETE_ICONS_EXTRA@
- ;Delete empty start menu parent diretories
+ ;Delete empty start menu parent directories
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
secondStartMenuDeleteLoop:
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/README.txt.cmake.in b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/README.md.cmake.in
similarity index 79%
rename from Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/README.txt.cmake.in
rename to Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/README.md.cmake.in
index bc14e995ed3..40294c15255 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/README.txt.cmake.in
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/README.md.cmake.in
@@ -2,31 +2,26 @@
------------------------------------------------------------------------------
This directory contains the binary (release) distribution of
-@HDF5_PACKAGE_NAME@ @HDF5_PACKAGE_VERSION_MAJOR@ that was compiled on;
+@HDF5_PACKAGE_NAME@ @HDF5_PACKAGE_VERSION_MAJOR@.@HDF5_PACKAGE_VERSION_MINOR@ that was compiled on;
@BINARY_PLATFORM@.
It was built with the following options:
-- @LIB_TYPE@ C/C++/Fortran libraries
-- SZIP (encoder enabled) and ZLIB
- -- @LIB_TYPE@ HDF5 tools
+ -- HDF5 tools
-- Java @Java_VERSION@
The contents of this directory are:
COPYING - Copyright notice
- README.txt - This file
+ README.md - This file
@HDF5_PACKAGE_NAME@-@HDF5_PACKAGE_VERSION@-@BINARY_SYSTEM_NAME@.@BINARY_INSTALL_ENDING@ - HDF5 Install Package
+ OR
+ @HDF5_PACKAGE_NAME@-@HDF5_PACKAGE_VERSION@-@BINARY_SYSTEM_NAME@.@BINARY_COMPRESS_ENDING@ - HDF5 Compressed Package
This binary was built with the ZLIB and SZIP/Libaec external libraries and are
included for convenience. Libaec is an unrestricted open-source replacement for SZIP
-(version 1.0.4, Encoder ENABLED).
-
-The official ZLIB and SZIP/Libaec pages are at:
-
- ZLIB: https://git.savannah.gnu.org/cgit/gzip.git/
- https://git.savannah.gnu.org/cgit/gzip.git/tree/COPYING
- SZIP/Libaec: https://gitlab.dkrz.de/k202009/libaec
- https://gitlab.dkrz.de/k202009/libaec/-/blob/master/LICENSE.txt
+(Encoder ENABLED).
Installation
@@ -35,6 +30,11 @@ Installation
2. Follow prompts
===========================================================================
+Uncompress
+===========================================================================
+1. Extract @HDF5_PACKAGE_NAME@-@HDF5_PACKAGE_VERSION@-@BINARY_SYSTEM_NAME@.@BINARY_COMPRESS_ENDING@
+===========================================================================
+
After Installation
===========================================================================
The examples folder, HDF5Examples, located in the
@@ -67,7 +67,7 @@ To test the installation with the examples;
ctest -S HDF5_Examples.cmake,CTEST_SOURCE_NAME=MyExamples,INSTALLDIR=MyLocation -C Release -V -O test.log
When executed, the ctest script will save the results to the log file, test.log, as
-indicated by the ctest command. If you wish the to see more build and test information,
+indicated by the ctest command. If you wish to see more build and test information,
add "-VV" to the ctest command. The output should show;
100% tests passed, 0 tests failed out of 156.
@@ -75,6 +75,6 @@ For more information see USING_CMake_Examples.txt in the install folder.
===========================================================================
Documentation for this release can be found at the following URL:
- https://portal.hdfgroup.org/display/support
+ https://support.hdfgroup.org/releases/hdf5/@${H5_VERS_MAJOR}@_@${H5_VERS_MINOR}@/@${H5_VERS_MAJOR}@_@${H5_VERS_MINOR}@_@${H5_VERS_RELEASE}@/documentation/doxygen/index.html
Bugs should be reported to help@hdfgroup.org.
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/SignPackageFiles.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/SignPackageFiles.cmake
new file mode 100644
index 00000000000..81cc5bfff21
--- /dev/null
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/SignPackageFiles.cmake
@@ -0,0 +1,43 @@
+# This script signs the targets for the package
+message(STATUS "Signing script in ${CPACK_TEMPORARY_INSTALL_DIRECTORY} and ${CPACK_PACKAGE_INSTALL_DIRECTORY}")
+
+# RPM needs ALL_COMPONENTS_IN_ONE added to path between ${CPACK_TEMPORARY_INSTALL_DIRECTORY} and ${CPACK_PACKAGE_INSTALL_DIRECTORY}
+if (CPACK_GENERATOR MATCHES "RPM")
+ set (CPACK_TARGET_FILE_DIRECTORY "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/ALL_COMPONENTS_IN_ONE/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
+elseif (CPACK_GENERATOR MATCHES "WIX" OR CPACK_GENERATOR MATCHES "NSIS")
+ set (CPACK_TARGET_FILE_DIRECTORY "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/libraries")
+elseif (CPACK_GENERATOR MATCHES "ZIP")
+ set (CPACK_TARGET_FILE_DIRECTORY "${CPACK_TEMPORARY_INSTALL_DIRECTORY}")
+elseif (CPACK_GENERATOR MATCHES "DragNDrop")
+ set (CPACK_TARGET_FILE_DIRECTORY "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/ALL_IN_ONE/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
+else ()
+ set (CPACK_TARGET_FILE_DIRECTORY "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
+endif ()
+file (GLOB target_list LIST_DIRECTORIES false "${CPACK_TARGET_FILE_DIRECTORY}/lib/*" "${CPACK_TARGET_FILE_DIRECTORY}/bin/*" "${CPACK_TARGET_FILE_DIRECTORY}/lib/plugin/*")
+foreach (targetfile IN LISTS target_list)
+ if (WIN32)
+ # Sign the targets
+ execute_process (COMMAND $ENV{SIGNTOOLDIR}/signtool
+ sign /v /debug /fd SHA256 /tr http://timestamp.acs.microsoft.com /td SHA256
+ /dlib "Microsoft.Trusted.Signing.Client/bin/x64/Azure.CodeSigning.Dlib.dll" /dmdf ${CPACK_ORIG_SOURCE_DIR}/credentials.json
+ ${targetfile}
+ )
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E echo "Signing the target ${targetfile}"
+ )
+ elseif (APPLE)
+ # Sign the targets
+ execute_process (COMMAND codesign
+ --force --timestamp --options runtime --entitlements ${CPACK_ORIG_SOURCE_DIR}/config/cmake/distribution.entitlements
+ --verbose=4 --strict --sign "$ENV{SIGNER}"
+ ${targetfile}
+ )
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E echo "Signing the target ${targetfile}"
+ )
+ else ()
+ execute_process (
+ COMMAND ${CMAKE_COMMAND} -E echo "Signing the target ${targetfile}"
+ )
+ endif ()
+endforeach ()
diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/UseJava.cmake b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/UseJava.cmake
index 375004e2967..12e324ca599 100644
--- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/UseJava.cmake
+++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/UseJava.cmake
@@ -4,369 +4,545 @@
UseJava
-------
-Use Module for Java
-
-This file provides functions for Java. It is assumed that
+This file provides support for ``Java``. It is assumed that
:module:`FindJava` has already been loaded. See :module:`FindJava` for
information on how to load Java into your CMake project.
+Synopsis
+^^^^^^^^
+
+.. parsed-literal::
+
+ `Creating and Installing JARS`_
+ `add_jar`_ ( [SOURCES] [...] ...)
+ `install_jar`_ ( DESTINATION [COMPONENT ])
+ `install_jni_symlink`_ ( DESTINATION [COMPONENT ])
+
+ `Header Generation`_
+ `create_javah`_ ((TARGET | GENERATED_FILES ) CLASSES ... ...)
+
+ `Exporting JAR Targets`_
+ `install_jar_exports`_ (TARGETS ... FILE DESTINATION ...)
+ `export_jars`_ (TARGETS ... [NAMESPACE ] FILE )
+
+ `Finding JARs`_
+ `find_jar`_ ( NAMES [...] [PATHS [... ENV ]] ...)
+
+ `Creating Java Documentation`_
+ `create_javadoc`_ ( (PACKAGES [...] | FILES [...]) ...)
+
Creating And Installing JARs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-.. code-block:: cmake
+.. _add_jar:
- add_jar(
- [SOURCES] [...] [...]
- [INCLUDE_JARS [...]]
- [ENTRY_POINT ]
- [VERSION ]
- [OUTPUT_NAME ]
- [OUTPUT_DIR ]
- [GENERATE_NATIVE_HEADERS [DESTINATION ]]
- )
+.. command:: add_jar
-This command creates a ``.jar``. It compiles the given
-``