summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2015-11-05 19:03:06 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2015-11-05 19:03:06 (GMT)
commit26b328aec8e10b9101c76bc049b6b5045b5f00a5 (patch)
tree3d5cb4707febc7d52fe0d325fa06b143bfc68820
parenteb13dc7ec9281a9206f6e0a2a54151adf2ddecd3 (diff)
parent401f0c181ea8e9f486203a6b70710f0631a4a640 (diff)
downloadhdf5-26b328aec8e10b9101c76bc049b6b5045b5f00a5.zip
hdf5-26b328aec8e10b9101c76bc049b6b5045b5f00a5.tar.gz
hdf5-26b328aec8e10b9101c76bc049b6b5045b5f00a5.tar.bz2
[svn-r28288] merge from trunk.
-rw-r--r--CMakeInstallation.cmake12
-rw-r--r--CMakeLists.txt95
-rw-r--r--MANIFEST6
-rw-r--r--README.txt2
-rwxr-xr-xbin/bbrelease1
-rw-r--r--c++/src/H5AbstractDs.cpp12
-rw-r--r--c++/src/H5AbstractDs.h4
-rw-r--r--c++/src/H5Attribute.h2
-rw-r--r--c++/src/H5CppDoc.h8
-rw-r--r--c++/src/H5DataSet.cpp26
-rw-r--r--c++/src/H5DataType.cpp7
-rw-r--r--c++/src/H5DataType.h3
-rw-r--r--c++/src/H5DcreatProp.h3
-rw-r--r--c++/src/H5DxferProp.h4
-rw-r--r--c++/src/H5Exception.cpp6
-rw-r--r--c++/src/H5Exception.h4
-rw-r--r--c++/src/H5FaccProp.h3
-rw-r--r--c++/src/H5File.cpp84
-rw-r--r--c++/src/H5FloatType.h8
-rw-r--r--c++/src/H5IdComponent.cpp36
-rw-r--r--c++/src/H5IdComponent.h36
-rw-r--r--c++/src/H5Library.cpp72
-rw-r--r--c++/src/H5Library.h10
-rw-r--r--c++/src/H5Location.h3
-rw-r--r--c++/src/H5PropList.h3
-rw-r--r--c++/src/cpp_doc_config2
-rw-r--r--c++/test/tattr.cpp2
-rw-r--r--c++/test/tlinks.cpp2
-rw-r--r--config/cmake/ConversionTests.c14
-rw-r--r--config/cmake/H5pubconf.h.in21
-rw-r--r--config/cmake/HDF518_Examples.cmake.in106
-rw-r--r--config/cmake/HDF5UseFortran.cmake10
-rw-r--r--config/cmake/HDF5_Examples.cmake.in41
-rwxr-xr-xconfig/cmake/scripts/CTestScript.cmake90
-rwxr-xr-xconfig/cmake/scripts/HDF5config.cmake (renamed from config/cmake/scripts/HDF518config.cmake)160
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake103
-rw-r--r--config/cmake_ext_mod/HDFLibMacros.cmake114
-rw-r--r--config/cmake_ext_mod/HDFTests.c22
-rw-r--r--config/lt_vers.am2
-rw-r--r--configure.ac12
-rw-r--r--examples/h5_vds-simpleIO.c2
-rw-r--r--fortran/src/H5Of.c8
-rw-r--r--fortran/src/H5Tf.c3
-rw-r--r--hl/src/H5LTparse.y13
-rw-r--r--hl/test/test_lite.c1
-rw-r--r--release_docs/INSTALL_CMake.txt220
-rw-r--r--release_docs/RELEASE.txt6
-rw-r--r--release_docs/USING_CMake_Examples.txt10
-rw-r--r--release_docs/USING_HDF5_CMake.txt141
-rw-r--r--src/CMakeLists.txt58
-rw-r--r--src/H5FDmulti.c6
-rw-r--r--src/H5Fsuper.c1
-rw-r--r--src/H5Gint.c2
-rw-r--r--src/H5Odtype.c2
-rw-r--r--src/H5Omtime.c17
-rw-r--r--src/H5Pgcpl.c2
-rw-r--r--src/H5Pocpl.c1
-rw-r--r--src/H5T.c2
-rw-r--r--src/H5VLnative.c2
-rw-r--r--src/H5Ztrans.c1
-rw-r--r--src/H5private.h16
-rw-r--r--src/H5public.h19
-rw-r--r--src/H5system.c37
-rw-r--r--src/H5win32defs.h2
-rw-r--r--test/btree2.c2
-rw-r--r--test/cache_api.c140
-rw-r--r--test/dsets.c2
-rw-r--r--test/dtypes.c4
-rw-r--r--test/fillval.c2
-rw-r--r--test/links.c22
-rw-r--r--test/mf.c4
-rw-r--r--test/objcopy.c2
-rw-r--r--test/ohdr.c2
-rw-r--r--test/plugin.c2
-rw-r--r--test/set_extent.c4
-rw-r--r--test/stab.c2
-rw-r--r--test/tattr.c18
-rw-r--r--test/tfile.c6
-rw-r--r--test/th5o.c2
-rw-r--r--test/titerate.c2
-rw-r--r--test/tmisc.c2
-rw-r--r--test/unlink.c2
-rw-r--r--testpar/t_mpi.c18
-rw-r--r--tools/h5diff/CMakeTests.cmake6
-rw-r--r--tools/lib/h5diff_attr.c8
-rw-r--r--tools/perform/pio_standalone.h4
-rw-r--r--tools/perform/sio_standalone.h4
-rw-r--r--tools/testfiles/tldouble.h5bin2096 -> 2192 bytes
88 files changed, 1143 insertions, 840 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index f87119e..bb5f046 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -295,7 +295,11 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
endif (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
set (CPACK_PACKAGE_RELOCATABLE TRUE)
- set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
+ if (OVERRIDE_INSTALL_VERSION)
+ set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${OVERRIDE_INSTALL_VERSION}")
+ else (OVERRIDE_INSTALL_VERSION)
+ set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}")
+ endif (OVERRIDE_INSTALL_VERSION)
set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}/hdf.bmp")
set (CPACK_GENERATOR "TGZ")
@@ -324,7 +328,11 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
# set the package header icon for MUI
set (CPACK_PACKAGE_ICON "${HDF_RESOURCES_EXT_DIR}\\\\hdf.bmp")
set (CPACK_NSIS_DISPLAY_NAME "${CPACK_NSIS_PACKAGE_NAME}")
- set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}")
+ if (OVERRIDE_INSTALL_VERSION)
+ set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${OVERRIDE_INSTALL_VERSION}")
+ else (OVERRIDE_INSTALL_VERSION)
+ set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}\\\\${CPACK_PACKAGE_NAME}\\\\${CPACK_PACKAGE_VERSION}")
+ endif (OVERRIDE_INSTALL_VERSION)
set (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}")
set (CPACK_NSIS_MODIFY_PATH ON)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1035142..65124ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -193,10 +193,10 @@ endif (NOT HDF5_INSTALL_LIB_DIR)
if (NOT HDF5_INSTALL_INCLUDE_DIR)
set (HDF5_INSTALL_INCLUDE_DIR include)
endif (NOT HDF5_INSTALL_INCLUDE_DIR)
+option (HDF5_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" FALSE)
if (NOT HDF5_INSTALL_DATA_DIR)
if (NOT WIN32)
if (APPLE)
- option (HDF5_BUILD_FRAMEWORKS "Create a Mac OSX Framework" OFF)
if (HDF5_BUILD_FRAMEWORKS)
set (HDF5_INSTALL_EXTRA_DIR ../SharedSupport)
else (HDF5_BUILD_FRAMEWORKS)
@@ -321,7 +321,6 @@ set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
#-----------------------------------------------------------------------------
# Mac OS X Options
#-----------------------------------------------------------------------------
-option (HDF5_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, FALSE to build according to BUILD_SHARED_LIBS" TRUE)
if (HDF5_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS)
set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries")
endif (HDF5_BUILD_FRAMEWORKS AND NOT BUILD_SHARED_LIBS)
@@ -435,10 +434,6 @@ if (CMAKE_BUILD_TYPE MATCHES Debug)
set (H5_HAVE_INSTRUMENTED_LIBRARY 1)
endif (HDF5_ENABLE_INSTRUMENT)
mark_as_advanced (HDF5_ENABLE_INSTRUMENT)
- #-- NMake Makefiles will overwhelm the console with warnings if -Wall is used.
- if (NOT WIN32)
- add_definitions (-Wall)
- endif (NOT WIN32)
else (CMAKE_BUILD_TYPE MATCHES Debug)
add_definitions (-DNDEBUG)
if (HDF5_ENABLE_TRACE)
@@ -540,48 +535,54 @@ if (NOT HDF5_EXTERNALLY_CONFIGURED)
endif (NOT HDF5_EXTERNALLY_CONFIGURED)
#-----------------------------------------------------------------------------
# Option to use threadsafe
-# Note: Currently CMake only allows configuring of threadsafe on
-# non-Cygwin WINDOWS.
#-----------------------------------------------------------------------------
-if (WIN32)
- option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF)
- if (HDF5_ENABLE_THREADSAFE)
- # check for unsupported options
- message (STATUS " **** thread-safety option not supported with static library **** ")
- message (STATUS " **** thread-safety option will not be used building static library **** ")
- if (HDF5_ENABLE_PARALLEL)
- if (NOT ALLOW_UNSUPPORTED)
- message (FATAL_ERROR " **** parallel and thread-safety options are not supported **** ")
- else (NOT ALLOW_UNSUPPORTED)
- message (STATUS " **** Allowing unsupported parallel and thread-safety options **** ")
- endif (NOT ALLOW_UNSUPPORTED)
- endif (HDF5_ENABLE_PARALLEL)
- if (HDF5_BUILD_FORTRAN)
- if (NOT ALLOW_UNSUPPORTED)
- message (STATUS " **** Fortran and thread-safety options are not supported **** ")
- message (STATUS " **** thread-safety option will not be used building Fortran library **** ")
- else (NOT ALLOW_UNSUPPORTED)
- message (STATUS " **** Allowing unsupported Fortran and thread-safety options **** ")
- endif (NOT ALLOW_UNSUPPORTED)
- endif (HDF5_BUILD_FORTRAN)
- if (HDF5_BUILD_CPP_LIB)
- if (NOT ALLOW_UNSUPPORTED)
- message (STATUS " **** C++ and thread-safety options are not supported **** ")
- message (STATUS " **** thread-safety option will not be used building C++ library **** ")
- else (NOT ALLOW_UNSUPPORTED)
- message (STATUS " **** Allowing unsupported C++ and thread-safety options **** ")
- endif (NOT ALLOW_UNSUPPORTED)
- endif (HDF5_BUILD_CPP_LIB)
- if (H5_HAVE_IOEO)
- message (STATUS " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ")
- set (H5_HAVE_WIN_THREADS 1)
- else (H5_HAVE_IOEO)
- if (NOT H5_HAVE_PTHREAD_H)
- message (FATAL_ERROR " **** thread-safe option requires Win32 threads or Pthreads **** ")
- endif (NOT H5_HAVE_PTHREAD_H)
- endif (H5_HAVE_IOEO)
- endif (HDF5_ENABLE_THREADSAFE)
-endif (WIN32)
+option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF)
+if (HDF5_ENABLE_THREADSAFE)
+ # check for unsupported options
+ message (STATUS " **** thread-safety option not supported with static library **** ")
+ message (STATUS " **** thread-safety option will not be used building static library **** ")
+ if (HDF5_ENABLE_PARALLEL)
+ if (NOT ALLOW_UNSUPPORTED)
+ message (FATAL_ERROR " **** parallel and thread-safety options are not supported **** ")
+ else (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Allowing unsupported parallel and thread-safety options **** ")
+ endif (NOT ALLOW_UNSUPPORTED)
+ endif (HDF5_ENABLE_PARALLEL)
+ if (HDF5_BUILD_FORTRAN)
+ if (NOT ALLOW_UNSUPPORTED)
+ message (FATAL_ERROR " **** Fortran and thread-safety options are not supported **** ")
+ else (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Allowing unsupported Fortran and thread-safety options **** ")
+ endif (NOT ALLOW_UNSUPPORTED)
+ endif (HDF5_BUILD_FORTRAN)
+ if (HDF5_BUILD_CPP_LIB)
+ if (NOT ALLOW_UNSUPPORTED)
+ message (FATAL_ERROR " **** C++ and thread-safety options are not supported **** ")
+ else (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Allowing unsupported C++ and thread-safety options **** ")
+ endif (NOT ALLOW_UNSUPPORTED)
+ endif (HDF5_BUILD_CPP_LIB)
+ if (HDF5_BUILD_HL_LIB)
+ if (NOT ALLOW_UNSUPPORTED)
+ message (FATAL_ERROR " **** HL and thread-safety options are not supported **** ")
+ else (NOT ALLOW_UNSUPPORTED)
+ message (STATUS " **** Allowing unsupported HL and thread-safety options **** ")
+ endif (NOT ALLOW_UNSUPPORTED)
+ endif (HDF5_BUILD_HL_LIB)
+ if (H5_HAVE_IOEO)
+ message (STATUS " **** Win32 threads requires WINVER>=0x600 (Windows Vista/7/8) **** ")
+ set (H5_HAVE_WIN_THREADS 1)
+ else (H5_HAVE_IOEO)
+ if (NOT H5_HAVE_PTHREAD_H)
+ message (FATAL_ERROR " **** thread-safe option requires Win32 threads or Pthreads **** ")
+ endif (NOT H5_HAVE_PTHREAD_H)
+ endif (H5_HAVE_IOEO)
+ set(THREADS_PREFER_PTHREAD_FLAG ON)
+ find_package(Threads)
+ if (NOT Threads_FOUND)
+ message (STATUS " **** thread-safe package not found - threads still might work **** ")
+ endif (NOT Threads_FOUND)
+endif (HDF5_ENABLE_THREADSAFE)
# -----------------------------------------------------------------------
# wrapper script variables
diff --git a/MANIFEST b/MANIFEST
index ae5d164..956c997 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -32,7 +32,7 @@
./README.txt
./BRANCH.txt
./acsite.m4
-./autogen.sh _DO_NOT_DISTRIBUTE_
+./autogen.sh
./configure.ac
./bin/COPYING
@@ -2534,5 +2534,5 @@
./tools/perform/CMakeTests.cmake
# CMake-specific User Scripts
-./config/cmake/scripts/CTestScript.cmake _DO_NOT_DISTRIBUTE_
-./config/cmake/scripts/HDF518config.cmake _DO_NOT_DISTRIBUTE_
+./config/cmake/scripts/CTestScript.cmake
+./config/cmake/scripts/HDF5config.cmake
diff --git a/README.txt b/README.txt
index 7333a85..291e8a6 100644
--- a/README.txt
+++ b/README.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.232 currently under development
+HDF5 version 1.9.233 released on 2015-10-06
Please refer to the release_docs/INSTALL file for installation instructions.
------------------------------------------------------------------------------
diff --git a/bin/bbrelease b/bin/bbrelease
index 119dc7a..cb79528 100755
--- a/bin/bbrelease
+++ b/bin/bbrelease
@@ -304,7 +304,6 @@ fi
# Create a manifest that contains only files for distribution.
MANIFEST=$tmpdir/H5_MANIFEST
grep '^\.' MANIFEST | grep -v _DO_NOT_DISTRIBUTE_ >$MANIFEST
-echo "./autogen.sh" >>$MANIFEST
# Prepare the source tree for a release.
#ln -s `pwd` $tmpdir/$HDF5_VERS || exit 1
diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp
index 5929444..06b3e22 100644
--- a/c++/src/H5AbstractDs.cpp
+++ b/c++/src/H5AbstractDs.cpp
@@ -52,18 +52,6 @@ AbstractDs::AbstractDs(){}
AbstractDs::AbstractDs(const hid_t ds_id){}
//--------------------------------------------------------------------------
-// Function: AbstractDs copy constructor
-///\brief Copy constructor: makes a copy of the original AbstractDs object.
-// Programmer Binh-Minh Ribler - 2000
-// *** Deprecation warning ***
-// This constructor is no longer appropriate because the data member "id" had
-// been moved to the sub-classes. It is removed from 1.8.15 because it is
-// a noop and it can be generated by the compiler if needed.
-//--------------------------------------------------------------------------
-//--------------------------------------------------------------------------
-// AbstractDs::AbstractDs(const AbstractDs& original){}
-
-//--------------------------------------------------------------------------
// Function: AbstractDs::getTypeClass
///\brief Returns the class of the datatype that is used by this
/// object, which can be a dataset or an attribute.
diff --git a/c++/src/H5AbstractDs.h b/c++/src/H5AbstractDs.h
index 810dc8b..ee2e45e 100644
--- a/c++/src/H5AbstractDs.h
+++ b/c++/src/H5AbstractDs.h
@@ -68,7 +68,7 @@ class H5_DLLCPP AbstractDs {
///\brief Returns the amount of storage size required - pure virtual.
virtual hsize_t getStorageSize() const = 0;
- ///\brief Returns this class name.
+ // Returns this class name - pure virtual.
virtual H5std_string fromClass() const = 0;
// Destructor
@@ -91,7 +91,7 @@ class H5_DLLCPP AbstractDs {
// AbstractDs( const AbstractDs& original );
private:
- // This member function is implemented by DataSet and Attribute.
+ // This member function is implemented by DataSet and Attribute - pure virtual.
virtual hid_t p_get_type() const = 0;
};
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h
index eced64e..f5ee4a9 100644
--- a/c++/src/H5Attribute.h
+++ b/c++/src/H5Attribute.h
@@ -86,8 +86,8 @@ class H5_DLLCPP Attribute : public AbstractDs, public IdComponent {
// Destructor: properly terminates access to this attribute.
virtual ~Attribute();
- protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ protected:
// Sets the attribute id.
virtual void p_setId(const hid_t new_id);
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5CppDoc.h b/c++/src/H5CppDoc.h
index 388fc25..2420586 100644
--- a/c++/src/H5CppDoc.h
+++ b/c++/src/H5CppDoc.h
@@ -29,10 +29,10 @@
* The C++ API provides C++ wrappers for the HDF5 C Library.
*
* It is assumed that the user has knowledge of the
- * <a href="http://www.hdfgroup.org/HDF5/doc/H5.format.html">
+ * <a href="https://www.hdfgroup.org/HDF5/doc/H5.format.html">
* HDF5 file format</a> and its components.
* For more information on the HDF5 C Library, see the
- * <a href="http://www.hdfgroup.org/HDF5/doc/index.html">
+ * <a href="https://www.hdfgroup.org/HDF5/doc/index.html">
* HDF5 Software Documentation</a> page.
*
* Because the HDF5 C Library maps very well to
@@ -57,8 +57,8 @@
*
* The HDF5 C++ API is included with the HDF5 source code and can
* be obtained from
- * <a href="http://www.hdfgroup.org/HDF5/release/obtainsrc.html">
- * http://www.hdfgroup.org/HDF5/release/obtainsrc.html</a>.
+ * <a href="https://www.hdfgroup.org/HDF5/release/obtainsrc.html">
+ * https://www.hdfgroup.org/HDF5/release/obtainsrc.html</a>.
*
* Please refer to the release_docs/INSTALL file under the top directory
* of the HDF5 source code for information about installing, building,
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp
index 0fc9105..059da85 100644
--- a/c++/src/H5DataSet.cpp
+++ b/c++/src/H5DataSet.cpp
@@ -60,6 +60,12 @@ DataSet::DataSet() : H5Object(), AbstractDs(), id(H5I_INVALID_HID) {}
///\brief Creates an DataSet object using the id of an existing dataset.
///\param existing_id - IN: Id of an existing dataset
// Programmer Binh-Minh Ribler - 2000
+// Description
+// incRefCount() is needed here to prevent the id from being closed
+// prematurely. That is, when application uses the id of an
+// existing DataSet object to create another DataSet object. So,
+// when one of those objects is deleted, the id will be closed if
+// the reference counter is only 1.
//--------------------------------------------------------------------------
DataSet::DataSet(const hid_t existing_id) : H5Object(), AbstractDs()
{
@@ -172,8 +178,10 @@ DSetCreatPropList DataSet::getCreatePlist() const
{
throw DataSetIException("DataSet::getCreatePlist", "H5Dget_create_plist failed");
}
+
// create and return the DSetCreatPropList object
- DSetCreatPropList create_plist(create_plist_id); // ok to use existing id const
+ DSetCreatPropList create_plist;
+ f_PropList_setId(&create_plist, create_plist_id);
return(create_plist);
}
@@ -772,6 +780,22 @@ void DataSet::p_setId(const hid_t new_id)
// reset object's id to the given id
id = new_id;
}
+
+//--------------------------------------------------------------------------
+// Function: f_PropList_setId - friend
+// Purpose: This function is friend to class H5::PropList so that it
+// can set PropList::id in order to work around a problem
+// described in the JIRA issue HDFFV-7947.
+// 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_PropList_setId(PropList* plist, hid_t new_id)
+{
+ plist->p_setId(new_id);
+}
+
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index 88dff89..1bbabe3 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -144,10 +144,10 @@ DataType::DataType(const DataType& original) : H5Object()
//--------------------------------------------------------------------------
// Function: DataType overloaded constructor
-///\brief Creates a integer type using a predefined type
+///\brief Creates a DataType instance using a predefined type
///\param pred_type - IN: Predefined datatype
///\exception H5::DataTypeIException
-// Programmer Binh-Minh Ribler - 2000
+// 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.
@@ -239,8 +239,7 @@ DataType& DataType::operator=( const DataType& rhs )
{
if (this != &rhs)
{
- id = rhs.id;
- incRefCount(); // increment number of references to this id
+ setId(rhs.id);
}
return(*this);
}
diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h
index 6c8a312..5705b83 100644
--- a/c++/src/H5DataType.h
+++ b/c++/src/H5DataType.h
@@ -14,6 +14,9 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+// Class DataType inherits from H5Object and has several subclasses for
+// specific HDF5 data types.
+
#ifndef __H5DataType_H
#define __H5DataType_H
diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h
index ebdadc4..792956a 100644
--- a/c++/src/H5DcreatProp.h
+++ b/c++/src/H5DcreatProp.h
@@ -14,6 +14,9 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+// Class DSetCreatPropList represents the HDF5 dataset creation property list
+// and inherits from PropList.
+
#ifndef __H5DSCreatPropList_H
#define __H5DSCreatPropList_H
diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h
index 85d2ec2..52a9a48 100644
--- a/c++/src/H5DxferProp.h
+++ b/c++/src/H5DxferProp.h
@@ -14,6 +14,9 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+// Class DSetMemXferPropList represents the HDF5 dataset transfer property list
+// and inherits from PropList.
+
#ifndef __H5DSetMemXferPropList_H
#define __H5DSetMemXferPropList_H
@@ -132,4 +135,3 @@ class H5_DLLCPP DSetMemXferPropList : public PropList {
}
#endif
#endif // __H5DSetMemXferPropList_H
-
diff --git a/c++/src/H5Exception.cpp b/c++/src/H5Exception.cpp
index fb1e42e..1ca059b 100644
--- a/c++/src/H5Exception.cpp
+++ b/c++/src/H5Exception.cpp
@@ -309,9 +309,9 @@ const char* Exception::getCFuncName() const
//--------------------------------------------------------------------------
void Exception::printErrorStack(FILE* stream, hid_t err_stack)
{
- herr_t ret_value = H5Eprint2(err_stack, stream);
- if( ret_value < 0 )
- throw Exception( "Printing error stack", "H5Eprint2 failed" );
+ herr_t ret_value = H5Eprint2(err_stack, stream);
+ if( ret_value < 0 )
+ throw Exception( "Printing error stack", "H5Eprint2 failed" );
}
//--------------------------------------------------------------------------
diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h
index 639b633..d49c19a 100644
--- a/c++/src/H5Exception.h
+++ b/c++/src/H5Exception.h
@@ -86,8 +86,8 @@ class H5_DLLCPP Exception {
virtual ~Exception() throw();
protected:
- // Default value for detail_message
- static const char DEFAULT_MSG[];
+ // Default value for detail_message
+ static const char DEFAULT_MSG[];
private:
H5std_string detail_message;
diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h
index 7d6529e..b214447 100644
--- a/c++/src/H5FaccProp.h
+++ b/c++/src/H5FaccProp.h
@@ -14,6 +14,9 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+// Class FileAccPropList represents the HDF5 file access property list and
+// inherits from DataType.
+
#ifndef __H5FileAccPropList_H
#define __H5FileAccPropList_H
diff --git a/c++/src/H5File.cpp b/c++/src/H5File.cpp
index 85fc8d8..b6e9f51 100644
--- a/c++/src/H5File.cpp
+++ b/c++/src/H5File.cpp
@@ -133,28 +133,26 @@ void H5File::p_get_file(const char* name, unsigned int flags, const FileCreatPro
// create the file.
if( flags & (H5F_ACC_EXCL|H5F_ACC_TRUNC))
{
- hid_t create_plist_id = create_plist.getId();
- hid_t access_plist_id = access_plist.getId();
- id = H5Fcreate( name, flags, create_plist_id, access_plist_id );
- if( id < 0 ) // throw an exception when open/create fail
- {
- throw FileIException("H5File constructor", "H5Fcreate failed");
- }
+ hid_t create_plist_id = create_plist.getId();
+ hid_t access_plist_id = access_plist.getId();
+ id = H5Fcreate( name, flags, create_plist_id, access_plist_id );
+ if( id < 0 ) // throw an exception when open/create fail
+ {
+ throw FileIException("H5File constructor", "H5Fcreate failed");
+ }
}
// Open the file if none of the bits above are set.
else
{
- hid_t access_plist_id = access_plist.getId();
- id = H5Fopen( name, flags, access_plist_id );
- if( id < 0 ) // throw an exception when open/create fail
- {
- throw FileIException("H5File constructor", "H5Fopen failed");
- }
+ hid_t access_plist_id = access_plist.getId();
+ id = H5Fopen( name, flags, access_plist_id );
+ if( id < 0 ) // throw an exception when open/create fail
+ {
+ throw FileIException("H5File constructor", "H5Fopen failed");
+ }
}
}
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
//--------------------------------------------------------------------------
// Function: H5File overloaded constructor
///\brief Creates an H5File object using an existing file id.
@@ -174,6 +172,8 @@ H5File::H5File(hid_t existing_id) : H5Location(), CommonFG()
incRefCount(); // increment number of references to this id
}
+#endif // DOXYGEN_SHOULD_SKIP_THIS
+
//--------------------------------------------------------------------------
// Function: H5File copy constructor
///\brief Copy constructor: makes a copy of the original
@@ -528,16 +528,16 @@ hsize_t H5File::getFileSize() const
}
//--------------------------------------------------------------------------
-// Function: H5File::getId
+// Function: H5File::getId
///\brief Get the id of this file
///\return File identifier
// Modification:
-// May 2008 - BMR
-// Class hierarchy is revised to address bugzilla 1068. Class
-// 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
+// May 2008 - BMR
+// Class hierarchy is revised to address bugzilla 1068. Class
+// 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 H5File::getId() const
{
@@ -546,42 +546,42 @@ hid_t H5File::getId() const
#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
-// Function: H5File::getLocId
-// Purpose: Get the id of this file
+// Function: H5File::reopen
+// Purpose: Reopens this file.
+// Exception H5::FileIException
// Description
-// This function is a redefinition of CommonFG::getLocId. It
-// is used by CommonFG member functions to get the file id.
+// This function is replaced by the above function reOpen.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-hid_t H5File::getLocId() const
+void H5File::reopen()
{
- return( getId() );
+ H5File::reOpen();
}
//--------------------------------------------------------------------------
-// Function: H5File::reopen
-// Purpose: Reopens this file.
-// Exception H5::FileIException
+// Function: H5File::getLocId
+// Purpose: Get the id of this file
// Description
-// This function is replaced by the above function reOpen.
+// This function is a redefinition of CommonFG::getLocId. It
+// is used by CommonFG member functions to get the file id.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
-void H5File::reopen()
+hid_t H5File::getLocId() const
{
- H5File::reOpen();
+ return( getId() );
}
//--------------------------------------------------------------------------
-// Function: H5File::p_setId (protected)
-///\brief Sets the identifier of this object to a new value.
+// Function: H5File::p_setId (protected)
+///\brief Sets the identifier of this object to a new value.
///
-///\exception H5::IdComponentException when the attempt to close the HDF5
-/// object fails
+///\exception H5::IdComponentException when the attempt to close the HDF5
+/// object fails
// Description:
-// The underlaying 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
+// The underlaying 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 H5File::p_setId(const hid_t new_id)
{
diff --git a/c++/src/H5FloatType.h b/c++/src/H5FloatType.h
index 06a5450..e88093e 100644
--- a/c++/src/H5FloatType.h
+++ b/c++/src/H5FloatType.h
@@ -24,10 +24,10 @@ namespace H5 {
//! Class FloatType operates on HDF5 floating point datatype.
class H5_DLLCPP FloatType : public AtomType {
public:
- // Creates a floating-point type using a predefined type
- FloatType( const PredType& pred_type );
+ // Creates a floating-point type using a predefined type.
+ FloatType( const PredType& pred_type );
- // Gets the floating-point datatype of the specified dataset
+ // Gets the floating-point datatype of the specified dataset.
FloatType( const DataSet& dataset );
// Retrieves the exponent bias of a floating-point type.
@@ -60,7 +60,7 @@ class H5_DLLCPP FloatType : public AtomType {
// Default constructor
FloatType();
- // Creates a floating-point datatype using an existing id
+ // Creates a floating-point datatype using an existing id.
FloatType( const hid_t existing_id );
// Copy constructor: makes a copy of the original FloatType object.
diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp
index 93ee4fd..60735f0 100644
--- a/c++/src/H5IdComponent.cpp
+++ b/c++/src/H5IdComponent.cpp
@@ -26,14 +26,19 @@
namespace H5 {
#endif
-// This flag controls whether H5Library::initH5cpp has been called to register
-// terminating functions with atexit()
+// This flag indicates whether H5Library::initH5cpp has been called to register
+// the terminating functions with atexit()
bool IdComponent::H5cppinit = false;
+
+// This flag is used to decide whether H5dont_atexit should be called.
+// Subclasses that have global constants use it. This is a temporary
+// work-around in 1.8.16. It will be removed after HDFFV-9540 is fixed.
bool IdComponent::H5dontAtexit_called = false;
//--------------------------------------------------------------------------
// Function: IdComponent overloaded constructor
-// Purpose Creates an IdComponent object using the id of an existing object.
+///\brief Creates an IdComponent object using the id of an existing
+/// object. - Obsolete, will be removed in 1.8.17
// Param h5_id - IN: Id of an existing object
// Exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
@@ -43,25 +48,10 @@ bool IdComponent::H5dontAtexit_called = false;
// been moved to the sub-classes. It will be removed in 1.10 release. If its
// removal does not raise any problems in 1.10, it will be removed from 1.8 in
// subsequent releases.
-// - Removed from documentation in 1.8.16 -BMR (October 2015)
//--------------------------------------------------------------------------
IdComponent::IdComponent(const hid_t h5_id) {}
//--------------------------------------------------------------------------
-// Function: IdComponent copy constructor
-// Purpose: This noop copy constructor is removed as a result of the data
-// member "id" being moved down to sub-classes. (Mar 2015)
-// Parameters: original - IN: IdComponent instance to copy
-// Programmer Binh-Minh Ribler - 2000
-//
-// *** Deprecation warning ***
-// This constructor is no longer appropriate because the data member "id" had
-// been moved to the sub-classes. It is removed from 1.8.15 because it is
-// a noop and it can be generated by the compiler if needed.
-//--------------------------------------------------------------------------
-// IdComponent::IdComponent(const IdComponent& original) {}
-
-//--------------------------------------------------------------------------
// Function: IdComponent::incRefCount
///\brief Increment reference counter for a given id.
// Programmer Binh-Minh Ribler - May 2005
@@ -227,7 +217,7 @@ IdComponent& IdComponent::operator=( const IdComponent& rhs )
//--------------------------------------------------------------------------
// Function: IdComponent::setId
///\brief Sets the identifier of this object to a new value.
-///
+///\param new_id - IN: New identifier to be set to
///\exception H5::IdComponentException when the attempt to close the HDF5
/// object fails
// Description:
@@ -242,8 +232,8 @@ IdComponent& IdComponent::operator=( const IdComponent& rhs )
// C++ API object, which will be destroyed properly, and so
// p_setId does not call incRefCount. On the other hand, the
// public version setId is used by other applications, in which
-// the id passed to setId already has a reference count, so setId
-// must call incRefCount.
+// the id passed to setId is that of another C++ API object, so
+// setId must call incRefCount.
//--------------------------------------------------------------------------
void IdComponent::setId(const hid_t new_id)
{
@@ -295,10 +285,10 @@ H5std_string IdComponent::inMemFunc(const char* func_name) const
IdComponent::IdComponent()
{
// initH5cpp will register the terminating functions with atexit().
- // We only do this once.
+ // This should only be done once.
if (!H5cppinit)
{
- H5Library::getInstance()->initH5cpp();
+ H5Library::initH5cpp();
H5cppinit = true;
}
}
diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h
index 1c29f09..61c8bd6 100644
--- a/c++/src/H5IdComponent.h
+++ b/c++/src/H5IdComponent.h
@@ -17,6 +17,8 @@
#ifndef __IdComponent_H
#define __IdComponent_H
+// IdComponent represents an HDF5 object that has an identifier.
+
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
@@ -30,12 +32,7 @@ class DataSpace;
rarely needs them.
*/
class H5_DLLCPP IdComponent {
- public:
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
- static bool H5cppinit;
- static bool H5dontAtexit_called;
-#endif // DOXYGEN_SHOULD_SKIP_THIS
+ public:
// Increment reference counter.
void incRefCount(const hid_t obj_id) const;
@@ -58,11 +55,6 @@ class H5_DLLCPP IdComponent {
// Assignment operator.
IdComponent& operator=( const IdComponent& rhs );
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Gets the identifier of this object.
- virtual hid_t getId () const = 0;
-#endif // DOXYGEN_SHOULD_SKIP_THIS
-
// Sets the identifier of this object to a new value.
void setId(const hid_t new_id);
@@ -76,10 +68,14 @@ class H5_DLLCPP IdComponent {
// Creates an object to hold an HDF5 identifier.
IdComponent( const hid_t h5_id );
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
// Copy constructor: makes copy of the original IdComponent object.
- // IdComponent( const IdComponent& original );
+ // IdComponent( const IdComponent& original ); - removed from 1.8.15
+
+ // Gets the identifier of this object.
+ virtual hid_t getId () const = 0;
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Pure virtual function for there are various H5*close for the
// subclasses.
virtual void close() = 0;
@@ -96,11 +92,12 @@ class H5_DLLCPP IdComponent {
// Destructor
virtual ~IdComponent();
- protected:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+ protected:
// Default constructor.
IdComponent();
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Gets the name of the file, in which an HDF5 object belongs.
H5std_string p_get_file_name() const;
@@ -110,7 +107,14 @@ class H5_DLLCPP IdComponent {
// 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) = 0;
- //virtual void p_setId(const hid_t new_id);
+
+ // This flag is used to decide whether H5dont_atexit should be called
+ static bool H5dontAtexit_called;
+
+ private:
+ // This flag indicates whether H5Library::initH5cpp has been called
+ // to register various terminating functions with atexit()
+ static bool H5cppinit;
#endif // DOXYGEN_SHOULD_SKIP_THIS
diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp
index e7e9fb6..40c766a 100644
--- a/c++/src/H5Library.cpp
+++ b/c++/src/H5Library.cpp
@@ -38,11 +38,14 @@ namespace H5 {
#endif
#ifndef DOXYGEN_SHOULD_SKIP_THIS
-H5Library* H5Library::instance = 0;
+
+// This static variable is unused, will be removed in future releases.
+bool H5Library::need_cleanup = false;
+
#endif // DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
-// Function: H5Library::open
+// Function: H5Library::open (static)
///\brief Initializes the HDF5 library.
///
///\exception H5::LibraryIException
@@ -58,7 +61,7 @@ void H5Library::open()
}
//--------------------------------------------------------------------------
-// Function: H5Library::close
+// Function: H5Library::close (static)
///\brief Flushes all data to disk, closes files, and cleans up memory.
///
///\exception H5::LibraryIException
@@ -74,7 +77,7 @@ void H5Library::close()
}
//--------------------------------------------------------------------------
-// Function: H5Library::dontAtExit
+// Function: H5Library::dontAtExit (static)
///\brief Instructs library not to install the C \c atexit cleanup routine
///
///\exception H5::LibraryIException
@@ -89,7 +92,7 @@ void H5Library::dontAtExit()
}
//--------------------------------------------------------------------------
-// Function: H5Library::getLibVersion
+// Function: H5Library::getLibVersion (static)
///\brief Returns the HDF library release number.
///\param majnum - OUT: Major version of the library
///\param minnum - OUT: Minor version of the library
@@ -107,7 +110,7 @@ void H5Library::getLibVersion( unsigned& majnum, unsigned& minnum, unsigned& rel
}
//--------------------------------------------------------------------------
-// Function: H5Library::checkVersion
+// Function: H5Library::checkVersion (static)
///\brief Verifies that the arguments match the version numbers
/// compiled into the library
///\param majnum - IN: Major version of the library
@@ -130,7 +133,7 @@ void H5Library::checkVersion(unsigned majnum, unsigned minnum, unsigned relnum)
}
//--------------------------------------------------------------------------
-// Function: H5Library::garbageCollect
+// Function: H5Library::garbageCollect (static)
///\brief Walks through all the garbage collection routines for the
/// library, which are supposed to free any unused memory they
/// have allocated.
@@ -159,7 +162,7 @@ void H5Library::garbageCollect()
}
//--------------------------------------------------------------------------
-// Function: H5Library::initH5cpp
+// Function: H5Library::initH5cpp (static)
///\brief Initializes C++ library and registers terminating functions at
/// exit. Only for the library functions, not for user-defined
/// functions.
@@ -167,52 +170,56 @@ void H5Library::garbageCollect()
// initH5cpp registers the following functions with std::atexit():
// termH5cpp() - calls H5close() after all cleanup in
// the C++ library is done
-// <classname>::deleteConstants - deletes all references for
-// <classname> global constants
+// <classname>::deleteConstants - deletes all references
+// for <classname> global constants
///\exception H5::LibraryIException
//
// Programmer Binh-Minh Ribler - September, 2015
//--------------------------------------------------------------------------
void H5Library::initH5cpp()
{
- // Register terminating functions with atexit(); they will be invoked in the
- // reversed order
+ // Register terminating functions with atexit(); they will be invoked in
+ // the reversed order
int ret_value = 0;
ret_value = std::atexit(termH5cpp);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registration of termH5cpp failed");
+ throw LibraryIException("H5Library::initH5cpp", "Registrating termH5cpp failed");
ret_value = std::atexit(PredType::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registration of PredType::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp", "Registrating PredType::deleteConstants failed");
ret_value = std::atexit(PropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registration of PropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp", "Registrating PropList::deleteConstants failed");
ret_value = std::atexit(FileAccPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registration of FileAccPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp", "Registrating FileAccPropList::deleteConstants failed");
ret_value = std::atexit(FileCreatPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registration of FileCreatPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp", "Registrating FileCreatPropList::deleteConstants failed");
ret_value = std::atexit(DSetMemXferPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registration of DSetMemXferPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp", "Registrating DSetMemXferPropList::deleteConstants failed");
ret_value = std::atexit(DSetCreatPropList::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registration of DSetCreatPropList::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp", "Registrating DSetCreatPropList::deleteConstants failed");
+
+ ret_value = std::atexit(ObjCreatPropList::deleteConstants);
+ if (ret_value != 0)
+ throw LibraryIException("H5Library::initH5cpp", "Registrating ObjCreatPropList::deleteConstants failed");
ret_value = std::atexit(DataSpace::deleteConstants);
if (ret_value != 0)
- throw LibraryIException("H5Library::initH5cpp", "Registration of DataSpace::deleteConstants failed");
+ throw LibraryIException("H5Library::initH5cpp", "Registrating DataSpace::deleteConstants failed");
}
//--------------------------------------------------------------------------
-// Function: H5Library::termH5cpp
+// Function: H5Library::termH5cpp (static)
///\brief Sends request for the C layer to terminate.
///\par Description
/// If the C library fails to terminate, exit with a failure.
@@ -227,24 +234,7 @@ void H5Library::termH5cpp()
}
//--------------------------------------------------------------------------
-// Function: H5Library::getInstance
-///\brief Provides a way to instantiate the class.
-///\par Description
-/// getInstance ensures that only one instance of the H5Library
-/// is created.
-// Programmer Binh-Minh Ribler - September, 2015
-//--------------------------------------------------------------------------
-H5Library* H5Library::getInstance()
-{
- if (H5Library::instance == 0)
- {
- instance = new H5Library();
- }
- return(instance);
-}
-
-//--------------------------------------------------------------------------
-// Function: H5Library::setFreeListLimits
+// Function: H5Library::setFreeListLimits (static)
///\brief Sets limits on the different kinds of free lists.
///\param reg_global_lim - IN: Limit on all "regular" free list memory used
///\param reg_list_lim - IN: Limit on memory used in each "regular" free list
@@ -271,10 +261,10 @@ void H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim,
}
}
-// Default constructor - no instance ever created by outsiders
+// Default constructor - private
H5Library::H5Library(){};
-// Destructor
+// Destructor - private
H5Library::~H5Library(){};
#ifndef H5_NO_NAMESPACE
diff --git a/c++/src/H5Library.h b/c++/src/H5Library.h
index 68ab039..336f9c8 100644
--- a/c++/src/H5Library.h
+++ b/c++/src/H5Library.h
@@ -29,6 +29,11 @@ namespace H5 {
*/
class H5_DLLCPP H5Library {
public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static bool need_cleanup; // indicates if H5close should be called
+ // - unused, will be removed in future releases.
+#endif // DOXYGEN_SHOULD_SKIP_THIS
+
// Initializes the HDF5 library.
static void open();
@@ -60,15 +65,10 @@ class H5_DLLCPP H5Library {
// Sends request for terminating the HDF5 library.
static void termH5cpp(void);
- static H5Library* getInstance();
-
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
- // private instance to be created by H5Library only
- static H5Library* instance;
-
// Default constructor - no instance ever created from outsiders
H5Library();
diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h
index 79a8d5c..9e4ec05 100644
--- a/c++/src/H5Location.h
+++ b/c++/src/H5Location.h
@@ -150,9 +150,6 @@ class H5_DLLCPP H5Location : public IdComponent {
// Creates a copy of an existing object giving the location id.
H5Location(const hid_t loc_id);
- // Copy constructor.
- // H5Location(const H5Location& original);
-
// Creates a reference to an HDF5 object or a dataset region.
void p_reference(void* ref, const char* name, hid_t space_id, H5R_type_t ref_type) const;
diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h
index be04451..7f6ee31 100644
--- a/c++/src/H5PropList.h
+++ b/c++/src/H5PropList.h
@@ -127,6 +127,9 @@ class H5_DLLCPP PropList : public IdComponent {
// Dynamically allocates the PropList global constant
static PropList* getConstant();
+ // Friend function to set PropList id. For library use only.
+ friend void f_PropList_setId(PropList* plist, hid_t new_id);
+
#endif // DOXYGEN_SHOULD_SKIP_THIS
};
diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config
index c020531..7060fd2 100644
--- a/c++/src/cpp_doc_config
+++ b/c++/src/cpp_doc_config
@@ -38,7 +38,7 @@ PROJECT_NAME = "HDF5 C++ API"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = "1.9.232 currently under development"
+PROJECT_NUMBER = "1.9.233 currently under development"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/c++/test/tattr.cpp b/c++/test/tattr.cpp
index 5b32554..936ee63 100644
--- a/c++/test/tattr.cpp
+++ b/c++/test/tattr.cpp
@@ -1794,7 +1794,7 @@ void test_attr()
// use_shared test
// Loop over using new group format
- hbool_t new_format;
+ unsigned new_format;
for (new_format = FALSE; new_format <= TRUE; new_format++)
{
FileAccPropList curr_fapl;
diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp
index 572f649..57738d7 100644
--- a/c++/test/tlinks.cpp
+++ b/c++/test/tlinks.cpp
@@ -466,7 +466,7 @@ extern "C"
void test_links()
{
hid_t fapl_id, fapl2_id; /* File access property lists */
- hbool_t new_format; /* Whether to use the new format or not */
+ unsigned new_format; /* Whether to use the new format or not */
const char *envval;
envval = HDgetenv("HDF5_DRIVER");
diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c
index d964bf8..b8946a8 100644
--- a/config/cmake/ConversionTests.c
+++ b/config/cmake/ConversionTests.c
@@ -1,5 +1,8 @@
#ifdef H5_LDOUBLE_TO_LONG_SPECIAL_TEST
+#include <string.h>
+#include <stdlib.h>
+
int main(void)
{
long double ld = 20041683600089727.779961L;
@@ -58,6 +61,9 @@ done:
#ifdef H5_LONG_TO_LDOUBLE_SPECIAL_TEST
+#include <string.h>
+#include <stdlib.h>
+
int main(void)
{
long double ld;
@@ -117,6 +123,10 @@ done:
#endif
#ifdef H5_LDOUBLE_TO_LLONG_ACCURATE_TEST
+
+#include <string.h>
+#include <stdlib.h>
+
int main(void)
{
long double ld = 20041683600089727.779961L;
@@ -156,6 +166,10 @@ done:
#endif
#ifdef H5_LLONG_TO_LDOUBLE_CORRECT_TEST
+
+#include <string.h>
+#include <stdlib.h>
+
int main(void)
{
long double ld;
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 72fd19a..0f862c9 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -160,6 +160,9 @@
/* Define to 1 if you have the `gettimeofday' function. */
#cmakedefine H5_HAVE_GETTIMEOFDAY @H5_HAVE_GETTIMEOFDAY@
+/* Define if the compiler understands inline */
+#cmakedefine H5_HAVE_INLINE @H5_HAVE_INLINE@
+
/* Define if library will contain instrumentation to detect correct
optimization operation */
#cmakedefine H5_HAVE_INSTRUMENTED_LIBRARY @H5_HAVE_INSTRUMENTED_LIBRARY@
@@ -374,6 +377,12 @@
/* 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 HDF5's high-level library headers should be included in hdf5.h */
#cmakedefine H5_INCLUDE_HL @H5_INCLUDE_HL@
@@ -566,6 +575,12 @@
/* The size of `__int64', as computed by sizeof. */
#define H5_SIZEOF___INT64 @H5_SIZEOF___INT64@
+/* Define to 1 if you have the <stdbool.h> header file. */
+#cmakedefine H5_HAVE_STDBOOL_H @H5_HAVE_STDBOOL_H@
+
+/* The size of `bool', as computed by sizeof. */
+#cmakedefine H5_SIZEOF_BOOL @H5_SIZEOF_BOOL@
+
/* Define to 1 if you have the ANSI C header files. */
#cmakedefine H5_STDC_HEADERS @H5_STDC_HEADERS@
@@ -622,12 +637,6 @@
/* Define to empty if `const' does not conform to ANSI C. */
#cmakedefine H5_const
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-#cmakedefine H5_inline @H5_inline@
-#endif
-
/* Define to `long int' if <sys/types.h> does not define. */
#cmakedefine H5_off_t
diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in
index c82fcf2..0e3b26d 100644
--- a/config/cmake/HDF518_Examples.cmake.in
+++ b/config/cmake/HDF518_Examples.cmake.in
@@ -1,47 +1,85 @@
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
###############################################################################################################
-# This script will build and run the examples from a compressed file
+# This script will build and run the examples from a folder
# Execute from a command line:
-# ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -VV -O test.log
+# ctest -S HDF518_Examples.cmake,OPTION=VALUE -C Release -VV -O test.log
###############################################################################################################
-set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
-set(STATICLIBRARIES "@H5_ENABLE_STATIC_LIB@")
-set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG})
set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
-set(CTEST_BUILD_CONFIGURATION "Release")
-#set(NO_MAC_FORTRAN "true")
-#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
-#set(CTEST_USE_TAR_SOURCE "${CTEST_SCRIPT_ARG}")
+
+# handle input parameters to script.
+#INSTALLDIR - HDF5-1.8 root folder
+#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
+#CTEST_SOURCE_NAME - name of source folder; HDF4Examples
+#STATIC_LIBRARIES - Default is YES
+#FORTRAN_LIBRARIES - Default is NO
+##NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac)
+if(DEFINED CTEST_SCRIPT_ARG)
+ # transform ctest script arguments of the form
+ # script.ctest,var1=value1,var2=value2
+ # to variables with the respective names set to the respective values
+ string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
+ foreach(current_var ${script_args})
+ if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
+ set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
+ endif()
+ endforeach()
+endif()
+if(NOT DEFINED INSTALLDIR)
+ set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@")
+endif()
+if(NOT DEFINED CTEST_BUILD_CONFIGURATION)
+ set(CTEST_BUILD_CONFIGURATION "Release")
+endif()
+if(NOT DEFINED CTEST_SOURCE_NAME)
+ set(CTEST_SOURCE_NAME "HDF5Examples")
+endif()
+if(NOT DEFINED STATIC_LIBRARIES)
+ set(STATICLIBRARIES "YES")
+endif()
+if(NOT DEFINED FORTRAN_LIBRARIES)
+ set(FORTRANLIBRARIES "NO")
+endif()
+
+#TAR_SOURCE - name of tarfile
+#if(NOT DEFINED TAR_SOURCE)
+# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.2.1-Source")
+#endif()
###############################################################################################################
# Adjust the following SET Commands as needed
###############################################################################################################
if(WIN32)
- if(STATICLIBRARIES)
+ if(${STATICLIBRARIES})
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
- endif(STATICLIBRARIES)
+ endif()
set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake")
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build)
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
else(WIN32)
- if(STATICLIBRARIES)
+ if(${STATICLIBRARIES})
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
- endif(STATICLIBRARIES)
+ endif()
set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake")
set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib")
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
endif(WIN32)
+if(${FORTRANLIBRARIES})
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
+else()
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
+endif()
+set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@")
###############################################################################################################
# For any comments please contact cdashhelp@hdfgroup.org
#
###############################################################################################################
-
+
#-----------------------------------------------------------------------------
# MAC machines need special option
#-----------------------------------------------------------------------------
@@ -52,14 +90,14 @@ if(APPLE)
set(ENV{CC} "${XCODE_CC}")
set(ENV{CXX} "${XCODE_CXX}")
if(NOT NO_MAC_FORTRAN)
- # Shared fortran is not supported, build static
+ # Shared fortran is not supported, build static
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
- else(NOT NO_MAC_FORTRAN)
+ else()
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
- endif(NOT NO_MAC_FORTRAN)
+ endif()
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
-endif(APPLE)
-
+endif()
+
#-----------------------------------------------------------------------------
set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
## --------------------------
@@ -68,28 +106,28 @@ if(CTEST_USE_TAR_SOURCE)
## --------------------------
if(WIN32)
message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip]")
- execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
- else(WIN32)
+ execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
+ else()
message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]")
- execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
- endif(WIN32)
-
+ execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
+ endif()
+
if(NOT rv EQUAL 0)
message(STATUS "extracting... [error-(${rv}) clean up]")
file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed")
- endif(NOT rv EQUAL 0)
+ endif()
endif(CTEST_USE_TAR_SOURCE)
-
+
#-----------------------------------------------------------------------------
## Clear the build directory
## --------------------------
set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
-else (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+else ()
file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
-endif (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+endif ()
# Use multiple CPU cores to build
include(ProcessorCount)
@@ -97,17 +135,17 @@ ProcessorCount(N)
if(NOT N EQUAL 0)
if(NOT WIN32)
set(CTEST_BUILD_FLAGS -j${N})
- endif(NOT WIN32)
+ endif()
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
endif()
set (CTEST_CONFIGURE_COMMAND
"${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
-
+
#-----------------------------------------------------------------------------
## -- set output to english
set($ENV{LC_MESSAGES} "en_EN")
-
+
#-----------------------------------------------------------------------------
configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
@@ -119,7 +157,7 @@ ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
if(res GREATER 0)
message (FATAL_ERROR "tests FAILED")
-endif(res GREATER 0)
+endif()
#-----------------------------------------------------------------------------
-##############################################################################################################
-message(STATUS "DONE")
+##############################################################################################################
+message(STATUS "DONE") \ No newline at end of file
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index 8ca10a7..c3e5a24 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -217,9 +217,9 @@ list(GET PROG_OUTPUT 4 NUM_RKIND)
set(H5CONFIG_F_NUM_IKIND "INTEGER, PARAMETER :: num_ikinds = ${NUM_IKIND}")
set(H5CONFIG_F_IKIND "INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/${pac_validIntKinds}/)")
-message ( " ........REAL KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}")
-message ( " ........INTEGER KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}")
-message ( " ........MAX DECIMAL PRECISION ${H5_PAC_FC_MAX_REAL_PRECISION}")
+message (STATUS "....REAL KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}")
+message (STATUS "....INTEGER KINDS FOUND ${PAC_FC_ALL_REAL_KINDS}")
+message (STATUS "....MAX DECIMAL PRECISION ${H5_PAC_FC_MAX_REAL_PRECISION}")
#-----------------------------------------------------------------------------
# Determine the available KINDs for REALs and INTEGERs
@@ -258,7 +258,7 @@ string(REGEX REPLACE " " "" pack_int_sizeof "${pack_int_sizeof}")
set(PAC_FC_ALL_INTEGER_KINDS_SIZEOF "\{${pack_int_sizeof}\}")
-message("...FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}")
+message(STATUS "....FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}")
# **********
# REALS
# **********
@@ -297,7 +297,7 @@ string(REGEX REPLACE " " "" pack_real_sizeof "${pack_real_sizeof}")
set(H5CONFIG_F_RKIND_SIZEOF "INTEGER, DIMENSION(1:num_rkinds) :: rkind_sizeof = (/${pack_real_sizeof}/)")
-message("...FOUND SIZEOF for REAL KINDs \{${pack_real_sizeof}\}")
+message(STATUS "....FOUND SIZEOF for REAL KINDs \{${pack_real_sizeof}\}")
set(PAC_FC_ALL_REAL_KINDS_SIZEOF "\{${pack_real_sizeof}\}")
diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in
index 65e2e9e..a25eef5 100644
--- a/config/cmake/HDF5_Examples.cmake.in
+++ b/config/cmake/HDF5_Examples.cmake.in
@@ -7,14 +7,14 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
-#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
# handle input parameters to script.
#INSTALLDIR - HDF5 root folder
#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
#CTEST_SOURCE_NAME - name of source folder; HDF4Examples
-#STATICLIBRARIES - Default is YES
-#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac)
+#STATIC_LIBRARIES - Default is YES
+#FORTRAN_LIBRARIES - Default is NO
+##NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac)
if(DEFINED CTEST_SCRIPT_ARG)
# transform ctest script arguments of the form
# script.ctest,var1=value1,var2=value2
@@ -35,9 +35,12 @@ endif()
if(NOT DEFINED CTEST_SOURCE_NAME)
set(CTEST_SOURCE_NAME "HDF5Examples")
endif()
-if(NOT DEFINED STATICLIBRARIES)
+if(NOT DEFINED STATIC_LIBRARIES)
set(STATICLIBRARIES "YES")
endif()
+if(NOT DEFINED FORTRAN_LIBRARIES)
+ set(FORTRANLIBRARIES "NO")
+endif()
#TAR_SOURCE - name of tarfile
#if(NOT DEFINED TAR_SOURCE)
@@ -48,23 +51,29 @@ endif()
# Adjust the following SET Commands as needed
###############################################################################################################
if(WIN32)
- if(STATICLIBRARIES)
+ if(${STATICLIBRARIES})
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
- endif(STATICLIBRARIES)
+ endif()
set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake")
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build)
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
else(WIN32)
- if(STATICLIBRARIES)
+ if(${STATICLIBRARIES})
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
- endif(STATICLIBRARIES)
+ endif()
set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake")
set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib")
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
endif(WIN32)
+if(${FORTRANLIBRARIES})
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
+else()
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
+endif()
+set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@")
###############################################################################################################
# For any comments please contact cdashhelp@hdfgroup.org
@@ -83,11 +92,11 @@ if(APPLE)
if(NOT NO_MAC_FORTRAN)
# Shared fortran is not supported, build static
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
- else(NOT NO_MAC_FORTRAN)
+ else()
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
- endif(NOT NO_MAC_FORTRAN)
+ endif()
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
-endif(APPLE)
+endif()
#-----------------------------------------------------------------------------
set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
@@ -107,7 +116,7 @@ if(CTEST_USE_TAR_SOURCE)
message(STATUS "extracting... [error-(${rv}) clean up]")
file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed")
- endif(NOT rv EQUAL 0)
+ endif()
endif(CTEST_USE_TAR_SOURCE)
#-----------------------------------------------------------------------------
@@ -116,9 +125,9 @@ endif(CTEST_USE_TAR_SOURCE)
set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
-else (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+else ()
file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
-endif (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+endif ()
# Use multiple CPU cores to build
include(ProcessorCount)
@@ -126,7 +135,7 @@ ProcessorCount(N)
if(NOT N EQUAL 0)
if(NOT WIN32)
set(CTEST_BUILD_FLAGS -j${N})
- endif(NOT WIN32)
+ endif()
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
endif()
set (CTEST_CONFIGURE_COMMAND
@@ -148,7 +157,7 @@ ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
if(res GREATER 0)
message (FATAL_ERROR "tests FAILED")
-endif(res GREATER 0)
+endif()
#-----------------------------------------------------------------------------
##############################################################################################################
message(STATUS "DONE") \ No newline at end of file
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
index 0cd686a..403eedd 100755
--- a/config/cmake/scripts/CTestScript.cmake
+++ b/config/cmake/scripts/CTestScript.cmake
@@ -4,9 +4,9 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
# For any comments please contact cdashhelp@hdfgroup.org
#
########################################################
-# -----------------------------------------------------------
+# -----------------------------------------------------------
# -- Get environment
-# -----------------------------------------------------------
+# -----------------------------------------------------------
if(NOT SITE_OS_NAME)
## machine name not provided - attempt to discover with uname
## -- set hostname
@@ -18,7 +18,7 @@ if(NOT SITE_OS_NAME)
macro(getuname name flag)
exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
endmacro(getuname)
-
+
getuname(osname -s)
getuname(osrel -r)
getuname(cpu -m)
@@ -45,7 +45,7 @@ else(NOT SITE_OS_NAME)
endif()
set(BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
endif(NOT SITE_OS_NAME)
-
+
#-----------------------------------------------------------------------------
# MAC machines need special option
#-----------------------------------------------------------------------------
@@ -56,6 +56,13 @@ if(APPLE)
set(ENV{CC} "${XCODE_CC}")
set(ENV{CXX} "${XCODE_CXX}")
+ if(NOT NO_MAC_FORTRAN)
+ # Shared fortran is not supported, build static
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
+ else(NOT NO_MAC_FORTRAN)
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+ endif(NOT NO_MAC_FORTRAN)
+
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
endif(APPLE)
@@ -66,10 +73,10 @@ if(CTEST_USE_TAR_SOURCE)
## Uncompress source if tar file provided
## --------------------------
if(WIN32)
- message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_USE_TAR_SOURCE}.zip]")
+ message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]")
execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
else()
- message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]")
+ message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar]")
execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
endif()
@@ -78,8 +85,9 @@ if(CTEST_USE_TAR_SOURCE)
file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
message(FATAL_ERROR "error: extract of ${CTEST_USE_TAR_SOURCE} failed")
endif()
-
+
file(RENAME ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE} ${CTEST_SOURCE_DIRECTORY})
+ set(LOCAL_SKIP_UPDATE "TRUE")
else(CTEST_USE_TAR_SOURCE)
if(LOCAL_UPDATE)
if(CTEST_USE_GIT_SOURCE)
@@ -120,7 +128,7 @@ else(CTEST_USE_TAR_SOURCE)
if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
set(NEED_REPOSITORY_CHECKOUT 1)
endif()
-
+
if(NOT CTEST_REPO_VERSION)
set(CTEST_REPO_VERSION "HEAD")
endif()
@@ -135,7 +143,7 @@ else(CTEST_USE_TAR_SOURCE)
endif(CTEST_USE_GIT_SOURCE)
endif(LOCAL_UPDATE)
endif(CTEST_USE_TAR_SOURCE)
-
+
#-----------------------------------------------------------------------------
## Clear the build directory
## --------------------------
@@ -155,14 +163,25 @@ if(NOT N EQUAL 0)
endif()
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
endif()
-
+
#-----------------------------------------------------------------------------
# Send the main script as a note.
-list(APPEND CTEST_NOTES_FILES
- "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
- "${CMAKE_CURRENT_LIST_FILE}"
- "${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
-)
+if(USE_AUTOTOOLS)
+ ## autotools builds need to use make and does not use the cacheinit.cmake file
+ ## -- make command
+ ## -----------------
+ find_program(MAKE NAMES make)
+ list(APPEND CTEST_NOTES_FILES
+ "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
+ "${CMAKE_CURRENT_LIST_FILE}"
+ )
+else()
+ list(APPEND CTEST_NOTES_FILES
+ "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
+ "${CMAKE_CURRENT_LIST_FILE}"
+ "${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
+ )
+endif()
#-----------------------------------------------------------------------------
# Check for required variables.
@@ -176,28 +195,35 @@ foreach(req
message(FATAL_ERROR "The containing script must set ${req}")
endif()
endforeach(req)
-
+
#-----------------------------------------------------------------------------
# Initialize the CTEST commands
#------------------------------
-if(LOCAL_MEMCHECK_TEST)
- find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
- set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
- )
-else()
- if(LOCAL_COVERAGE_TEST)
- find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
+if(USE_AUTOTOOLS)
+ set(CTEST_CONFIGURE_COMMAND "${CTEST_SOURCE_DIRECTORY}/configure ${ADD_BUILD_OPTIONS}")
+ set(CTEST_BUILD_COMMAND "${MAKE} ${CTEST_BUILD_FLAGS}")
+ configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
+ file(WRITE ${CTEST_BINARY_DIRECTORY}/CTestTestfile.cmake "ADD_TEST(makecheck \"${MAKE}\" \"${CTEST_BUILD_FLAGS}\" \"-i\" \"check\")")
+else(USE_AUTOTOOLS)
+ if(LOCAL_MEMCHECK_TEST)
+ find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
+ set (CTEST_CONFIGURE_COMMAND
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ )
+ else()
+ if(LOCAL_COVERAGE_TEST)
+ find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
+ endif()
+ set (CTEST_CONFIGURE_COMMAND
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ )
endif()
- set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
- )
endif()
#-----------------------------------------------------------------------------
## -- set output to english
set($ENV{LC_MESSAGES} "en_EN")
-
+
# Print summary information.
foreach(v
CTEST_SITE
@@ -215,7 +241,7 @@ foreach(v
set(vars "${vars} ${v}=[${${v}}]\n")
endforeach(v)
message(STATUS "Dashboard script configuration:\n${vars}\n")
-
+
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
## NORMAL process
@@ -235,12 +261,12 @@ message(STATUS "Dashboard script configuration:\n${vars}\n")
if(LOCAL_SUBMIT)
ctest_submit (PARTS Update Configure Notes)
endif()
-
+
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
if(LOCAL_SUBMIT)
ctest_submit (PARTS Build)
endif()
-
+
if(NOT LOCAL_SKIP_TEST)
if(NOT LOCAL_MEMCHECK_TEST)
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
@@ -263,7 +289,7 @@ message(STATUS "Dashboard script configuration:\n${vars}\n")
endif()
endif()
endif(NOT LOCAL_SKIP_TEST)
-
+
if(NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE)
##-----------------------------------------------
## Package the product
diff --git a/config/cmake/scripts/HDF518config.cmake b/config/cmake/scripts/HDF5config.cmake
index aee5389..8bcc56b 100755
--- a/config/cmake/scripts/HDF518config.cmake
+++ b/config/cmake/scripts/HDF5config.cmake
@@ -1,16 +1,98 @@
-##########################################################################
-### For Windows ${CTEST_SCRIPT_ARG} is one of ###
-### [64-VS2013, 32-VS2013, 64-VS2012, 32-VS2012] ###
-### ctest -S HDF518config.cmake,32-VS2012 -C Release -VV -O hdf518.log ###
-### ###
-### Other platforms do not use ${CTEST_SCRIPT_ARG} ###
-### ctest -S HDF518config.cmake -C Release -VV -O hdf518.log ###
-##########################################################################
+#############################################################################################
+### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ###
+### BUILD_GENERATOR required [Unix, VS2015, VS201564, VS2013, VS201364, VS2012, VS201264] ###
+### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201264 -C Release -V -O hdf519.log ###
+#############################################################################################
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
-set(CTEST_SOURCE_VERSION 1.8.15)
+############################################################################
+# Usage:
+# ctest -S HDF518config.cmake,OPTION=VALUE -C Release -VV -O test.log
+# where valid options for OPTION are:
+# BUILD_GENERATOR - The cmake build generator:
+# Unix * Unix Makefiles
+# VS2015 * Visual Studio 14 2015
+# VS201564 * Visual Studio 14 2015 Win64
+# VS2013 * Visual Studio 12 2013
+# VS201364 * Visual Studio 12 2013 Win64
+# VS2012 * Visual Studio 11 2012
+# VS201264 * Visual Studio 11 2012 Win64
+#
+# INSTALLDIR - root folder where hdf5 is installed
+# CTEST_BUILD_CONFIGURATION - Release, Debug, etc
+# CTEST_SOURCE_NAME - source folder
+# STATIC_LIBRARIES - Build/use static libraries
+# FORTRAN_LIBRARIES - Build/use fortran libraries
+# NO_MAC_FORTRAN - Yes to be SHARED on a Mac
+##############################################################################
+
+set(CTEST_SOURCE_VERSION 1.9)
set(CTEST_SOURCE_VERSEXT "")
-set(CTEST_SOURCE_NAME hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT})
+
+##############################################################################
+# handle input parameters to script.
+#BUILD_GENERATOR - which CMake generator to use, required
+#INSTALLDIR - HDF5-1.9 root folder
+#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
+#CTEST_SOURCE_NAME - name of source folder; HDF5-1.9
+#STATIC_LIBRARIES - Default is YES
+#FORTRAN_LIBRARIES - Default is NO
+#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac
+if(DEFINED CTEST_SCRIPT_ARG)
+ # transform ctest script arguments of the form
+ # script.ctest,var1=value1,var2=value2
+ # to variables with the respective names set to the respective values
+ string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
+ foreach(current_var ${script_args})
+ if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
+ set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
+ endif()
+ endforeach()
+endif()
+
+# build generator must be defined
+if(NOT DEFINED BUILD_GENERATOR)
+ message(FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
+else()
+ if(${BUILD_GENERATOR} STREQUAL "Unix")
+ set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2015")
+ set(CTEST_CMAKE_GENERATOR "Visual Studio 14 2015")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201564")
+ set(CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2013")
+ set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201364")
+ set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2012")
+ set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
+ set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
+ else()
+ message(FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
+ endif()
+endif()
+
+if(NOT DEFINED INSTALLDIR)
+ if(WIN32)
+ set(INSTALLDIR "C:\\Program\ Files\\myhdf5")
+ else()
+ set(INSTALLDIR "/usr/local/myhdf5")
+ endif()
+endif()
+if(NOT DEFINED CTEST_BUILD_CONFIGURATION)
+ set(CTEST_BUILD_CONFIGURATION "Release")
+endif()
+if(NOT DEFINED CTEST_SOURCE_NAME)
+ set(CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
+endif()
+if(NOT DEFINED STATIC_LIBRARIES)
+ set(STATICLIBRARIES "YES")
+endif()
+if(NOT DEFINED FORTRAN_LIBRARIES)
+ set(FORTRANLIBRARIES "NO")
+endif()
+
set(CTEST_BINARY_NAME "build")
set(CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}")
if(WIN32)
@@ -22,40 +104,38 @@ else()
endif()
###################################################################
-### Following Line is one of [Release, RelWithDebInfo, Debug] #####
-set(CTEST_BUILD_CONFIGURATION "Release")
-###################################################################
-
-###################################################################
######### Following describes compiler ############
if(WIN32)
set(SITE_OS_NAME "Windows")
set(SITE_OS_VERSION "WIN7")
- if(${CTEST_SCRIPT_ARG} STREQUAL "64-VS2013")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
+ if(${BUILD_GENERATOR} STREQUAL "VS201564")
+ set(SITE_OS_BITS "64")
+ set(SITE_COMPILER_NAME "vs2015")
+ set(SITE_COMPILER_VERSION "14")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2015")
+ set(SITE_OS_BITS "32")
+ set(SITE_COMPILER_NAME "vs2015")
+ set(SITE_COMPILER_VERSION "14")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201364")
set(SITE_OS_BITS "64")
set(SITE_COMPILER_NAME "vs2013")
set(SITE_COMPILER_VERSION "12")
- elseif(${CTEST_SCRIPT_ARG} STREQUAL "32-VS2013")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2013")
set(SITE_OS_BITS "32")
set(SITE_COMPILER_NAME "vs2013")
set(SITE_COMPILER_VERSION "12")
- elseif(${CTEST_SCRIPT_ARG} STREQUAL "64-VS2012")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
set(SITE_OS_BITS "64")
set(SITE_COMPILER_NAME "vs2012")
set(SITE_COMPILER_VERSION "11")
- elseif(${CTEST_SCRIPT_ARG} STREQUAL "32-VS2012")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2012")
set(SITE_OS_BITS "32")
set(SITE_COMPILER_NAME "vs2012")
set(SITE_COMPILER_VERSION "11")
endif()
## Set the following to unique id your computer ##
- set(CTEST_SITE "WIN7${CTEST_SCRIPT_ARG}.XXXX")
+ set(CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX")
else()
- set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
## Set the following to unique id your computer ##
if(APPLE)
set(CTEST_SITE "MAC.XXXX")
@@ -69,9 +149,6 @@ endif()
######### Following is for submission to CDash ############
###################################################################
set(MODEL "Experimental")
-######### Following describes computer ############
-## following is optional to describe build ##
-set(SITE_BUILDNAME_SUFFIX "STATIC")
###################################################################
###################################################################
@@ -85,19 +162,25 @@ set(SITE_BUILDNAME_SUFFIX "STATIC")
#set(LOCAL_NO_PACKAGE "TRUE")
##### Following controls source update #####
#set(LOCAL_UPDATE "TRUE")
-set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/branches/hdf5_1_8")
+set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/trunk")
#uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows
-#set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
+#set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}")
###################################################################
###################################################################
#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ")
-### uncomment/comment or change the following lines for configuration options
+###################################################################
+if(${STATICLIBRARIES})
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
+ ######### Following describes computer ############
+ ## following is optional to describe build ##
+ set(SITE_BUILDNAME_SUFFIX "STATIC")
+endif()
+###################################################################
-### comment the following line or change OFF to ON in order to build shared libraries
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
+### uncomment/comment and change the following lines for other configuration options
#### ext libraries ####
### ext libs from tgz
@@ -112,10 +195,11 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF")
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
#### fortran ####
-### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
-### disable Fortran; change OFF to ON in order to build FORTRAN libraries
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+if(${FORTRANLIBRARIES})
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
+else()
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+endif()
### disable test program builds
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
@@ -126,7 +210,7 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
### change install prefix
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=install")
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}")
###################################################################
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index 6885187..fd502e5 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -31,13 +31,13 @@ if (APPLE)
endif (APPLE)
# Check for Darwin (not just Apple - we also want to catch OpenDarwin)
-if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- set (${HDF_PREFIX}_HAVE_DARWIN 1)
+if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set (${HDF_PREFIX}_HAVE_DARWIN 1)
endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# Check for Solaris
-if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
- set (${HDF_PREFIX}_HAVE_SOLARIS 1)
+if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ set (${HDF_PREFIX}_HAVE_SOLARIS 1)
endif (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
#-----------------------------------------------------------------------------
@@ -141,10 +141,6 @@ MACRO (HDF_FUNCTION_TEST OTHER_TEST)
set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
endif (CMAKE_REQUIRED_LIBRARIES)
- foreach (def ${HDF_EXTRA_TEST_DEFINITIONS})
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}=${${def}}")
- endforeach (def)
-
foreach (def
HAVE_SYS_TIME_H
HAVE_UNISTD_H
@@ -422,6 +418,19 @@ if (NOT ${HDF_PREFIX}_SIZEOF_OFF64_T)
set (${HDF_PREFIX}_SIZEOF_OFF64_T 0)
endif (NOT ${HDF_PREFIX}_SIZEOF_OFF64_T)
+#-----------------------------------------------------------------------------
+# Extra C99 types
+#-----------------------------------------------------------------------------
+
+# _Bool type support
+CHECK_INCLUDE_FILE_CONCAT (stdbool.h ${HDF_PREFIX}_HAVE_STDBOOL_H)
+if (HAVE_STDBOOL_H)
+ set (CMAKE_EXTRA_INCLUDE_FILES stdbool.h)
+ HDF_CHECK_TYPE_SIZE (bool ${HDF_PREFIX}_SIZEOF_BOOL)
+else (HAVE_STDBOOL_H)
+ HDF_CHECK_TYPE_SIZE (_Bool ${HDF_PREFIX}_SIZEOF_BOOL)
+endif (HAVE_STDBOOL_H)
+
if (NOT WINDOWS)
#-----------------------------------------------------------------------------
# Check if the dev_t type is a scalar type
@@ -437,6 +446,7 @@ if (NOT WINDOWS)
#-----------------------------------------------------------------------------
# Check a bunch of time functions
#-----------------------------------------------------------------------------
+ CHECK_FUNCTION_EXISTS (gettimeofday ${HDF_PREFIX}_HAVE_GETTIMEOFDAY)
foreach (test
HAVE_TM_GMTOFF
HAVE___TM_GMTOFF
@@ -556,10 +566,6 @@ MACRO (HDF_CXX_FUNCTION_TEST OTHER_TEST)
set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
endif (CMAKE_REQUIRED_LIBRARIES)
- foreach (def ${HDF_EXTRA_TEST_DEFINITIONS})
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}=${${def}}")
- endforeach (def)
-
foreach (def
HAVE_SYS_TIME_H
HAVE_UNISTD_H
@@ -626,7 +632,7 @@ if (WINDOWS)
"${CURRENT_TEST_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
)
endif (LARGEFILE)
- set (MACRO_CHECK_FUNCTION_DEFINITIONS
+ set (MACRO_CHECK_FUNCTION_DEFINITIONS
"-DHAVE_IOEO ${CMAKE_REQUIRED_FLAGS}")
if (CMAKE_REQUIRED_LIBRARIES)
set (CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
@@ -658,7 +664,7 @@ if (WINDOWS)
if ("${HAVE_IOEO_EXITCODE}" EQUAL 0)
set (${HDF_PREFIX}_HAVE_IOEO 1 CACHE INTERNAL "Test InitOnceExecuteOnce")
message (STATUS "Performing Test InitOnceExecuteOnce - Success")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing C SOURCE FILE Test InitOnceExecuteOnce succeded with the following output:\n"
"${OUTPUT}\n"
"Return value: ${HAVE_IOEO}\n")
@@ -670,7 +676,7 @@ if (WINDOWS)
endif (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN")
message (STATUS "Performing Test InitOnceExecuteOnce - Failed")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+ file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing InitOnceExecuteOnce Test failed with the following output:\n"
"${OUTPUT}\n"
"Return value: ${HAVE_IOEO_EXITCODE}\n")
@@ -682,60 +688,45 @@ endif (WINDOWS)
#-----------------------------------------------------------------------------
# Determine how 'inline' is used
#-----------------------------------------------------------------------------
-set (HDF_EXTRA_TEST_DEFINITIONS INLINE_TEST_INLINE)
foreach (inline_test inline __inline__ __inline)
- set (INLINE_TEST_INLINE ${inline_test})
- HDF_FUNCTION_TEST (INLINE_TEST_${inline_test})
+ string (TOUPPER ${inline_test} INLINE_TEST_MACRO)
+ HDF_FUNCTION_TEST (HAVE_${INLINE_TEST_MACRO})
endforeach (inline_test)
-set (HDF_EXTRA_TEST_DEFINITIONS)
-if (INLINE_TEST___inline__)
- set (${HDF_PREFIX}_inline __inline__)
-else (INLINE_TEST___inline__)
- if (INLINE_TEST___inline)
- set (${HDF_PREFIX}_inline __inline)
- else (INLINE_TEST___inline)
- if (INLINE_TEST_inline)
- set (${HDF_PREFIX}_inline inline)
- endif (INLINE_TEST_inline)
- endif (INLINE_TEST___inline)
-endif (INLINE_TEST___inline__)
-
#-----------------------------------------------------------------------------
# Check how to print a Long Long integer
#-----------------------------------------------------------------------------
if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "unknown")
set (PRINT_LL_FOUND 0)
message (STATUS "Checking for appropriate format for 64 bit long:")
- foreach (HDF5_PRINTF_LL l64 l L q I64 ll)
- set (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH=${HDF5_PRINTF_LL}")
- if (${HDF_PREFIX}_SIZEOF_LONG_LONG)
- set (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
- endif (${HDF_PREFIX}_SIZEOF_LONG_LONG)
- TRY_RUN (HDF5_PRINTF_LL_TEST_RUN HDF5_PRINTF_LL_TEST_COMPILE
- ${CMAKE_BINARY_DIR}
- ${HDF_RESOURCES_EXT_DIR}/HDFTests.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CURRENT_TEST_DEFINITIONS}
- OUTPUT_VARIABLE OUTPUT
+ set (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH")
+ if (${HDF_PREFIX}_SIZEOF_LONG_LONG)
+ set (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
+ endif (${HDF_PREFIX}_SIZEOF_LONG_LONG)
+ TRY_RUN (${HDF_PREFIX}_PRINTF_LL_TEST_RUN ${HDF_PREFIX}_PRINTF_LL_TEST_COMPILE
+ ${CMAKE_BINARY_DIR}
+ ${HDF_RESOURCES_EXT_DIR}/HDFTests.c
+ CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CURRENT_TEST_DEFINITIONS}
+ OUTPUT_VARIABLE OUTPUT
+ )
+ if (${HDF_PREFIX}_PRINTF_LL_TEST_COMPILE)
+ if (${HDF_PREFIX}_PRINTF_LL_TEST_RUN MATCHES 0)
+ string(REGEX REPLACE ".*PRINTF_LL_WIDTH=\\[(.*)\\].*" "\\1" ${HDF_PREFIX}_PRINTF_LL "${OUTPUT}")
+ set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"${${HDF_PREFIX}_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll")
+ set (PRINT_LL_FOUND 1)
+ else (${HDF_PREFIX}_PRINTF_LL_TEST_RUN MATCHES 0)
+ message ("Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}")
+ endif (${HDF_PREFIX}_PRINTF_LL_TEST_RUN MATCHES 0)
+ else (${HDF_PREFIX}_PRINTF_LL_TEST_COMPILE)
+ file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ "Test ${HDF_PREFIX}_PRINTF_LL_WIDTH failed with the following output:\n ${OUTPUT}\n"
)
- if (HDF5_PRINTF_LL_TEST_COMPILE)
- if (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"${HDF5_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll")
- set (PRINT_LL_FOUND 1)
- else (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- message ("Width with ${HDF5_PRINTF_LL} failed with result: ${HDF5_PRINTF_LL_TEST_RUN}")
- endif (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- else (HDF5_PRINTF_LL_TEST_COMPILE)
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Test ${HDF_PREFIX}_PRINTF_LL_WIDTH for ${HDF5_PRINTF_LL} failed with the following output:\n ${OUTPUT}\n"
- )
- endif (HDF5_PRINTF_LL_TEST_COMPILE)
- endforeach (HDF5_PRINTF_LL)
+ endif (${HDF_PREFIX}_PRINTF_LL_TEST_COMPILE)
if (PRINT_LL_FOUND)
- message (STATUS "Checking for apropriate format for 64 bit long: found ${${HDF_PREFIX}_PRINTF_LL_WIDTH}")
+ message (STATUS "Checking for appropriate format for 64 bit long: found ${${HDF_PREFIX}_PRINTF_LL_WIDTH}")
else (PRINT_LL_FOUND)
- message (STATUS "Checking for apropriate format for 64 bit long: not found")
+ message (STATUS "Checking for appropriate format for 64 bit long: not found")
set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL
"Width for printf for type `long long' or `__int64', us. `ll"
)
diff --git a/config/cmake_ext_mod/HDFLibMacros.cmake b/config/cmake_ext_mod/HDFLibMacros.cmake
index 7660a8a..3f91405 100644
--- a/config/cmake_ext_mod/HDFLibMacros.cmake
+++ b/config/cmake_ext_mod/HDFLibMacros.cmake
@@ -1,12 +1,12 @@
#-------------------------------------------------------------------------------
-MACRO (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
+macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
# May need to build JPEG with PIC on x64 machines with gcc
# Need to use CMAKE_ANSI_CFLAGS define so that compiler test works
if (${compress_type} MATCHES "SVN")
EXTERNALPROJECT_ADD (JPEG
SVN_REPOSITORY ${JPEG_URL}
- # [SVN_REVISION rev]
+ # [SVN_REVISION rev]
INSTALL_COMMAND ""
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
@@ -18,7 +18,7 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
- )
+ )
elseif (${compress_type} MATCHES "GIT")
EXTERNALPROJECT_ADD (JPEG
GIT_REPOSITORY ${JPEG_URL}
@@ -33,7 +33,7 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
- )
+ )
elseif (${compress_type} MATCHES "TGZ")
EXTERNALPROJECT_ADD (JPEG
URL ${JPEG_URL}
@@ -49,34 +49,34 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
- )
+ )
endif (${compress_type} MATCHES "SVN")
- externalproject_get_property (JPEG BINARY_DIR SOURCE_DIR)
+ externalproject_get_property (JPEG BINARY_DIR SOURCE_DIR)
-##include (${BINARY_DIR}/${JPEG_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
+##include (${BINARY_DIR}/${JPEG_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
# Create imported target jpeg-static
add_library(jpeg-static STATIC IMPORTED)
-# Create imported target jpeg-shared
- add_library(jpeg-shared SHARED IMPORTED)
- if (BUILD_SHARED_LIBS)
- HDF_IMPORT_SET_LIB_OPTIONS (jpeg-shared "jpeg" SHARED "")
- add_dependencies (JPEG jpeg-shared)
- set (JPEG_SHARED_LIBRARY "jpeg-shared")
- set (JPEG_LIBRARIES ${JPEG_shared_LIBRARY})
- endif (BUILD_SHARED_LIBS)
HDF_IMPORT_SET_LIB_OPTIONS (jpeg-static "jpeg" STATIC "")
add_dependencies (JPEG jpeg-static)
set (JPEG_STATIC_LIBRARY "jpeg-static")
set (JPEG_LIBRARIES ${JPEG_static_LIBRARY})
-
+ if (BUILD_SHARED_LIBS)
+ # Create imported target jpeg-shared
+ add_library(jpeg-shared SHARED IMPORTED)
+ HDF_IMPORT_SET_LIB_OPTIONS (jpeg-shared "jpeg" SHARED "")
+ add_dependencies (JPEG jpeg-shared)
+ set (JPEG_SHARED_LIBRARY "jpeg-shared")
+ set (JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_shared_LIBRARY})
+ endif (BUILD_SHARED_LIBS)
+
set (JPEG_INCLUDE_DIR_GEN "${BINARY_DIR}")
set (JPEG_INCLUDE_DIR "${SOURCE_DIR}/src")
set (JPEG_FOUND 1)
set (JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIR_GEN} ${JPEG_INCLUDE_DIR})
-ENDMACRO (EXTERNAL_JPEG_LIBRARY)
+endmacro (EXTERNAL_JPEG_LIBRARY)
#-------------------------------------------------------------------------------
-MACRO (PACKAGE_JPEG_LIBRARY compress_type)
+macro (PACKAGE_JPEG_LIBRARY compress_type)
add_custom_target (JPEG-GenHeader-Copy ALL
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${JPEG_INCLUDE_DIR_GEN}/jconfig.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
COMMENT "Copying ${JPEG_INCLUDE_DIR_GEN}/jconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
@@ -85,14 +85,14 @@ MACRO (PACKAGE_JPEG_LIBRARY compress_type)
if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
add_dependencies (JPEG-GenHeader-Copy JPEG)
endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
-ENDMACRO (PACKAGE_JPEG_LIBRARY)
+endmacro (PACKAGE_JPEG_LIBRARY)
#-------------------------------------------------------------------------------
-MACRO (EXTERNAL_SZIP_LIBRARY compress_type encoding)
+macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
if (${compress_type} MATCHES "SVN")
EXTERNALPROJECT_ADD (SZIP
SVN_REPOSITORY ${SZIP_URL}
- # [SVN_REVISION rev]
+ # [SVN_REVISION rev]
INSTALL_COMMAND ""
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
@@ -105,11 +105,11 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type encoding)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
-DSZIP_ENABLE_ENCODING:BOOL=${encoding}
- )
+ )
elseif (${compress_type} MATCHES "GIT")
EXTERNALPROJECT_ADD (SZIP
GIT_REPOSITORY ${SZIP_URL}
- # [SVN_REVISION rev]
+ # [SVN_REVISION rev]
INSTALL_COMMAND ""
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
@@ -122,7 +122,7 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type encoding)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
-DSZIP_ENABLE_ENCODING:BOOL=${encoding}
- )
+ )
elseif (${compress_type} MATCHES "TGZ")
EXTERNALPROJECT_ADD (SZIP
URL ${SZIP_URL}
@@ -139,34 +139,34 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type encoding)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
-DSZIP_ENABLE_ENCODING:BOOL=${encoding}
- )
+ )
endif (${compress_type} MATCHES "SVN")
- externalproject_get_property (SZIP BINARY_DIR SOURCE_DIR)
+ externalproject_get_property (SZIP BINARY_DIR SOURCE_DIR)
-##include (${BINARY_DIR}/${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
+##include (${BINARY_DIR}/${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
# Create imported target szip-static
add_library(szip-static STATIC IMPORTED)
-# Create imported target szip-shared
- add_library(szip-shared SHARED IMPORTED)
- if (BUILD_SHARED_LIBS)
- HDF_IMPORT_SET_LIB_OPTIONS (szip-shared "szip" SHARED "")
- add_dependencies (SZIP szip-shared)
- set (SZIP_SHARED_LIBRARY "szip-shared")
- set (SZIP_LIBRARIES ${SZIP_shared_LIBRARY})
- endif (BUILD_SHARED_LIBS)
HDF_IMPORT_SET_LIB_OPTIONS (szip-static "szip" STATIC "")
add_dependencies (SZIP szip-static)
set (SZIP_STATIC_LIBRARY "szip-static")
set (SZIP_LIBRARIES ${SZIP_static_LIBRARY})
+ if (BUILD_SHARED_LIBS)
+ # Create imported target szip-shared
+ add_library(szip-shared SHARED IMPORTED)
+ HDF_IMPORT_SET_LIB_OPTIONS (szip-shared "szip" SHARED "")
+ add_dependencies (SZIP szip-shared)
+ set (SZIP_SHARED_LIBRARY "szip-shared")
+ set (SZIP_LIBRARIES ${SZIP_LIBRARIES} ${SZIP_shared_LIBRARY})
+ endif (BUILD_SHARED_LIBS)
set (SZIP_INCLUDE_DIR_GEN "${BINARY_DIR}")
set (SZIP_INCLUDE_DIR "${SOURCE_DIR}/src")
set (SZIP_FOUND 1)
set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR_GEN} ${SZIP_INCLUDE_DIR})
-ENDMACRO (EXTERNAL_SZIP_LIBRARY)
+endmacro (EXTERNAL_SZIP_LIBRARY)
#-------------------------------------------------------------------------------
-MACRO (PACKAGE_SZIP_LIBRARY compress_type)
+macro (PACKAGE_SZIP_LIBRARY compress_type)
add_custom_target (SZIP-GenHeader-Copy ALL
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
COMMENT "Copying ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
@@ -175,14 +175,14 @@ MACRO (PACKAGE_SZIP_LIBRARY compress_type)
if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
add_dependencies (SZIP-GenHeader-Copy SZIP)
endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
-ENDMACRO (PACKAGE_SZIP_LIBRARY)
+endmacro (PACKAGE_SZIP_LIBRARY)
#-------------------------------------------------------------------------------
-MACRO (EXTERNAL_ZLIB_LIBRARY compress_type)
+macro (EXTERNAL_ZLIB_LIBRARY compress_type)
if (${compress_type} MATCHES "SVN")
EXTERNALPROJECT_ADD (ZLIB
SVN_REPOSITORY ${ZLIB_URL}
- # [SVN_REVISION rev]
+ # [SVN_REVISION rev]
INSTALL_COMMAND ""
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
@@ -194,11 +194,11 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type)
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
- )
+ )
elseif (${compress_type} MATCHES "GIT")
EXTERNALPROJECT_ADD (ZLIB
GIT_REPOSITORY ${ZLIB_URL}
- # [SVN_REVISION rev]
+ # [SVN_REVISION rev]
INSTALL_COMMAND ""
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
@@ -210,7 +210,7 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type)
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
- )
+ )
elseif (${compress_type} MATCHES "TGZ")
EXTERNALPROJECT_ADD (ZLIB
URL ${ZLIB_URL}
@@ -226,39 +226,39 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type)
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
- )
+ )
endif (${compress_type} MATCHES "SVN")
- externalproject_get_property (ZLIB BINARY_DIR SOURCE_DIR)
+ externalproject_get_property (ZLIB BINARY_DIR SOURCE_DIR)
if (WIN32)
set (ZLIB_LIB_NAME "zlib")
else (WIN32)
set (ZLIB_LIB_NAME "z")
endif (WIN32)
-##include (${BINARY_DIR}/${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
+##include (${BINARY_DIR}/${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
# Create imported target zlib-static
add_library(zlib-static STATIC IMPORTED)
-# Create imported target zlib-shared
- add_library(zlib-shared SHARED IMPORTED)
- if (BUILD_SHARED_LIBS)
- HDF_IMPORT_SET_LIB_OPTIONS (zlib-shared ${ZLIB_LIB_NAME} SHARED "")
- add_dependencies (ZLIB zlib-shared)
- set (ZLIB_SHARED_LIBRARY "zlib-shared")
- set (ZLIB_LIBRARIES ${ZLIB_SHARED_LIBRARY})
- endif (BUILD_SHARED_LIBS)
HDF_IMPORT_SET_LIB_OPTIONS (zlib-static ${ZLIB_LIB_NAME} STATIC "")
add_dependencies (ZLIB zlib-static)
set (ZLIB_STATIC_LIBRARY "zlib-static")
set (ZLIB_LIBRARIES ${ZLIB_static_LIBRARY})
+ if (BUILD_SHARED_LIBS)
+ # Create imported target zlib-shared
+ add_library(zlib-shared SHARED IMPORTED)
+ HDF_IMPORT_SET_LIB_OPTIONS (zlib-shared ${ZLIB_LIB_NAME} SHARED "")
+ add_dependencies (ZLIB zlib-shared)
+ set (ZLIB_SHARED_LIBRARY "zlib-shared")
+ set (ZLIB_LIBRARIES ${ZLIB_LIBRARIES} ${ZLIB_SHARED_LIBRARY})
+ endif (BUILD_SHARED_LIBS)
set (ZLIB_INCLUDE_DIR_GEN "${BINARY_DIR}")
set (ZLIB_INCLUDE_DIR "${SOURCE_DIR}")
set (ZLIB_FOUND 1)
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR_GEN} ${ZLIB_INCLUDE_DIR})
-ENDMACRO (EXTERNAL_ZLIB_LIBRARY)
+endmacro (EXTERNAL_ZLIB_LIBRARY)
#-------------------------------------------------------------------------------
-MACRO (PACKAGE_ZLIB_LIBRARY compress_type)
+macro (PACKAGE_ZLIB_LIBRARY compress_type)
add_custom_target (ZLIB-GenHeader-Copy ALL
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZLIB_INCLUDE_DIR_GEN}/zconf.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
COMMENT "Copying ${ZLIB_INCLUDE_DIR_GEN}/zconf.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
@@ -267,4 +267,4 @@ MACRO (PACKAGE_ZLIB_LIBRARY compress_type)
if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
add_dependencies (ZLIB-GenHeader-Copy ZLIB)
endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
-ENDMACRO (PACKAGE_ZLIB_LIBRARY)
+endmacro (PACKAGE_ZLIB_LIBRARY)
diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c
index 1c23ac3..8478d1b 100644
--- a/config/cmake_ext_mod/HDFTests.c
+++ b/config/cmake_ext_mod/HDFTests.c
@@ -213,7 +213,7 @@ SIMPLE_TEST(struct stat sb; sb.st_blocks=0);
int main(void)
{
- char *llwidthArgs[] = { "l64", "l", "L", "q", "ll", NULL };
+ char *llwidthArgs[] = { "I64", "l64", "l", "L", "q", "ll", NULL };
char *s = malloc(128);
char **currentArg = NULL;
LL_TYPE x = (LL_TYPE)1048576 * (LL_TYPE)1048576;
@@ -454,13 +454,19 @@ SIMPLE_TEST(struct text_info w; w.screenwidth=0);
#endif /* HAVE_TM_GMTOFF */
-
-#if defined( INLINE_TEST_inline ) || defined( INLINE_TEST___inline__ ) || defined( INLINE_TEST___inline )
+#if defined( HAVE_INLINE ) || defined( HAVE___INLINE__ ) || defined( HAVE___INLINE )
#ifndef __cplusplus
+#if defined( HAVE_INLINE )
+# define INLINE_KW inline
+#elif defined ( HAVE___INLINE__ )
+# define INLINE_KW __inline__
+#elif defined ( HAVE___INLINE )
+# define INLINE_KW __inline
+#endif /* HAVE_INLINE */
typedef int foo_t;
-static INLINE_TEST_INLINE foo_t static_foo () { return 0; }
-INLINE_TEST_INLINE foo_t foo () {return 0; }
-int main() { return 0; }
-#endif
+static INLINE_KW foo_t static_foo () { return 0; }
+INLINE_KW foo_t foo () {return 0; }
+int main(void) { return 0; }
+#endif /* __cplusplus */
+#endif /* defined( HAVE_INLINE ) || defined( HAVE___INLINE__ ) || defined( HAVE___INLINE ) */
-#endif /* INLINE_TEST */
diff --git a/config/lt_vers.am b/config/lt_vers.am
index 36de8fe..401bcb9 100644
--- a/config/lt_vers.am
+++ b/config/lt_vers.am
@@ -19,7 +19,7 @@
# After making changes, run bin/reconfigure to update other configure related
# files like Makefile.in.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 222
+LT_VERS_REVISION = 223
LT_VERS_AGE = 0
## If the API changes *at all*, increment LT_VERS_INTERFACE and
diff --git a/configure.ac b/configure.ac
index ff9b7e6..8464979 100644
--- a/configure.ac
+++ b/configure.ac
@@ -951,6 +951,7 @@ AC_CHECK_HEADERS([sys/socket.h sys/types.h])
AC_CHECK_HEADERS([stddef.h setjmp.h features.h])
AC_CHECK_HEADERS([dirent.h])
AC_CHECK_HEADERS([stdint.h], [C9x=yes])
+AC_CHECK_HEADERS([stdbool.h])
## Darwin
AC_CHECK_HEADERS([mach/mach_time.h])
@@ -1130,6 +1131,17 @@ EOF
AC_CHECK_SIZEOF([off_t], [4])
AC_CHECK_SIZEOF([off64_t], [8])
+if test "X$C9x" = "Xyes"; then
+ cat >>confdefs.h <<\EOF
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h> /* for bool definition */
+#else
+#define bool _Bool
+#endif
+EOF
+AC_CHECK_SIZEOF([bool], [1])
+fi
+
## Checkpoint the cache
AC_CACHE_SAVE
diff --git a/examples/h5_vds-simpleIO.c b/examples/h5_vds-simpleIO.c
index b707ae4..6b12dc2 100644
--- a/examples/h5_vds-simpleIO.c
+++ b/examples/h5_vds-simpleIO.c
@@ -3,7 +3,7 @@
This example illustrates the concept of virtual dataset I/O
The program creates 2-dim source dataset and writes
data to it. Then it creates 2-dim virtual dataset that has
- the same dimesnion sizes and maps the all elements of the
+ the same dimension sizes and maps the all elements of the
virtual dataset to all elements of the source dataset.
Then VDS is read back.
diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c
index 4801f7d..9e3ddc4 100644
--- a/fortran/src/H5Of.c
+++ b/fortran/src/H5Of.c
@@ -901,13 +901,19 @@ h5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size,
if((c_bufsize = H5Oget_comment_by_name((hid_t)*loc_id, c_name, c_comment, (size_t)*commentsize,(hid_t)*lapl_id )) < 0)
HGOTO_DONE(FAIL);
+ if(c_name)
+ HDfree(c_name);
+
*bufsize = (size_t_f)c_bufsize;
/*
* Convert C name to FORTRAN and place it in the given buffer
*/
- if(c_comment)
+ if(c_comment) {
HD5packFstring(c_comment, _fcdtocp(comment), c_commentsize - 1);
+ HDfree(c_comment);
+ }
+
return ret_value;
done:
diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c
index b6389258..9928d0a 100644
--- a/fortran/src/H5Tf.c
+++ b/fortran/src/H5Tf.c
@@ -2421,7 +2421,10 @@ h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value)
if (c_name == NULL) return ret_value;
status = H5Tenum_insert( (hid_t)*type_id, c_name, value);
+
+ HDfree(c_name);
if ( status < 0 ) return ret_value;
+
ret_value = 0;
return ret_value;
}
diff --git a/hl/src/H5LTparse.y b/hl/src/H5LTparse.y
index 4c07533..9f08254 100644
--- a/hl/src/H5LTparse.y
+++ b/hl/src/H5LTparse.y
@@ -190,7 +190,10 @@ memb_def : ddl_type { cmpd_stack[csindex].is_field = 1; /*notify le
H5Tinsert(dtype_id, $<sval>4, $<ival>6, $<hid>1);
}
}
-
+ if($<sval>4) {
+ free($<sval>4);
+ $<sval>4 = NULL;
+ }
cmpd_stack[csindex].is_field = 0;
H5Tclose($<hid>1);
@@ -199,7 +202,9 @@ memb_def : ddl_type { cmpd_stack[csindex].is_field = 1; /*notify le
;
field_name : STRING
{
- $<sval>$ = yylval.sval;
+ $<sval>$ = strdup(yylval.sval);
+ free(yylval.sval);
+ yylval.sval = NULL;
}
;
field_offset : /*empty*/
@@ -247,6 +252,8 @@ opaque_type : H5T_OPAQUE_TOKEN
OPQ_TAG_TOKEN { is_opq_tag = 1; } '"' opaque_tag '"' ';'
{
H5Tset_tag($<hid>7, yylval.sval);
+ free(yylval.sval);
+ yylval.sval = NULL;
is_opq_tag = 0;
}
'}' { $<hid>$ = $<hid>7; }
@@ -335,6 +342,8 @@ enum_def : '"' enum_symbol '"' {
#else /* H5_HAVE_WIN32_API */
enum_memb_symbol = strdup(yylval.sval);
#endif /* H5_HAVE_WIN32_API */
+ free(yylval.sval);
+ yylval.sval = NULL;
}
enum_val ';'
{
diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c
index 9d625e9..f3258d6 100644
--- a/hl/test/test_lite.c
+++ b/hl/test/test_lite.c
@@ -1282,6 +1282,7 @@ static int test_strings(void)
HDfree(dt_str);
goto out;
}
+ HDfree(dt_str);
/* Length of the character buffer is smaller then needed */
str_len = 21;
diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt
index 5cc9baf..e745084 100644
--- a/release_docs/INSTALL_CMake.txt
+++ b/release_docs/INSTALL_CMake.txt
@@ -51,7 +51,7 @@ The following files referenced below are available at the HDF web site:
http://www.hdfgroup.org/HDF5/release/cmakebuild.html
Single compressed file with all the files needed, including source:
- hdf5-1.8.15-CMake.zip or hdf5-1.8.15-CMake.tar.gz
+ hdf5-1.8.16-CMake.zip or hdf5-1.8.16-CMake.tar.gz
Individual files
-----------------------------------------------
@@ -84,15 +84,15 @@ To build HDF5 with the SZIP and ZLIB external libraries you will need to:
following options:
On 32-bit Windows with Visual Studio 2012, execute:
- ctest -S HDF518config.cmake,32-VS2012 -C Release -VV -O hdf5.log
+ ctest -S HDF518config.cmake,BUILD_GENERATOR=VS2012 -C Release -VV -O hdf5.log
On 64-bit Windows with Visual Studio 2012, execute:
- ctest -S HDF518config.cmake,64-VS2012 -C Release -VV -O hdf5.log
+ ctest -S HDF518config.cmake,BUILD_GENERATOR=VS201264 -C Release -VV -O hdf5.log
On 32-bit Windows with Visual Studio 2013, execute:
- ctest -S HDF518config.cmake,32-VS2013 -C Release -VV -O hdf5.log
+ ctest -S HDF518config.cmake,BUILD_GENERATOR=VS2013 -C Release -VV -O hdf5.log
On 64-bit Windows with Visual Studio 2013, execute:
- ctest -S HDF518config.cmake,64-VS2013 -C Release -VV -O hdf5.log
+ ctest -S HDF518config.cmake,BUILD_GENERATOR=VS201364 -C Release -VV -O hdf5.log
On Linux and Mac, execute:
- ctest -S HDF518config.cmake -C Release -VV -O hdf5.log
+ ctest -S HDF518config.cmake,BUILD_GENERATOR=Unix -C Release -VV -O hdf5.log
The command above will configure, build, test, and create an install
package in the myhdfstuff folder. It will have the format:
@@ -181,10 +181,10 @@ Notes: This short set of instructions is written for users who want to
5. Configure the C library, tools and tests with one of the following commands:
On Windows 32 bit
- cmake -G "Visual Studio 11 2012" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.8."X"
+ cmake -G "Visual Studio 12 2013" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.8."X"
On Windows 64 bit
- cmake -G "Visual Studio 11 2012 Win64" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.8."X"
+ cmake -G "Visual Studio 12 2013 Win64" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ..\hdf5-1.8."X"
On Linux and Mac
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DHDF5_BUILD_TOOLS:BOOL=ON ../hdf5-1.8."X"
@@ -297,7 +297,7 @@ IV. Further considerations
the settings for the developers' environment. Then the only options needed
on the command line are those options that are different. Example using HDF
default cache file:
- cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 11 2012" \
+ cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 12 2013" \
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \
-DCMAKE_BUILD_TYPE:STRING=Release ..
@@ -395,11 +395,9 @@ These five steps are described in detail below.
########################
# EXTERNAL cache entries
########################
- set (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE)
- set (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
+ set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE)
set (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
- set (HDF5_ENABLE_F2003 ON CACHE BOOL "Enable FORTRAN 2003 Standard" FORCE)
set (HDF5_BUILD_GENERATORS OFF CACHE BOOL "Build Test Generators" FORCE)
set (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
@@ -417,6 +415,7 @@ These five steps are described in detail below.
set (HDF5_USE_FOLDERS ON CACHE BOOL "Enable folder grouping of projects in IDEs." FORCE)
set (HDF5_USE_16_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.6.x API by default" FORCE)
set (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE)
+ set (HDF_TEST_EXPRESS "2" CACHE STRING "Control testing framework (0-3)" FORCE)
set (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE)
set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)" FORCE)
@@ -448,7 +447,7 @@ These five steps are described in detail below.
2.2 Preferred command line example on Windows in c:\MyHDFstuff\hdf5\build directory:
- cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 11 2012" \
+ cmake -C ../config/cmake/cacheinit.cmake -G "Visual Studio 12 2013" \
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \
-DCMAKE_BUILD_TYPE:STRING=Release ..
@@ -595,6 +594,7 @@ HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks"
HDF5_TEST_VFD "Execute tests with different VFDs" OFF
HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF
HDF5_USE_FOLDERS "Enable folder grouping of projects in IDEs." OFF
+HDF5_WANT_DATA_ACCURACY "IF data accuracy is guaranteed during data conversions" ON
HDF5_WANT_DCONV_EXCEPTION "exception handling functions is checked during data conversions" ON
HDF5_ENABLE_THREADSAFE "Enable Threadsafety" OFF
if (APPLE)
@@ -637,22 +637,108 @@ build and test process.
VIII. Options for Platform Configuration Files
========================================================================
-Below is the HDF518config.cmake ctest script with extra comments.
+Below is the HDF5config.cmake ctest script with extra comments.
Execute:
- ctest -S HDF518config.cmake -C Release -V -O hdf518.log
+ ctest -S HDF5config.cmake,BUILD_GENERATOR=xxx -C Release -V -O hdf5.log
The same scripts can be used on Linux, Mac OSX or a Windows machine by
adding an option (${CTEST_SCRIPT_ARG}) to the platform configuration script.
-#########################################################################
-### For Windows ${CTEST_SCRIPT_ARG} is one of ###
-### [64-VS2013, 32-VS2013, 64-VS2012, 32-VS2012] ###
-### ctest -S HDF518config.cmake,32-VS2012 -C Release -V -O hdf518.log ###
-#########################################################################
+#############################################################################################
+### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ###
+### BUILD_GENERATOR required [Unix, VS2015, VS201564, VS2013, VS201364, VS2012, VS201264] ###
+### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201264 -C Release -V -O hdf519.log ###
+#############################################################################################
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
-set(CTEST_SOURCE_VERSION 1.8.16)
-set(CTEST_SOURCE_NAME hdf5-${CTEST_SOURCE_VERSION})
+############################################################################
+# Usage:
+# ctest -S HDF518config.cmake,OPTION=VALUE -C Release -VV -O test.log
+# where valid options for OPTION are:
+# BUILD_GENERATOR - The cmake build generator:
+# Unix * Unix Makefiles
+# VS2015 * Visual Studio 14 2015
+# VS201564 * Visual Studio 14 2015 Win64
+# VS2013 * Visual Studio 12 2013
+# VS201364 * Visual Studio 12 2013 Win64
+# VS2012 * Visual Studio 11 2012
+# VS201264 * Visual Studio 11 2012 Win64
+#
+# INSTALLDIR - root folder where hdf5 is installed
+# CTEST_BUILD_CONFIGURATION - Release, Debug, etc
+# CTEST_SOURCE_NAME - source folder
+# STATIC_LIBRARIES - Build/use static libraries
+# FORTRAN_LIBRARIES - Build/use fortran libraries
+# NO_MAC_FORTRAN - Yes to be SHARED on a Mac
+##############################################################################
+
+set(CTEST_SOURCE_VERSION 1.9)
+set(CTEST_SOURCE_VERSEXT "")
+
+##############################################################################
+# handle input parameters to script.
+#BUILD_GENERATOR - which CMake generator to use, required
+#INSTALLDIR - HDF5-1.9 root folder
+#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
+#CTEST_SOURCE_NAME - name of source folder; HDF5-1.9
+#STATIC_LIBRARIES - Default is YES
+#FORTRAN_LIBRARIES - Default is NO
+#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac
+if(DEFINED CTEST_SCRIPT_ARG)
+ # transform ctest script arguments of the form
+ # script.ctest,var1=value1,var2=value2
+ # to variables with the respective names set to the respective values
+ string(REPLACE "," ";" script_args "${CTEST_SCRIPT_ARG}")
+ foreach(current_var ${script_args})
+ if ("${current_var}" MATCHES "^([^=]+)=(.+)$")
+ set("${CMAKE_MATCH_1}" "${CMAKE_MATCH_2}")
+ endif()
+ endforeach()
+endif()
+
+# build generator must be defined
+if(NOT DEFINED BUILD_GENERATOR)
+ message(FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
+else()
+ if(${BUILD_GENERATOR} STREQUAL "Unix")
+ set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2015")
+ set(CTEST_CMAKE_GENERATOR "Visual Studio 14 2015")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201564")
+ set(CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2013")
+ set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201364")
+ set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2012")
+ set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
+ set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
+ else()
+ message(FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
+ endif()
+endif()
+
+if(NOT DEFINED INSTALLDIR)
+ if(NOT WIN32)
+ set(INSTALLDIR "/usr/local/myhdf5")
+ else()
+ set(INSTALLDIR "C:\\Program\ Files\\myhdf5")
+ endif()
+endif()
+if(NOT DEFINED CTEST_BUILD_CONFIGURATION)
+ set(CTEST_BUILD_CONFIGURATION "Release")
+endif()
+if(NOT DEFINED CTEST_SOURCE_NAME)
+ set(CTEST_SOURCE_NAME "hdf5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
+endif()
+if(NOT DEFINED STATIC_LIBRARIES)
+ set(STATICLIBRARIES "YES")
+endif()
+if(NOT DEFINED FORTRAN_LIBRARIES)
+ set(FORTRANLIBRARIES "NO")
+endif()
+
set(CTEST_BINARY_NAME "build")
set(CTEST_DASHBOARD_ROOT "${CTEST_SCRIPT_DIRECTORY}")
if(WIN32)
@@ -664,40 +750,30 @@ else()
endif()
###################################################################
-### Following Line is one of [Release, RelWithDebInfo, Debug] #####
-set(CTEST_BUILD_CONFIGURATION "Release")
-###################################################################
-
-###################################################################
######### Following describes compiler ############
if(WIN32)
set(SITE_OS_NAME "Windows")
set(SITE_OS_VERSION "WIN7")
- if(${CTEST_SCRIPT_ARG} STREQUAL "64-VS2013")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
+ if(${BUILD_GENERATOR} STREQUAL "VS201364")
set(SITE_OS_BITS "64")
set(SITE_COMPILER_NAME "vs2013")
set(SITE_COMPILER_VERSION "12")
- elseif(${CTEST_SCRIPT_ARG} STREQUAL "32-VS2013")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 12 2013")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2013")
set(SITE_OS_BITS "32")
set(SITE_COMPILER_NAME "vs2013")
set(SITE_COMPILER_VERSION "12")
- elseif(${CTEST_SCRIPT_ARG} STREQUAL "64-VS2012")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
set(SITE_OS_BITS "64")
set(SITE_COMPILER_NAME "vs2012")
set(SITE_COMPILER_VERSION "11")
- elseif(${CTEST_SCRIPT_ARG} STREQUAL "32-VS2012")
- set(CTEST_CMAKE_GENERATOR "Visual Studio 11 2012")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2012")
set(SITE_OS_BITS "32")
set(SITE_COMPILER_NAME "vs2012")
set(SITE_COMPILER_VERSION "11")
endif()
## Set the following to unique id your computer ##
- set(CTEST_SITE "WIN7${CTEST_SCRIPT_ARG}.XXXX")
+ set(CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX")
else()
- set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
## Set the following to unique id your computer ##
if(APPLE)
set(CTEST_SITE "MAC.XXXX")
@@ -711,9 +787,6 @@ endif()
######### Following is for submission to CDash ############
###################################################################
set(MODEL "Experimental")
-######### Following describes computer ############
-## following is optional to describe build ##
-set(SITE_BUILDNAME_SUFFIX "STATIC")
###################################################################
###################################################################
@@ -727,19 +800,25 @@ set(SITE_BUILDNAME_SUFFIX "STATIC")
#set(LOCAL_NO_PACKAGE "TRUE")
##### Following controls source update #####
#set(LOCAL_UPDATE "TRUE")
-set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/branches/hdf5_1_8")
+set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/trunk")
#uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows
-#set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}")
+#set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
###################################################################
###################################################################
#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ")
-### uncomment/comment and change the following lines for configuration options
+###################################################################
+if(${STATICLIBRARIES})
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
+ ######### Following describes computer ############
+ ## following is optional to describe build ##
+ set(SITE_BUILDNAME_SUFFIX "STATIC")
+endif()
+###################################################################
-### comment the following line or change OFF to ON in order to build shared libraries
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
+### uncomment/comment and change the following lines for other configuration options
#### ext libraries ####
### ext libs from tgz
@@ -754,10 +833,11 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF")
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
#### fortran ####
-### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
-### disable Fortran; change OFF to ON in order to build FORTRAN libraries
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+if(${FORTRANLIBRARIES})
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
+else()
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+endif()
### disable test program builds
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
@@ -768,47 +848,47 @@ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
### change install prefix
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=install")
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}")
###################################################################
if(WIN32)
include(${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake)
- if(EXISTS "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}-win${SITE_OS_BITS}.exe")
- file(COPY "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}-win${SITE_OS_BITS}.exe" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.exe")
+ file(COPY "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.exe" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}-win${SITE_OS_BITS}.msi")
- file(COPY "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}-win${SITE_OS_BITS}.msi" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.msi")
+ file(COPY "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.msi" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}-win${SITE_OS_BITS}.zip")
- file(COPY "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}-win${SITE_OS_BITS}.zip" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.zip")
+ file(COPY "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.zip" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
else()
include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
if(APPLE)
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}-Darwin.dmg")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}-Darwin.dmg" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.dmg")
+ file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.dmg" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}-Darwin.tar.gz")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}-Darwin.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.tar.gz")
+ file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}-Darwin.sh")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}-Darwin.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.sh")
+ file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
else()
if(CYGWIN)
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}-CYGWIN.sh")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}-CYGWIN.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-CYGWIN.sh")
+ file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-CYGWIN.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}-CYGWIN.tar.gz")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}-CYGWIN.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-CYGWIN.tar.gz")
+ file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-CYGWIN.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
else()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}-Linux.sh")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}-Linux.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Linux.sh")
+ file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Linux.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}-Linux.tar.gz")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}-Linux.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Linux.tar.gz")
+ file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Linux.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
endif()
endif()
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 9be3053..1cfe382 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -1,4 +1,4 @@
-HDF5 version 1.9.232 currently under development
+HDF5 version 1.9.233 released on 2015-10-06
================================================================================
@@ -277,6 +277,10 @@ The following platforms are not supported but have been tested for this release.
g++ 4.6.1 20110422
gfortran 4.6.1 20110422
+ Mac OS X El Capitan 10.11 Apple clang/clang++ version 7.0.0 from Xcode 7.0.1
+ 64-bit gfortran GNU Fortran (GCC) 5.2.0
+ (VM)
+
Debian7.5.0 3.2.0-4-686 #1 SMP Debian 3.2.51-1 i686 GNU/Linux
gcc (Debian 4.7.2-5) 4.7.2
GNU Fortran (Debian 4.7.2-5) 4.7.2
diff --git a/release_docs/USING_CMake_Examples.txt b/release_docs/USING_CMake_Examples.txt
index a6854ae..12c499e 100644
--- a/release_docs/USING_CMake_Examples.txt
+++ b/release_docs/USING_CMake_Examples.txt
@@ -38,7 +38,7 @@ II. Building HDF5 Examples with CMake
Files in the HDF5 install directory:
HDF5Examples folder
- HDF518_Examples.cmake
+ HDF5_Examples.cmake
Default installation process:
Create a directory to run the examples, i.e. \test_hdf5.
@@ -52,7 +52,7 @@ Default installation process:
with the CTEST_BUILD_CONFIGURATION script option. Note that this must
be the same as the value used with the -C command line option.
The default build configuration is defined to build and use static libraries.
- Shared libraries can be used with the STATICLIBRARIES script option set to "NO".
+ Shared libraries can be used with the STATIC_LIBRARIES script option set to "NO".
Other options can be changed by editing the HDF5_Examples.cmake file.
If the defaults are okay, execute from this directory:
@@ -67,11 +67,9 @@ Default installation process:
========================================================================
-III. Other changes to the HDF518_Examples.cmake file
+III. Other changes to the HDF5_Examples.cmake file
========================================================================
-Line 10: uncomment to build and test Fortran examples.
-
-Line 43-45: uncomment to use a source tarball or zipfile;
+Line 45-48: uncomment to use a source tarball or zipfile;
Add script option "TAR_SOURCE=MySource.tar".
diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt
index 578f957..2cdf798 100644
--- a/release_docs/USING_HDF5_CMake.txt
+++ b/release_docs/USING_HDF5_CMake.txt
@@ -99,12 +99,12 @@ These steps are described in more detail below.
* MinGW Makefiles
* NMake Makefiles
* Unix Makefiles
- * Visual Studio 12
- * Visual Studio 12 Win64
- * Visual Studio 11
- * Visual Studio 11 Win64
- * Visual Studio 10
- * Visual Studio 10 Win64
+ * Visual Studio 12 2013
+ * Visual Studio 12 2013 Win64
+ * Visual Studio 11 2012
+ * Visual Studio 11 2012 Win64
+ * Visual Studio 10 2010
+ * Visual Studio 10 2010 Win64
<options> is:
* BUILD_TESTING:BOOL=ON
@@ -114,7 +114,7 @@ These steps are described in more detail below.
2.1 Visual CMake users, click the Configure button. If this is the first time you are
running cmake-gui in this directory, you will be prompted for the
- generator you wish to use (for example on Windows, Visual Studio 10).
+ generator you wish to use (for example on Windows, Visual Studio 12 2013).
CMake will read in the CMakeLists.txt files from the source directory and
display options for the HDF5 project. After the first configure you
can adjust the cache settings and/or specify locations of other programs.
@@ -176,8 +176,8 @@ These steps are described in more detail below.
III. Minimum C Project Files for CMake
========================================================================
-Create a CMakeLists.txt file at the source root. Include the
-following text in the file:
+Given the preconditions in section I, create a CMakeLists.txt file at the
+source root. Include the following text in the file:
##########################################################
cmake_minimum_required (VERSION 3.1.0)
@@ -206,49 +206,53 @@ add_test (NAME test_example COMMAND ${example})
IV. APPENDIX
========================================================================
-Below is an example of the ctest script used by The HDF Group. See the
-Appendix in the INSTALL_CMake.txt file for the CTestScript.cmake file used
-by this script. Adjust the values as necessary. Note that the source folder
-is entered on the command line and the build folder is created as a sub-folder.
-Windows should adjust the forward slash to double backslashes, except for
-the HDF_DIR environment variable.
+Below is an example of a ctest script that can be used to build the examples.
+Adjust the values as necessary. Note that the defaults can be entered on the
+command line and the build folder is created as a sub-folder. Windows should
+adjust the forward slash to double backslashes, except for the HDF_DIR
+environment variable.
-NOTE: these files are available at the HDF web site:
+NOTE: this file is available at the HDF web site:
http://www.hdfgroup.org/HDF5/release/cmakebuild.html
- CTestScript.cmake
-
- HDF518_Examples.cmake
+ HDF5_Examples.cmake
========================================================================
ctest
========================================================================
-cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
-############################################################################
-# Product specific script, HDF518_Examples.cmake, that uses the
-# CTestScript.cmake file (see Appendix in the CMake.txt). Usage:
-# ctest -S HDF518_Examples.cmake,OPTION=VALUE -C Release -VV -O test.log
+cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
+###############################################################################################################
+# This script will build and run the examples from a folder
+# Execute from a command line:
+# ctest -S HDF5_Examples.cmake,OPTION=VALUE -C Release -V -O test.log
# where valid options for OPTION are:
+# BUILD_GENERATOR - The cmake build generator:
+# Unix * Unix Makefiles
+# VS2015 * Visual Studio 14 2015
+# VS201564 * Visual Studio 14 2015 Win64
+# VS2013 * Visual Studio 12 2013
+# VS201364 * Visual Studio 12 2013 Win64
+# VS2012 * Visual Studio 11 2012
+# VS201264 * Visual Studio 11 2012 Win64
+#
# INSTALLDIR - root folder where hdf5 is installed
# CTEST_BUILD_CONFIGURATION - Release, Debug, etc
# CTEST_SOURCE_NAME - source folder
-# STATICLIBRARIES - Build/use static libraries
+# STATIC_LIBRARIES - Build/use static libraries
+# FORTRAN_LIBRARIES - Build/use fortran libraries
# NO_MAC_FORTRAN - Yes to be SHARED on a Mac
-###############################################################################################################
-
-set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
-set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
-#set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
-
+##############################################################################
# handle input parameters to script.
-#INSTALLDIR - HDF5-1.8 root folder
+#BUILD_GENERATOR - which CMake generator to use, required
+#INSTALLDIR - HDF5 root folder
#CTEST_BUILD_CONFIGURATION - Release, Debug, RelWithDebInfo
#CTEST_SOURCE_NAME - name of source folder; HDF4Examples
-#STATICLIBRARIES - Default is YES
-#NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac
+#STATIC_LIBRARIES - Default is YES
+#FORTRAN_LIBRARIES - Default is NO
+##NO_MAC_FORTRAN - set to TRUE to allow shared libs on a Mac)
if(DEFINED CTEST_SCRIPT_ARG)
# transform ctest script arguments of the form
# script.ctest,var1=value1,var2=value2
@@ -260,8 +264,38 @@ if(DEFINED CTEST_SCRIPT_ARG)
endif()
endforeach()
endif()
+
+# build generator must be defined
+if(NOT DEFINED BUILD_GENERATOR)
+ message(FATAL_ERROR "BUILD_GENERATOR must be defined - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
+else()
+ if(${BUILD_GENERATOR} STREQUAL "Unix")
+ set(CMAKE_GENERATOR "Unix Makefiles")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2015")
+ set(CTEST_CMAKE_GENERATOR "Visual Studio 14 2015")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201564")
+ set(CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2013")
+ set(CMAKE_GENERATOR "Visual Studio 12 2013")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201364")
+ set(CMAKE_GENERATOR "Visual Studio 12 2013 Win64")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS2012")
+ set(CMAKE_GENERATOR "Visual Studio 11 2012")
+ elseif(${BUILD_GENERATOR} STREQUAL "VS201264")
+ set(CMAKE_GENERATOR "Visual Studio 11 2012 Win64")
+ else()
+ message(FATAL_ERROR "Invalid BUILD_GENERATOR must be - Unix, VS2015, VS201564, VS2013, VS201364, VS2012, or VS201264")
+ endif()
+endif()
+set(CTEST_CMAKE_GENERATOR "${CMAKE_GENERATOR}")
+set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
+
if(NOT DEFINED INSTALLDIR)
+ if(WIN32)
+ set(INSTALLDIR "C:\\Program\ Files\\myhdf5")
+ else()
set(INSTALLDIR "/usr/local/myhdf5")
+ endif()
endif()
if(NOT DEFINED CTEST_BUILD_CONFIGURATION)
set(CTEST_BUILD_CONFIGURATION "Release")
@@ -269,36 +303,45 @@ endif()
if(NOT DEFINED CTEST_SOURCE_NAME)
set(CTEST_SOURCE_NAME "HDF5Examples")
endif()
-if(NOT DEFINED STATICLIBRARIES)
+if(NOT DEFINED STATIC_LIBRARIES)
set(STATICLIBRARIES "YES")
endif()
+if(NOT DEFINED FORTRAN_LIBRARIES)
+ set(FORTRANLIBRARIES "NO")
+endif()
#TAR_SOURCE - name of tarfile
#if(NOT DEFINED TAR_SOURCE)
-# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.2.1-Source")
+# set(CTEST_USE_TAR_SOURCE "HDF5Examples-1.10.1-Source")
#endif()
###############################################################################################################
# Adjust the following SET Commands as needed
###############################################################################################################
if(WIN32)
- if(STATICLIBRARIES)
+ if(${STATICLIBRARIES})
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
- endif(STATICLIBRARIES)
+ endif()
set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake")
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build)
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
else(WIN32)
- if(STATICLIBRARIES)
+ if(${STATICLIBRARIES})
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
- endif(STATICLIBRARIES)
+ endif()
set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake")
set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib")
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
endif(WIN32)
+if(${FORTRANLIBRARIES})
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
+else()
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
+endif()
+set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_PACKAGE_NAME:STRING=@HDF5_PACKAGE@@HDF_PACKAGE_EXT@")
###############################################################################################################
# For any comments please contact cdashhelp@hdfgroup.org
@@ -317,11 +360,11 @@ if(APPLE)
if(NOT NO_MAC_FORTRAN)
# Shared fortran is not supported, build static
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
- else(NOT NO_MAC_FORTRAN)
+ else()
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=OFF")
- endif(NOT NO_MAC_FORTRAN)
+ endif()
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
-endif(APPLE)
+endif()
#-----------------------------------------------------------------------------
set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
@@ -341,7 +384,7 @@ if(CTEST_USE_TAR_SOURCE)
message(STATUS "extracting... [error-(${rv}) clean up]")
file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed")
- endif(NOT rv EQUAL 0)
+ endif()
endif(CTEST_USE_TAR_SOURCE)
#-----------------------------------------------------------------------------
@@ -350,9 +393,9 @@ endif(CTEST_USE_TAR_SOURCE)
set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
if (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
-else (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+else ()
file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
-endif (EXISTS "${CTEST_BINARY_DIRECTORY}" AND IS_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+endif ()
# Use multiple CPU cores to build
include(ProcessorCount)
@@ -360,7 +403,7 @@ ProcessorCount(N)
if(NOT N EQUAL 0)
if(NOT WIN32)
set(CTEST_BUILD_FLAGS -j${N})
- endif(NOT WIN32)
+ endif()
set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
endif()
set (CTEST_CONFIGURE_COMMAND
@@ -382,9 +425,9 @@ ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
if(res GREATER 0)
message (FATAL_ERROR "tests FAILED")
-endif(res GREATER 0)
+endif()
#-----------------------------------------------------------------------------
-#################################################################################
+##############################################################################################################
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ca75107..95792c0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -798,38 +798,21 @@ set (H5_GENERATED_HEADERS
option (HDF5_GENERATE_HEADERS "Rebuild Generated Files" ON)
mark_as_advanced (HDF5_GENERATE_HEADERS)
if (HDF5_GENERATE_HEADERS)
+ set_source_files_properties(${H5_GENERATED_HEADERS} PROPERTIES GENERATED TRUE)
find_package (Perl)
if (PERL_FOUND)
- add_custom_command (
- OUTPUT ${HDF5_SRC_DIR}/H5Edefin.h ${HDF5_SRC_DIR}/H5Einit.h ${HDF5_SRC_DIR}/H5Epubgen.h ${HDF5_SRC_DIR}/H5Eterm.h
- PRE_BUILD
- COMMAND ${PERL_EXECUTABLE}
- ARGS ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SRC_DIR}/H5err.txt
- DEPENDS ${HDF5_SRC_DIR}/H5err.txt
- COMMENT " Creating err header"
+ execute_process (
+ COMMAND ${PERL_EXECUTABLE} ${HDF5_SOURCE_DIR}/bin/make_err ${HDF5_SRC_DIR}/H5err.txt OUTPUT_VARIABLE SCRIPT_OUTPUT
)
-
- add_custom_command (
- OUTPUT ${HDF5_SRC_DIR}/H5version.h
- PRE_BUILD
- COMMAND ${PERL_EXECUTABLE}
- ARGS ${HDF5_SOURCE_DIR}/bin/make_vers ${HDF5_SRC_DIR}/H5vers.txt
- DEPENDS ${HDF5_SRC_DIR}/H5vers.txt
- COMMENT " Creating API version macro"
+ message(STATUS ${SCRIPT_OUTPUT})
+ execute_process (
+ COMMAND ${PERL_EXECUTABLE} ${HDF5_SOURCE_DIR}/bin/make_vers ${HDF5_SRC_DIR}/H5vers.txt OUTPUT_VARIABLE SCRIPT_OUTPUT
)
-
- add_custom_command (
- OUTPUT ${HDF5_SRC_DIR}/H5overflow.h
- PRE_BUILD
- COMMAND ${PERL_EXECUTABLE}
- ARGS ${HDF5_SOURCE_DIR}/bin/make_overflow ${HDF5_SRC_DIR}/H5overflow.txt
- DEPENDS ${HDF5_SRC_DIR}/H5overflow.txt
- COMMENT " Creating Assignment overflow macro"
- )
-
- add_custom_target(run_perl_scripts ALL
- DEPENDS ${HDF5_SRC_DIR}/H5Edefin.h ${HDF5_SRC_DIR}/H5Einit.h ${HDF5_SRC_DIR}/H5Epubgen.h ${HDF5_SRC_DIR}/H5Eterm.h ${HDF5_SRC_DIR}/H5version.h ${HDF5_SRC_DIR}/H5overflow.h
+ message(STATUS ${SCRIPT_OUTPUT})
+ execute_process (
+ COMMAND ${PERL_EXECUTABLE} ${HDF5_SOURCE_DIR}/bin/make_overflow ${HDF5_SRC_DIR}/H5overflow.txt OUTPUT_VARIABLE SCRIPT_OUTPUT
)
+ message(STATUS ${SCRIPT_OUTPUT})
else (PERL_FOUND)
message (STATUS "Cannot generate headers - perl not found")
endif (PERL_FOUND)
@@ -844,11 +827,6 @@ TARGET_C_PROPERTIES (H5detect STATIC " " " ")
if (MSVC OR MINGW)
target_link_libraries (H5detect "ws2_32.lib")
endif (MSVC OR MINGW)
-if (HDF5_GENERATE_HEADERS)
- add_dependencies(H5detect run_perl_scripts)
-else (HDF5_GENERATE_HEADERS)
- add_dependencies(H5detect "${H5_GENERATED_HEADERS}")
-endif (HDF5_GENERATE_HEADERS)
set (CMD $<TARGET_FILE:H5detect>)
add_custom_command (
@@ -863,11 +841,6 @@ TARGET_C_PROPERTIES (H5make_libsettings STATIC " " " ")
if (MSVC OR MINGW)
target_link_libraries (H5make_libsettings "ws2_32.lib")
endif (MSVC OR MINGW)
-if (HDF5_GENERATE_HEADERS)
- add_dependencies(H5make_libsettings run_perl_scripts)
-else (HDF5_GENERATE_HEADERS)
- add_dependencies(H5make_libsettings "${H5_GENERATED_HEADERS}")
-endif (HDF5_GENERATE_HEADERS)
set (CMD $<TARGET_FILE:H5make_libsettings>)
add_custom_command (
@@ -899,11 +872,6 @@ set_target_properties (${HDF5_LIB_TARGET} PROPERTIES
FOLDER libraries
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
-if (HDF5_GENERATE_HEADERS)
- add_dependencies(${HDF5_LIB_TARGET} run_perl_scripts)
-else (HDF5_GENERATE_HEADERS)
- add_dependencies(${HDF5_LIB_TARGET} "${HDF5_SRC_DIR}/H5Edefin.h;${HDF5_SRC_DIR}/H5Einit.h;${HDF5_SRC_DIR}/H5Epubgen.h;${HDF5_SRC_DIR}/H5Eterm.h")
-endif (HDF5_GENERATE_HEADERS)
option (HDF5_ENABLE_DEBUG_APIS "Turn on debugging in all packages" OFF)
if (HDF5_ENABLE_DEBUG_APIS)
@@ -932,16 +900,12 @@ if (BUILD_SHARED_LIBS)
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
)
- if (HDF5_GENERATE_HEADERS)
- add_dependencies(${HDF5_LIBSH_TARGET} run_perl_scripts)
- else (HDF5_GENERATE_HEADERS)
- add_dependencies(${HDF5_LIBSH_TARGET} "${HDF5_SRC_DIR}/H5Edefin.h;${HDF5_SRC_DIR}/H5Einit.h;${HDF5_SRC_DIR}/H5Epubgen.h;${HDF5_SRC_DIR}/H5Eterm.h")
- endif (HDF5_GENERATE_HEADERS)
if (HDF5_ENABLE_THREADSAFE)
set_property (TARGET ${HDF5_LIBSH_TARGET}
APPEND PROPERTY COMPILE_DEFINITIONS
"H5_HAVE_THREADSAFE"
)
+ target_link_libraries (${HDF5_LIBSH_TARGET} Threads::Threads)
endif (HDF5_ENABLE_THREADSAFE)
if (HDF5_ENABLE_DEBUG_APIS)
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index bc61374..92df2ad 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -46,14 +46,14 @@
/* Loop through all mapped files */
#define UNIQUE_MEMBERS(MAP,LOOPVAR) { \
H5FD_mem_t _unmapped, LOOPVAR; \
- hbool_t _seen[H5FD_MEM_NTYPES]; \
+ unsigned _seen[H5FD_MEM_NTYPES]; \
\
- memset(_seen, 0, sizeof _seen); \
+ memset(_seen, 0, sizeof _seen); \
for (_unmapped=H5FD_MEM_SUPER; _unmapped<H5FD_MEM_NTYPES; _unmapped=(H5FD_mem_t)(_unmapped+1)) { \
LOOPVAR = MAP[_unmapped]; \
if (H5FD_MEM_DEFAULT==LOOPVAR) LOOPVAR=_unmapped; \
assert(LOOPVAR>0 && LOOPVAR<H5FD_MEM_NTYPES); \
- if (_seen[LOOPVAR]++) continue;
+ if (_seen[LOOPVAR]++) continue; \
#define ALL_MEMBERS(LOOPVAR) { \
H5FD_mem_t LOOPVAR; \
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index 50f6b06..c6b1c83 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -934,6 +934,7 @@ H5F__super_init(H5F_t *f, hid_t dxpl_id)
HDassert(driver_size <= H5F_MAX_DRVINFOBLOCK_SIZE);
/* Encode driver-specific data */
+ HDmemset(dbuf, 0, sizeof(dbuf));
if(H5FD_sb_encode(f->shared->lf, info.name, dbuf) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to encode driver information")
diff --git a/src/H5Gint.c b/src/H5Gint.c
index 3e95b4e..5cdf8fa 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -1231,7 +1231,7 @@ H5G_get_create_plist(H5G_t *grp)
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link pipeline")
/* Set the pipeline for the property list */
- if(H5P_set(new_plist, H5O_CRT_PIPELINE_NAME, &pline) < 0)
+ if(H5P_poke(new_plist, H5O_CRT_PIPELINE_NAME, &pline) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set link pipeline")
} /* end if */
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index 2dfee20..455b1fa 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -263,7 +263,7 @@ H5O_dtype_decode_helper(H5F_t *f, unsigned *ioflags/*in,out*/, const uint8_t **p
unsigned offset_nbytes; /* Size needed to encode member offsets */
size_t max_memb_pos = 0; /* Maximum member covered, so far */
unsigned max_version = 0; /* Maximum member version */
- hbool_t upgrade_to = 0; /* Version number we can "soft" upgrade to */
+ unsigned upgrade_to = 0; /* Version number we can "soft" upgrade to */
unsigned j;
/* Compute the # of bytes required to store a member offset */
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index 622d57d..272e54a 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -42,7 +42,7 @@ static size_t H5O_mtime_size(const H5F_t *f, hbool_t disable_shared, const void
static herr_t H5O_mtime_reset(void *_mesg);
static herr_t H5O_mtime_free(void *_mesg);
static herr_t H5O_mtime_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream,
- int indent, int fwidth);
+ int indent, int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_MTIME[1] = {{
@@ -148,7 +148,7 @@ H5O_mtime_new_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_
/* The return value */
if (NULL==(mesg = H5FL_MALLOC(time_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
*mesg = (time_t)tmp_time;
/* Set return value */
@@ -212,7 +212,7 @@ H5O_mtime_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5
*/
HDmemset(&tm, 0, sizeof tm);
tm.tm_year = (p[0]-'0')*1000 + (p[1]-'0')*100 +
- (p[2]-'0')*10 + (p[3]-'0') - 1900;
+ (p[2]-'0')*10 + (p[3]-'0') - 1900;
tm.tm_mon = (p[4]-'0')*10 + (p[5]-'0') - 1;
tm.tm_mday = (p[6]-'0')*10 + (p[7]-'0');
tm.tm_hour = (p[8]-'0')*10 + (p[9]-'0');
@@ -226,8 +226,7 @@ H5O_mtime_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5
/* BSD-like systems */
the_time += tm.tm_gmtoff;
#elif defined(H5_HAVE_TIMEZONE)
- /* GNU/Linux systems */
- the_time -= timezone - (tm.tm_isdst ? 3600 : 0);
+ the_time -= HDgettimezone() - (tm.tm_isdst ? 3600 : 0);
#else
/*
* The catch-all. If we can't convert a character string universal
@@ -323,8 +322,8 @@ H5O_mtime_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
/* encode */
tm = HDgmtime(mesg);
sprintf((char*)p, "%04d%02d%02d%02d%02d%02d",
- 1900+tm->tm_year, 1+tm->tm_mon, tm->tm_mday,
- tm->tm_hour, tm->tm_min, tm->tm_sec);
+ 1900+tm->tm_year, 1+tm->tm_mon, tm->tm_mday,
+ tm->tm_hour, tm->tm_min, tm->tm_sec);
FUNC_LEAVE_NOAPI(SUCCEED)
}
@@ -507,7 +506,7 @@ H5O_mtime_free(void *mesg)
*/
static herr_t
H5O_mtime_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const void *_mesg, FILE *stream,
- int indent, int fwidth)
+ int indent, int fwidth)
{
const time_t *mesg = (const time_t *)_mesg;
struct tm *tm;
@@ -527,7 +526,7 @@ H5O_mtime_debug(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, const voi
HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
- "Time:", buf);
+ "Time:", buf);
FUNC_LEAVE_NOAPI(SUCCEED)
}
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c
index 47a4354..9c745e4 100644
--- a/src/H5Pgcpl.c
+++ b/src/H5Pgcpl.c
@@ -600,6 +600,7 @@ H5P__gcrt_group_info_dec(const void **_pp, void *_value)
FUNC_ENTER_STATIC_NOERR
/* Set property to default value */
+ HDmemset(ginfo, 0, sizeof(H5O_ginfo_t));
*ginfo = H5G_def_ginfo_g;
UINT32DECODE(*pp, ginfo->lheap_size_hint)
@@ -698,6 +699,7 @@ H5P__gcrt_link_info_dec(const void **_pp, void *_value)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded")
/* Set property to default value */
+ HDmemset(linfo, 0, sizeof(H5O_linfo_t));
*linfo = H5G_def_linfo_g;
H5_DECODE_UNSIGNED(*pp, crt_order_flags)
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index a7b8a72..ae4ae82 100644
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -1590,6 +1590,7 @@ H5P__ocrt_pipeline_dec(const void **_pp, void *_value)
nused = (size_t)enc_value;
/* Set property default value */
+ HDmemset(pline, 0, sizeof(H5O_pline_t));
*pline = H5O_def_pline_g;
for(u = 0; u < nused; u++) {
diff --git a/src/H5T.c b/src/H5T.c
index f6aa5f8..2b6c849 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -802,7 +802,7 @@ H5T__init_package(void)
H5T_INIT_TYPE(OFFSET,H5T_NATIVE_HERR_g,COPY,native_int,SET,sizeof(herr_t))
/* hbool_t */
- H5T_INIT_TYPE(OFFSET,H5T_NATIVE_HBOOL_g,COPY,native_int,SET,sizeof(hbool_t))
+ H5T_INIT_TYPE(OFFSET,H5T_NATIVE_HBOOL_g,COPY,native_uint,SET,sizeof(hbool_t))
/*------------------------------------------------------------
* IEEE Types
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index 45dd1c1..0bc164f 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -2907,7 +2907,7 @@ H5VL_native_link_specific(void *obj, H5VL_loc_params_t loc_params, H5VL_link_spe
}
case H5VL_LINK_ITER:
{
- hbool_t recursive = va_arg (arguments, hbool_t);
+ hbool_t recursive = va_arg (arguments, int);
H5_index_t idx_type = va_arg (arguments, H5_index_t);
H5_iter_order_t order = va_arg (arguments, H5_iter_order_t);
hsize_t *idx_p = va_arg (arguments, hsize_t *);
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index 42d6ceb..0a9a4da 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -748,6 +748,7 @@ H5Z_parse_term(H5Z_token *current, H5Z_datval_ptrs* dat_val_pointers)
case H5Z_XFORM_ERROR:
default:
+ H5Z_xform_destroy_parse_tree(term);
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "bad transform type passed to data transform expression")
} /* end switch */
} /* end for */
diff --git a/src/H5private.h b/src/H5private.h
index 5c9a058..7776ceb 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -367,10 +367,10 @@
* HDF Boolean type.
*/
#ifndef FALSE
-# define FALSE 0
+ #define FALSE false
#endif
#ifndef TRUE
-# define TRUE 1
+ #define TRUE true
#endif
/*
@@ -498,7 +498,7 @@
#endif
/* Double constant wrapper
- *
+ *
* Quiets gcc warnings from -Wunsuffixed-float-constants.
*
* This is a really annoying warning since the standard specifies that
@@ -938,6 +938,14 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#ifndef HDgets
#define HDgets(S) gets(S)
#endif /* HDgets */
+#ifndef H5_HAVE_TM_GMTOFF
+#ifdef H5_HAVE_TIMEZONE
+ #ifndef HDgettimezone
+ #define HDgettimezone() HDget_timezone()
+ #endif /* HDgettimezone */
+ H5_DLL long int HDget_timezone(void);
+#endif /* H5_HAVE_TIMEZONE */
+#endif /* H5_HAVE_TM_GMTOFF */
#ifndef HDgettimeofday
#define HDgettimeofday(S,P) gettimeofday(S,P)
#endif /* HDgettimeofday */
@@ -2074,7 +2082,7 @@ extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */
FUNC_ENTER_COMMON_NOERR(!H5_IS_API(FUNC)); \
if(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) {
-/* Use the following two macros as replacements for the FUNC_ENTER_NOAPI
+/* Use the following two macros as replacements for the FUNC_ENTER_NOAPI
* and FUNC_ENTER_NOAPI_NOINIT macros when the function needs to set
* up a metadata tag. */
#define FUNC_ENTER_NOAPI_TAG(dxpl_id, tag, err) { \
diff --git a/src/H5public.h b/src/H5public.h
index 1c617d1..5b95fb7 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -94,10 +94,10 @@ extern "C" {
/* Version numbers */
#define H5_VERS_MAJOR 1 /* For major interface/format changes */
#define H5_VERS_MINOR 9 /* For minor interface/format changes */
-#define H5_VERS_RELEASE 232 /* For tweaks, bug-fixes, or development */
+#define H5_VERS_RELEASE 233 /* For tweaks, bug-fixes, or development */
#define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */
/* Empty string for real releases. */
-#define H5_VERS_INFO "HDF5 library version: 1.9.232" /* Full version string */
+#define H5_VERS_INFO "HDF5 library version: 1.9.233" /* Full version string */
#define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \
H5_VERS_RELEASE)
@@ -141,7 +141,20 @@ typedef int herr_t;
* printf("error determining whether data type is committed\n");
* }
*/
-typedef unsigned int hbool_t;
+#ifdef H5_HAVE_STDBOOL_H
+ #include <stdbool.h>
+#else /* H5_HAVE_STDBOOL_H */
+ #ifndef __cplusplus
+ #if defined(H5_SIZEOF_BOOL) && (H5_SIZEOF_BOOL != 0)
+ #define bool _Bool
+ #else
+ #define bool unsigned int
+ #endif
+ #define true 1
+ #define false 0
+ #endif /* __cplusplus */
+#endif /* H5_HAVE_STDBOOL_H */
+typedef bool hbool_t;
typedef int htri_t;
/* Define the ssize_t type if it not is defined */
diff --git a/src/H5system.c b/src/H5system.c
index e00e5a5..0de920c 100644
--- a/src/H5system.c
+++ b/src/H5system.c
@@ -586,6 +586,43 @@ void HDsrand(unsigned int seed)
/*-------------------------------------------------------------------------
+ * Function: HDget_timezone
+ *
+ * Purpose: Wrapper function for global variable timezone, if it exists
+ * on this system, or use the function if VS2015
+ *
+ * VS2015 removed the deprecated global variable timezone.
+ *
+ * Return: Success: The value of timezone
+ *
+ * Failure: Cannot fail.
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef H5_HAVE_TM_GMTOFF
+#ifdef H5_HAVE_TIMEZONE
+
+long int HDget_timezone(void)
+{
+#ifdef H5_HAVE_VISUAL_STUDIO
+#if _MSC_VER >= 1900 /* VS 2015 */
+
+ /* In gcc and in Visual Studio prior to VS 2015 'timezone' is a global
+ * variable declared in time.h. That variable was deprecated and in
+ * VS 2015 is removed, with _get_timezone replacing it.
+ */
+ long int timezone = 0;
+
+ #define HDget_timezone(V) _get_timezone(V);
+ HDget_timezone(&timezone);
+#endif
+#endif
+ return timezone;
+}
+#endif /* H5_HAVE_TIMEZONE */
+#endif /* H5_HAVE_TM_GMTOFF */
+
+/*-------------------------------------------------------------------------
* Function: Wgettimeofday
*
* Purpose: Wrapper function for gettimeofday on Windows systems
diff --git a/src/H5win32defs.h b/src/H5win32defs.h
index 185e9b4..73d8417 100644
--- a/src/H5win32defs.h
+++ b/src/H5win32defs.h
@@ -84,7 +84,7 @@ struct timezone {
#define HDgetlogin() Wgetlogin()
#define HDsnprintf c99_snprintf /*varargs*/
#define HDvsnprintf c99_vsnprintf
-
+
#endif /* H5_HAVE_VISUAL_STUDIO */
/* Non-POSIX functions */
diff --git a/test/btree2.c b/test/btree2.c
index 0934ad6..c266b31 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -7633,7 +7633,7 @@ main(void)
bt2_test_param_t tparam; /* Test parameters for v2 B-tree */
hid_t fapl = -1; /* File access property list for data files */
unsigned nerrors = 0; /* Cumulative error count */
- hbool_t reopen; /* Whether to reopen B-tree during tests */
+ unsigned reopen; /* Whether to reopen B-tree during tests */
int ExpressMode;
const char *envval = NULL;
diff --git a/test/cache_api.c b/test/cache_api.c
index ea49631..bb2f141 100644
--- a/test/cache_api.c
+++ b/test/cache_api.c
@@ -1530,7 +1530,7 @@ mdc_api_call_smoke_check(int express_test)
* Note: It is assumed that boolean parameters are only set to TRUE/FALSE.
*/
-#define NUM_INVALID_CONFIGS 42
+#define NUM_INVALID_CONFIGS 36
H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
{
@@ -1605,42 +1605,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 2 -- bad set_initial_size */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ 2,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ TRUE,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
- /* 3 -- max_size too big */
+ /* 2 -- max_size too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -1675,7 +1640,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 4 -- min_size too small */
+ /* 3 -- min_size too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -1710,7 +1675,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 5 -- min_size > max_size */
+ /* 4 -- min_size > max_size */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -1745,7 +1710,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 6 -- initial size out of range (too big) */
+ /* 5 -- initial size out of range (too big) */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -1780,7 +1745,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 7 -- initial_size out of range (too small) */
+ /* 6 -- initial_size out of range (too small) */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -1815,7 +1780,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 8 -- min_clean_fraction too big */
+ /* 7 -- min_clean_fraction too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -1850,7 +1815,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 9 -- min_clean_fraction too small */
+ /* 8 -- min_clean_fraction too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -1885,7 +1850,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 10 -- epoch_length too small */
+ /* 9 -- epoch_length too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -1920,7 +1885,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 11 -- epoch_length too big */
+ /* 10 -- epoch_length too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -1955,7 +1920,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 12 -- invalid incr_mode */
+ /* 11 -- invalid incr_mode */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -1990,7 +1955,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 13 -- lower_hr_threshold too small */
+ /* 12 -- lower_hr_threshold too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2025,7 +1990,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 14 -- lower_hr_threshold too big */
+ /* 13 -- lower_hr_threshold too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2060,7 +2025,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 15 -- increment too small */
+ /* 14 -- increment too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2095,7 +2060,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 16 -- invalid flash_incr_mode */
+ /* 15 -- invalid flash_incr_mode */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2130,7 +2095,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 17 -- flash_multiple too small */
+ /* 16 -- flash_multiple too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2165,7 +2130,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 18 -- flash_multiple too big */
+ /* 17 -- flash_multiple too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2200,7 +2165,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 19 -- flash_threshold too small */
+ /* 18 -- flash_threshold too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2235,7 +2200,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 20 -- flash_threshold too big */
+ /* 19 -- flash_threshold too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2270,7 +2235,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 21 -- bad decr_mode */
+ /* 20 -- bad decr_mode */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2305,7 +2270,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 22 -- upper_hr_threshold too big */
+ /* 21 -- upper_hr_threshold too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2340,7 +2305,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 23 -- decrement too small */
+ /* 22 -- decrement too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2375,7 +2340,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 24 -- decrement too big */
+ /* 23 -- decrement too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2410,7 +2375,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 25 -- epochs_before_eviction too small */
+ /* 24 -- epochs_before_eviction too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2445,7 +2410,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 26 -- epochs_before_eviction too big */
+ /* 25 -- epochs_before_eviction too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2480,42 +2445,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 27 -- invalid apply_empty_reserve */
- /* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
- /* hbool_t rpt_fcn_enabled = */ FALSE,
- /* hbool_t open_trace_file = */ FALSE,
- /* hbool_t close_trace_file = */ FALSE,
- /* char trace_file_name[] = */ "",
- /* hbool_t evictions_enabled = */ TRUE,
- /* hbool_t set_initial_size = */ TRUE,
- /* size_t initial_size = */ (1 * 1024 * 1024),
- /* double min_clean_fraction = */ 0.25f,
- /* size_t max_size = */ (16 * 1024 * 1024),
- /* size_t min_size = */ ( 1 * 1024 * 1024),
- /* long int epoch_length = */ 50000,
- /* enum H5C_cache_incr_mode incr_mode = */ H5C_incr__threshold,
- /* double lower_hr_threshold = */ 0.9f,
- /* double increment = */ 2.0f,
- /* hbool_t apply_max_increment = */ TRUE,
- /* size_t max_increment = */ (4 * 1024 * 1024),
- /* enum H5C_cache_flash_incr_mode */
- /* flash_incr_mode = */ H5C_flash_incr__off,
- /* double flash_multiple = */ 2.0f,
- /* double flash_threshold = */ 0.5f,
- /* enum H5C_cache_decr_mode decr_mode = */ H5C_decr__age_out_with_threshold,
- /* double upper_hr_threshold = */ 0.999f,
- /* double decrement = */ 0.9f,
- /* hbool_t apply_max_decrement = */ TRUE,
- /* size_t max_decrement = */ (1 * 1024 * 1024),
- /* int epochs_before_eviction = */ 3,
- /* hbool_t apply_empty_reserve = */ 2,
- /* double empty_reserve = */ 0.1f,
- /* int dirty_bytes_threshold = */ (256 * 1024),
- /* int metadata_write_strategy = */
- H5AC__DEFAULT_METADATA_WRITE_STRATEGY
- },
- {
- /* 28 -- empty_reserve too small */
+ /* 26 -- empty_reserve too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2550,7 +2480,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 29 -- empty_reserve too big */
+ /* 27 -- empty_reserve too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2585,7 +2515,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 30 -- upper_hr_threshold too small */
+ /* 28 -- upper_hr_threshold too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2620,7 +2550,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 31 -- upper_hr_threshold too big */
+ /* 29 -- upper_hr_threshold too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2655,7 +2585,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 32 -- upper_hr_threshold <= lower_hr_threshold */
+ /* 30 -- upper_hr_threshold <= lower_hr_threshold */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2690,7 +2620,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 33 -- dirty_bytes_threshold too small */
+ /* 31 -- dirty_bytes_threshold too small */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2725,7 +2655,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 34 -- dirty_bytes_threshold too big */
+ /* 32 -- dirty_bytes_threshold too big */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2760,7 +2690,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 35 -- attempt to disable evictions when auto incr enabled */
+ /* 33 -- attempt to disable evictions when auto incr enabled */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2795,7 +2725,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 36 -- attempt to disable evictions when auto decr enabled */
+ /* 34 -- attempt to disable evictions when auto decr enabled */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
@@ -2830,7 +2760,7 @@ H5AC_cache_config_t invalid_configs[NUM_INVALID_CONFIGS] =
H5AC__DEFAULT_METADATA_WRITE_STRATEGY
},
{
- /* 37 -- unknown metadata write strategy */
+ /* 35 -- unknown metadata write strategy */
/* int version = */ H5C__CURR_AUTO_SIZE_CTL_VER,
/* hbool_t rpt_fcn_enabled = */ FALSE,
/* hbool_t open_trace_file = */ FALSE,
diff --git a/test/dsets.c b/test/dsets.c
index a233b4e..c0e8702 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -9080,7 +9080,7 @@ main(void)
{
char filename[FILENAME_BUF_SIZE];
hid_t file, grp, fapl, fapl2;
- hbool_t new_format;
+ unsigned new_format;
int mdc_nelmts;
size_t rdcc_nelmts;
size_t rdcc_nbytes;
diff --git a/test/dtypes.c b/test/dtypes.c
index 6fe455d..326294f 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -6728,7 +6728,7 @@ test_delete_obj_named(hid_t fapl)
hid_t attr = -1; /* Attribute ID */
hid_t dset = -1; /* Dataset ID */
hid_t fapl2 = -1; /* File access property list ID */
- hbool_t new_format; /* Whether to use old or new format */
+ unsigned new_format; /* Whether to use old or new format */
char filename[1024], filename2[1024];
TESTING("deleting objects that use named datatypes");
@@ -6823,7 +6823,7 @@ test_delete_obj_named_fileid(hid_t fapl)
hid_t attr = -1; /* Attribute ID */
hid_t dset = -1; /* Dataset ID */
hid_t fapl2 = -1; /* File access property list ID */
- hbool_t new_format; /* Whether to use old or new format */
+ unsigned new_format; /* Whether to use old or new format */
char filename[1024], filename2[1024];
TESTING("deleting objects that use named datatypes");
diff --git a/test/fillval.c b/test/fillval.c
index b7b2ff5..1ea2ae6 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -2368,7 +2368,7 @@ main(int argc, char *argv[])
{
int nerrors=0, argno, test_contig=1, test_chunk=1, test_compact=1;
hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */
- hbool_t new_format; /* Whether to use the new format or not */
+ unsigned new_format; /* Whether to use the new format or not */
if(argc >= 2) {
test_contig = test_chunk = test_compact = 0;
diff --git a/test/links.c b/test/links.c
index 577834d..db5922b 100644
--- a/test/links.c
+++ b/test/links.c
@@ -10695,7 +10695,7 @@ corder_delete(hid_t fapl)
unsigned min_dense; /* Minimum # of links to store in group "densely" */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
- hbool_t reopen_file; /* Whether to re-open the file before deleting group */
+ unsigned reopen_file; /* Whether to re-open the file before deleting group */
h5_stat_size_t empty_size; /* Size of empty file */
h5_stat_size_t file_size; /* Size of file after operating on it */
char objname[NAME_BUF_SIZE]; /* Object name */
@@ -10976,8 +10976,8 @@ link_info_by_idx(hid_t fapl)
hid_t file_id = (-1); /* File ID */
hid_t group_id = (-1); /* Group ID */
hid_t gcpl_id = (-1); /* Group creation property list ID */
- hbool_t hard_link; /* Create hard or soft link? */
- hbool_t use_index; /* Use index on creation order values */
+ unsigned hard_link; /* Create hard or soft link? */
+ unsigned use_index; /* Use index on creation order values */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
H5L_info_t linfo; /* Link info struct */
@@ -11159,7 +11159,7 @@ link_info_by_idx_old(hid_t fapl)
{
hid_t file_id = (-1); /* File ID */
hid_t group_id = (-1), group_id2 = (-1); /* Group IDs */
- hbool_t hard_link; /* Create hard or soft link? */
+ unsigned hard_link; /* Create hard or soft link? */
H5L_info_t linfo; /* Link info struct */
char objname[NAME_BUF_SIZE]; /* Object name */
char valname[NAME_BUF_SIZE]; /* Link value name */
@@ -11328,7 +11328,7 @@ delete_by_idx(hid_t fapl)
hid_t gcpl_id = (-1); /* Group creation property list ID */
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
- hbool_t use_index; /* Use index on creation order values */
+ unsigned use_index; /* Use index on creation order values */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
H5L_info_t linfo; /* Link info struct */
@@ -12161,7 +12161,7 @@ link_iterate(hid_t fapl)
hid_t gcpl_id = (-1); /* Group creation property list ID */
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
- hbool_t use_index; /* Use index on creation order values */
+ unsigned use_index; /* Use index on creation order values */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
char objname[NAME_BUF_SIZE]; /* Object name */
@@ -12847,7 +12847,7 @@ open_by_idx(hid_t fapl)
hid_t gcpl_id = (-1); /* Group creation property list ID */
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
- hbool_t use_index; /* Use index on creation order values */
+ unsigned use_index; /* Use index on creation order values */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
H5O_info_t oi; /* Buffer for querying object's info */
@@ -13283,7 +13283,7 @@ object_info(hid_t fapl)
hid_t space_id = (-1); /* Dataspace ID (for attributes) */
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
- hbool_t use_index; /* Use index on creation order values */
+ unsigned use_index; /* Use index on creation order values */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
H5O_info_t oinfo; /* Buffer for querying object's info */
@@ -13679,7 +13679,7 @@ group_info(hid_t fapl)
hid_t gcpl_id = (-1); /* Group creation property list ID */
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
- hbool_t use_index; /* Use index on creation order values */
+ unsigned use_index; /* Use index on creation order values */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
H5G_info_t grp_info; /* Buffer for querying object's info */
@@ -14490,8 +14490,8 @@ main(void)
{
hid_t fapl, fapl2; /* File access property lists */
int nerrors = 0;
- hbool_t new_format; /* Whether to use the new format or not */
- hbool_t efc; /* Whether to use the external file cache */
+ unsigned new_format; /* Whether to use the new format or not */
+ unsigned efc; /* Whether to use the external file cache */
const char *env_h5_drvr; /* File Driver value from environment */
env_h5_drvr = HDgetenv("HDF5_DRIVER");
diff --git a/test/mf.c b/test/mf.c
index e7eaee0..5c20b7a 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -6802,7 +6802,7 @@ test_mf_fs_drivers(hid_t fapl)
hid_t fcpl = -1; /* file creation property list */
hid_t fapl_new = -1; /* copy of file access property list */
hid_t fapl2 = -1; /* copy of file access property list */
- hbool_t new_format; /* To use new library format or not */
+ unsigned new_format; /* To use new library format or not */
unsigned ret = 0; /* return value */
H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; /* Memory usage map */
@@ -7227,7 +7227,7 @@ test_filespace_drivers(hid_t fapl)
{
hid_t fapl_new = -1; /* copy of file access property list */
hid_t fapl2 = -1; /* copy of file access property list */
- hbool_t new_format; /* Using library new format or not */
+ unsigned new_format; /* Using library new format or not */
unsigned ret = 0; /* return value */
H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; /* Memory usage map */
diff --git a/test/objcopy.c b/test/objcopy.c
index ecc3ba5..82be446 100644
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -12312,7 +12312,7 @@ main(void)
/* Tests that do not use attributes and do not need to be tested
* multiple times for different attribute configurations */
if(configuration < CONFIG_DENSE) {
- hbool_t reopen;
+ unsigned reopen;
nerrors += test_copy_named_datatype(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
nerrors += test_copy_named_datatype_vl(fcpl_src, fcpl_dst, src_fapl, dst_fapl);
diff --git a/test/ohdr.c b/test/ohdr.c
index ba632c2..bcad826 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -321,7 +321,7 @@ main(void)
time_t time_new, ro;
int chunkno; /* Chunk index for message */
int i; /* Local index variable */
- hbool_t b; /* Index for "new format" loop */
+ unsigned b; /* Index for "new format" loop */
herr_t ret; /* Generic return value */
/* Reset library */
diff --git a/test/plugin.c b/test/plugin.c
index e34c691..a3082d2 100644
--- a/test/plugin.c
+++ b/test/plugin.c
@@ -710,7 +710,7 @@ main(void)
{
char filename[FILENAME_BUF_SIZE];
hid_t file, fapl, fapl2;
- hbool_t new_format;
+ unsigned new_format;
int mdc_nelmts;
size_t rdcc_nelmts;
size_t rdcc_nbytes;
diff --git a/test/set_extent.c b/test/set_extent.c
index f6c3766..ae83ba2 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -116,8 +116,8 @@ int main( void )
{
hid_t fapl; /* file access property list */
hid_t fapl2; /* file access property list w/latest format set */
- hbool_t new_format; /* Whether to use the latest file format */
- hbool_t chunk_cache; /* Whether to enable chunk caching */
+ unsigned new_format; /* Whether to use the latest file format */
+ unsigned chunk_cache; /* Whether to enable chunk caching */
int nerrors = 0;
/* Initialize random number seed */
diff --git a/test/stab.c b/test/stab.c
index 7db1feb..f81bb5f 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -1166,7 +1166,7 @@ int
main(void)
{
hid_t fapl, fapl2; /* File access property list IDs */
- hbool_t new_format; /* Whether to use the new format or not */
+ unsigned new_format; /* Whether to use the new format or not */
int nerrors = 0;
/* Reset library */
diff --git a/test/tattr.c b/test/tattr.c
index d96ca59..585246a 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -5338,7 +5338,7 @@ test_attr_corder_delete(hid_t fcpl, hid_t fapl)
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
- hbool_t reopen_file; /* Whether to re-open the file before deleting group */
+ unsigned reopen_file; /* Whether to re-open the file before deleting group */
char attrname[NAME_BUF_SIZE]; /* Name of attribute */
#ifdef LATER
h5_stat_size_t empty_size; /* Size of empty file */
@@ -5687,7 +5687,7 @@ test_attr_info_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
- hbool_t use_index; /* Use index on creation order values */
+ unsigned use_index; /* Use index on creation order values */
char attrname[NAME_BUF_SIZE]; /* Name of attribute */
char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
unsigned curr_dset; /* Current dataset to work on */
@@ -5899,7 +5899,7 @@ test_attr_delete_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
hsize_t corder_count; /* # of records in creation order index */
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
- hbool_t use_index; /* Use index on creation order values */
+ unsigned use_index; /* Use index on creation order values */
char attrname[NAME_BUF_SIZE]; /* Name of attribute */
char tmpname[NAME_BUF_SIZE]; /* Temporary attribute name */
unsigned curr_dset; /* Current dataset to work on */
@@ -6842,7 +6842,7 @@ test_attr_iterate2(hbool_t new_format, hid_t fcpl, hid_t fapl)
attr_iter_info_t iter_info; /* Iterator info */
hbool_t *visited = NULL; /* Array of flags for visiting links */
hsize_t idx; /* Start index for iteration */
- hbool_t use_index; /* Use index on creation order values */
+ unsigned use_index; /* Use index on creation order values */
const char *dsetname; /* Name of dataset for attributes */
char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned curr_dset; /* Current dataset to work on */
@@ -7203,7 +7203,7 @@ test_attr_open_by_idx(hbool_t new_format, hid_t fcpl, hid_t fapl)
hsize_t corder_count; /* # of records in creation order index */
H5_index_t idx_type; /* Type of index to operate on */
H5_iter_order_t order; /* Order within in the index */
- hbool_t use_index; /* Use index on creation order values */
+ unsigned use_index; /* Use index on creation order values */
char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned curr_dset; /* Current dataset to work on */
unsigned u; /* Local index variable */
@@ -7549,7 +7549,7 @@ test_attr_open_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
- hbool_t use_index; /* Use index on creation order values */
+ unsigned use_index; /* Use index on creation order values */
const char *dsetname; /* Name of dataset for attributes */
char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned curr_dset; /* Current dataset to work on */
@@ -7804,7 +7804,7 @@ test_attr_create_by_name(hbool_t new_format, hid_t fcpl, hid_t fapl)
hsize_t nattrs; /* Number of attributes on object */
hsize_t name_count; /* # of records in name index */
hsize_t corder_count; /* # of records in creation order index */
- hbool_t use_index; /* Use index on creation order values */
+ unsigned use_index; /* Use index on creation order values */
const char *dsetname; /* Name of dataset for attributes */
char attrname[NAME_BUF_SIZE]; /* Name of attribute */
unsigned curr_dset; /* Current dataset to work on */
@@ -10568,8 +10568,8 @@ test_attr(void)
{
hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */
hid_t fcpl = (-1), fcpl2 = (-1); /* File creation property lists */
- hbool_t new_format; /* Whether to use the new format or not */
- hbool_t use_shared; /* Whether to use shared attributes or not */
+ unsigned new_format; /* Whether to use the new format or not */
+ unsigned use_shared; /* Whether to use shared attributes or not */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
diff --git a/test/tfile.c b/test/tfile.c
index 0ae8ba7..f0c3930 100644
--- a/test/tfile.c
+++ b/test/tfile.c
@@ -3084,7 +3084,7 @@ test_filespace_info(void)
char filename[FILENAME_LEN]; /* Filename to use */
H5F_file_space_type_t strategy, fs_type, def_type; /* File space handling strategy */
hsize_t threshold, fs_size, def_size; /* Free space section threshold */
- hbool_t new_format; /* new format or old format */
+ unsigned new_format; /* new format or old format */
herr_t ret; /* return value */
/* Output message about test being performed */
@@ -3147,7 +3147,7 @@ test_filespace_info(void)
/* Create the file with the specified file space info */
fid1 = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl1, my_fapl);
- CHECK(ret, FAIL, "H5Fcreate");
+ CHECK(fid1, FAIL, "H5Fcreate");
/* Close the file */
ret = H5Fclose(fid1);
@@ -3155,7 +3155,7 @@ test_filespace_info(void)
/* Re-open the file */
fid2 = H5Fopen(filename, H5F_ACC_RDWR, my_fapl);
- CHECK(ret, FAIL, "H5Fopen");
+ CHECK(fid2, FAIL, "H5Fopen");
/* Get the file's creation property */
fcpl2 = H5Fget_create_plist(fid2);
diff --git a/test/th5o.c b/test/th5o.c
index 90f3c9b..497ccc8 100644
--- a/test/th5o.c
+++ b/test/th5o.c
@@ -776,7 +776,7 @@ test_h5o_link(void)
hid_t lcpl_id=-1;
hsize_t dims[2] = {TEST6_DIM1, TEST6_DIM2};
htri_t committed; /* Whether the named datatype is committed */
- hbool_t new_format; /* Whether to use the new format or not */
+ unsigned new_format; /* Whether to use the new format or not */
int wdata[TEST6_DIM1][TEST6_DIM2];
int rdata[TEST6_DIM1][TEST6_DIM2];
int i, n, j;
diff --git a/test/titerate.c b/test/titerate.c
index 98428ea..20a3940 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -919,7 +919,7 @@ void
test_iterate(void)
{
hid_t fapl, fapl2; /* File access property lists */
- hbool_t new_format; /* Whether to use the new format or not */
+ unsigned new_format; /* Whether to use the new format or not */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
diff --git a/test/tmisc.c b/test/tmisc.c
index 61c6fdd..9ecc2be 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -5176,7 +5176,7 @@ static void
test_misc30(void)
{
hsize_t file_size[] = {0, 0}; /* Sizes of file created */
- hbool_t get_info; /* Whether to perform the get info call */
+ unsigned get_info; /* Whether to perform the get info call */
/* Output message about test being performed */
MESSAGE(5, ("Local heap dropping free block info\n"));
diff --git a/test/unlink.c b/test/unlink.c
index c091281..7169365 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -2443,7 +2443,7 @@ main(void)
hid_t fapl, fapl2, file;
int nerrors = 0;
char filename[1024];
- hbool_t new_format;
+ unsigned new_format;
/* Metadata cache parameters */
int mdc_nelmts;
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index feea137..c234257 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -626,7 +626,7 @@ Test Whether the Displacement of MPI derived datatype
and this platform.
1. Details for the test:
-1) Create two derived datatypes with MPI_Type_hindexed:
+1) Create two derived datatypes with MPI_Type_create_hindexed:
datatype1:
count = 1, blocklens = 1, offsets = 0,
base type = MPI_BYTE(essentially a char)
@@ -635,7 +635,7 @@ and this platform.
base type = MPI_BYTE
2) Using these two derived datatypes,
- Build another derived datatype with MPI_Type_struct:
+ Build another derived datatype with MPI_Type_create_struct:
advtype: derived from datatype1 and datatype2
advtype:
count = 2, blocklens[0] = 1, blocklens[1]=1,
@@ -716,7 +716,7 @@ static int test_mpio_derived_dtype(char *filename) {
blocklens[0] = 1;
offsets[0] = 0;
- if((mpi_err= MPI_Type_hindexed(count,blocklens,offsets,MPI_BYTE,&filetype))
+ if((mpi_err= MPI_Type_create_hindexed(count,blocklens,offsets,MPI_BYTE,&filetype))
!= MPI_SUCCESS){
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
@@ -732,7 +732,7 @@ static int test_mpio_derived_dtype(char *filename) {
count = 1;
blocklens[0]=1;
offsets[0] = 1;
- if((mpi_err= MPI_Type_hindexed(count,blocklens,offsets,MPI_BYTE,&filetypenew))
+ if((mpi_err= MPI_Type_create_hindexed(count,blocklens,offsets,MPI_BYTE,&filetypenew))
!= MPI_SUCCESS){
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str);
@@ -753,10 +753,10 @@ static int test_mpio_derived_dtype(char *filename) {
bas_filetype[0] = filetype;
bas_filetype[1] = filetypenew;
- if((mpi_err= MPI_Type_struct(outcount,adv_blocklens,adv_disp,bas_filetype,&adv_filetype))
+ if((mpi_err= MPI_Type_create_struct(outcount,adv_blocklens,adv_disp,bas_filetype,&adv_filetype))
!= MPI_SUCCESS){
MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen);
- printf("MPI_Type_struct failed (%s)\n", mpi_err_str);
+ printf("MPI_Type_create_struct failed (%s)\n", mpi_err_str);
return 1;
}
if((mpi_err=MPI_Type_commit(&adv_filetype))!=MPI_SUCCESS){
@@ -843,7 +843,7 @@ has no contribution to IO. To properly test this case, at least FOUR
processes are needed.
1. Details for the test:
-1) Create one derived datatype with MPI_Type_hindexed:
+1) Create one derived datatype with MPI_Type_create_hindexed:
2) Choosing at least two processes to contribute none for IO with
the buf size inside MPI_Write_at_all to 0.
@@ -899,7 +899,7 @@ test_mpio_special_collective(char *filename)
offsets[1] = (mpi_size+mpi_rank)*count;
if(count !=0) {
- if((mpi_err = MPI_Type_hindexed(2,
+ if((mpi_err = MPI_Type_create_hindexed(2,
blocklens,
offsets,
etype,
@@ -915,7 +915,7 @@ test_mpio_special_collective(char *filename)
return 1;
} /* end if */
- if((mpi_err = MPI_Type_hindexed(2,
+ if((mpi_err = MPI_Type_create_hindexed(2,
blocklens,
offsets,
etype,
diff --git a/tools/h5diff/CMakeTests.cmake b/tools/h5diff/CMakeTests.cmake
index 33d0971..0595edd 100644
--- a/tools/h5diff/CMakeTests.cmake
+++ b/tools/h5diff/CMakeTests.cmake
@@ -280,9 +280,9 @@
#
- # Overwrite system dependent files (Windows)
+ # Overwrite system dependent files (Windows) and not VS2015
#
- if (WIN32)
+ if (WIN32 AND MSVC_VERSION LESS 1900)
add_custom_command (
TARGET h5diff
POST_BUILD
@@ -309,7 +309,7 @@
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_104.txt
)
- endif (WIN32)
+ endif (WIN32 AND MSVC_VERSION LESS 1900)
##############################################################################
##############################################################################
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 6474082..190343b 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -334,8 +334,8 @@ hsize_t diff_attr(hid_t loc1_id,
size_t msize2; /* memory size of memory type */
void *buf1=NULL; /* data buffer */
void *buf2=NULL; /* data buffer */
- int buf1hasdata=0; /* buffer has data */
- int buf2hasdata=0; /* buffer has data */
+ hbool_t buf1hasdata=FALSE; /* buffer has data */
+ hbool_t buf2hasdata=FALSE; /* buffer has data */
hsize_t nelmts1; /* number of elements in dataset */
int rank1; /* rank of dataset */
int rank2; /* rank of dataset */
@@ -472,12 +472,12 @@ hsize_t diff_attr(hid_t loc1_id,
parallel_print("Failed reading attribute1 %s/%s\n", path1, name1);
goto error;
}else
- buf1hasdata = 1;
+ buf1hasdata = TRUE;
if(H5Aread(attr2_id,mtype2_id,buf2) < 0){
parallel_print("Failed reading attribute2 %s/%s\n", path2, name2);
goto error;
}else
- buf2hasdata = 1;
+ buf2hasdata = TRUE;
/* format output string */
HDsnprintf(np1, sizeof(np1), "%s of <%s>", name1, path1);
diff --git a/tools/perform/pio_standalone.h b/tools/perform/pio_standalone.h
index 584a057..762a564 100644
--- a/tools/perform/pio_standalone.h
+++ b/tools/perform/pio_standalone.h
@@ -105,10 +105,10 @@ typedef off_t h5_stat_size_t;
* HDF Boolean type.
*/
#ifndef FALSE
-# define FALSE 0
+# define FALSE false
#endif
#ifndef TRUE
-# define TRUE 1
+# define TRUE true
#endif
diff --git a/tools/perform/sio_standalone.h b/tools/perform/sio_standalone.h
index 8f52eba..547a9ee 100644
--- a/tools/perform/sio_standalone.h
+++ b/tools/perform/sio_standalone.h
@@ -471,10 +471,10 @@ extern char *strdup(const char *s);
* HDF Boolean type.
*/
#ifndef FALSE
-# define FALSE 0
+# define FALSE false
#endif
#ifndef TRUE
-# define TRUE 1
+# define TRUE true
#endif
/** From h5test.h **/
diff --git a/tools/testfiles/tldouble.h5 b/tools/testfiles/tldouble.h5
index 56f673f..eb031e7 100644
--- a/tools/testfiles/tldouble.h5
+++ b/tools/testfiles/tldouble.h5
Binary files differ