summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-08-21 22:13:03 (GMT)
committerGitHub <noreply@github.com>2023-08-21 22:13:03 (GMT)
commitceef4a9ebd055f9ec0378a97ec2ce9421cdec866 (patch)
tree887ab50783fb357f8c5f9fe0dee1d6ba5dc536a5 /config
parent89b4afd4b317c5131cbc8607c99d21b369d050eb (diff)
downloadhdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.zip
hdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.tar.gz
hdf5-ceef4a9ebd055f9ec0378a97ec2ce9421cdec866.tar.bz2
Merge/update CMake, presets,java and tools (#3393)
Diffstat (limited to 'config')
-rw-r--r--config/README.md88
-rw-r--r--config/apple127
-rw-r--r--config/clang-cxxflags2
-rw-r--r--config/clang-warnings/error-general3
-rw-r--r--config/cmake-presets/hidden-presets.json4
-rw-r--r--config/cmake/CTestCustom.cmake17
-rw-r--r--config/cmake/ConfigureChecks.cmake44
-rw-r--r--config/cmake/ConversionTests.c290
-rw-r--r--config/cmake/H5pubconf.h.in4
-rw-r--r--config/cmake/HDF5DeveloperBuild.cmake196
-rw-r--r--config/cmake/HDF5UseFortran.cmake6
-rw-r--r--config/cmake/HDFCXXCompilerFlags.cmake2
-rw-r--r--config/cmake/HDFCompilerFlags.cmake51
-rw-r--r--config/cmake/HDFFortranCompilerFlags.cmake18
-rw-r--r--config/cmake/HDFMacros.cmake6
-rw-r--r--config/cmake/ZLIB/zlib-config.cmake.in2
-rw-r--r--config/cmake/cacheinit.cmake7
-rw-r--r--config/cmake/examples/CTestScript.cmake (renamed from config/cmake/CTestScript.cmake)27
-rw-r--r--config/cmake/examples/HDF5_Examples.cmake.in (renamed from config/cmake/HDF5_Examples.cmake.in)2
-rw-r--r--config/cmake/examples/HDF5_Examples_options.cmake (renamed from config/cmake/HDF5_Examples_options.cmake)0
-rw-r--r--config/cmake/grepTest.cmake16
-rw-r--r--config/cmake/hdf5-config.cmake.in6
-rw-r--r--config/cmake/jrunTest.cmake16
-rw-r--r--config/cmake/libhdf5.settings.cmake.in32
-rw-r--r--config/cmake/mccacheinit.cmake21
-rw-r--r--config/cmake/runTest.cmake16
-rw-r--r--config/cmake/scripts/HDF5options.cmake6
-rw-r--r--config/cmake/vfdTest.cmake16
-rw-r--r--config/cmake/volTest.cmake16
-rw-r--r--config/conclude_fc.am4
-rw-r--r--config/gnu-cxxflags2
-rw-r--r--config/gnu-fflags7
-rw-r--r--config/gnu-warnings/4.87
-rw-r--r--config/gnu-warnings/cxx-4.87
-rw-r--r--config/gnu-warnings/cxx-developer-4.87
-rw-r--r--config/gnu-warnings/developer-124
-rw-r--r--config/gnu-warnings/developer-4.87
-rw-r--r--config/gnu-warnings/developer-general9
-rw-r--r--config/gnu-warnings/error-815
-rw-r--r--config/gnu-warnings/error-general38
-rw-r--r--config/gnu-warnings/gfort-4.81
-rw-r--r--config/gnu-warnings/gfort-developer-4.83
-rw-r--r--config/gnu-warnings/gfort-developer-5 (renamed from config/gnu-warnings/developer-gfort-5)0
-rw-r--r--config/gnu-warnings/gfort-developer-general3
-rw-r--r--config/gnu-warnings/gfort-no-developer-4.83
-rw-r--r--config/gnu-warnings/gfort-no-developer-general3
-rw-r--r--config/gnu-warnings/no-cxx-developer-4.83
-rw-r--r--config/gnu-warnings/no-developer-4.83
-rw-r--r--config/ibm-aix2
-rw-r--r--config/intel-cxxflags2
-rw-r--r--config/intel-fflags2
-rw-r--r--config/intel-warnings/developer-general9
-rw-r--r--config/pgi-cxxflags2
-rw-r--r--config/sanitizer/README.md2
54 files changed, 817 insertions, 369 deletions
diff --git a/config/README.md b/config/README.md
new file mode 100644
index 0000000..8459b77
--- /dev/null
+++ b/config/README.md
@@ -0,0 +1,88 @@
+# The `config` directory
+
+## Intro
+
+HDF5 can be configured using both the GNU Autotools and CMake. We try to keep
+them in sync, but you can expect minor differences to crop up. Please create
+a GitHub issue for any differences noted. Note that with the Autotools, we
+do NOT check generated files into GitHub until release time, so you will
+need to generate `configure`, `Makefile.in`(s), etc. via `autogen.sh` in the
+project root if you want to build with that system.
+
+Configuration information for the HDF5 library and tools is (unfortunately)
+spread across the repository. Basic library configuration will generally
+be found in `configure.ac` (Autotools) and the root's `CMakeLists.txt` (CMake).
+Each subdirectory of the project also has its own `Makefile.am` or CMake build
+and test files.
+
+This directory contains a few important things:
+
+* Autotools OS- and compiler-specific configuration
+* CMake support files (in `cmake`)
+* Warning files shared between the two systems (in `*-warnings` directories)
+* CMake toolchain files (in `toolchain`)
+* CMake sanitizer files (in `sanitizer`)
+
+CMake will be documented elsewhere. This document focuses on the Autotools files
+and the shared warning files.
+
+## Autotools
+
+An Autotools build will first use `$host_cpu`, `$host_os`, etc. to try to find a
+suitable platform file in `config` to source and start checking compilers. The
+code that does this is in `configure.ac` (search for `host_os`). For example,
+MacOS will source the `apple` file and FreeBSD will source the `freebsd` file.
+There are a bunch of Linux files, but they all eventually invoke
+`linux-gnulibc1`.
+
+If you dig into one of these files, the way that they check for compilers is
+rather crude. Each OS script will simply source the various C, C++, and
+Fortran compiler files that are listed inside. Each compiler file checks
+the designated compiler's version output to see if there's a match, and if so,
+the flag processing proceeds, and a variable like `cc_flags_set` will be set
+at the end.
+
+In case it's not obvious, the C files end in `-flags`, C++ in `-cxxflags`, and
+Fortran in `-fflags`.
+
+When a compiler matches, the script will attempt to set the `CFLAGS`, etc.
+variables based on the platform and compiler's properties. There are typically
+a large number of flag categories (e.g., `DEBUG_OPT_CFLAGS`) that are
+conditionally appended to the canonical variables, like `AM_FLAGS`, by the
+remainder of the `configure` script.
+
+For the major compilers, like Clang and gcc, there will be a section at the
+end where we append version-specific flags, mainly for warnings. These are
+imported via a function in the script (`load_gnu_arguments()` for gcc). See
+below for more detail.
+
+## Warnings files
+
+Keeping the Autotools and CMake build files in sync has always been a bit of a
+struggle. One way that we help to ensure that the same flags are used in each
+build system is to import the warnings settings from text files that are
+maintained separately from the Autotools and CMake build files. We like to
+configure the compiler to be as crabby as possible so as to catch subtle bugs,
+so there are a LOT of warning flags for popular compilers like Clang and gcc.
+
+We've located these files in `config/*-warnings` directories. Each file
+represents a compiler version and contains the warning flags we set, one to a
+line. Lines that start with `#` are considered comment lines. You'll also see
+`developer` and `no-developer` flavors of compiler version files. The former
+corresponds to "developer flags" that are usually either only semi-useful and/or
+generate a lot of (usually unfixable) noise. The latter corresponds to things
+that we want to ensure do NOT appear in non-developer builds of the library.
+These might involve a different level setting (`-Wfoo=x`) or something that
+gets incorporated in a "conglomerate" flag like `-Wextra` so we need to set
+`-Wno-foo` in non-developer builds. Developer warnings can be turned on
+via a configure option. You will also sometimes see `error` files. Those are
+files that include warnings that will be considered errors if you have enabled
+the "warnings as errors" configure option set. Now that the library is largely
+warning-free, these are less useful than in the past as you can now just set
+-Werror directly in many cases (our configure script is smart about not running
+configure checks with -Werror).
+
+For anyone interested, we are always interested in improving both the OS and
+compiler files, so pull requests for those are always welcome, especially for
+platforms we don't have routine access to. If you are a compiler or platform
+expert/aficionado, please help us out!
diff --git a/config/apple b/config/apple
index 3eb65a7..a8a219b 100644
--- a/config/apple
+++ b/config/apple
@@ -21,58 +21,60 @@
# No support for OS older than darwin 10.X.
if test "X-" = "X-$CC"; then
case "$host_os" in
- darwin10.*) # Snow Leopard. Use gcc/g++ because clang++ is not available.
- CC=gcc
- CC_BASENAME=gcc
- ;;
- *)
- CC=clang
- CC_BASENAME=clang
-
- # Production
- PROD_CFLAGS="-O3"
- PROD_CPPFLAGS=
-
- # Debug
- DEBUG_CFLAGS="-g -O0"
- DEBUG_CPPFLAGS=
-
- # Profile
- # Use this for profiling with gprof
- # Just "-g" for now. More later.
- PROFILE_CFLAGS="-g"
- PROFILE_CPPFLAGS=
- ;;
+ darwin10.*) # Snow Leopard. Use gcc/g++ because clang++ is not available.
+ CC=gcc
+ CC_BASENAME=gcc
+ ;;
+ *)
+ if test "X-$enable_parallel" = "X-yes"; then
+ # default to use mpicc which is the defacto MPI compiler name
+ CC=mpicc
+ CC_BASENAME=mpicc
+ else
+ CC=clang
+ CC_BASENAME=clang
+ fi
+
+ # Production
+ PROD_CFLAGS="-O3"
+ PROD_CPPFLAGS=
+
+ # Debug
+ DEBUG_CFLAGS="-g -O0"
+ DEBUG_CPPFLAGS=
+
+ # Profile
+ # Use this for profiling with gprof
+ # Just "-g" for now. More later.
+ PROFILE_CFLAGS="-g"
+ PROFILE_CPPFLAGS=
+ ;;
esac
fi
-# Figure out compiler flags
+# Figure out C compiler flags
. $srcdir/config/gnu-flags
. $srcdir/config/clang-flags
+. $srcdir/config/intel-flags
+
# temp patch: if GCC 4.2.1 is used in Lion or Mountain Lion systems, do not
# use -O option as it causes failures in test/dt_arith.
case "$host_os" in
darwin1[12].*) # lion & mountain lion
- #echo cc_vendor=$cc_vendor'-'cc_version=$cc_version
- case "$cc_vendor-$cc_version" in
- gcc-4.2.1)
- # Remove any -O flags
- #echo PROD_CFLAGS=$PROD_CFLAGS
- PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O[0-3]*//'`"
- #echo new PROD_CFLAGS=$PROD_CFLAGS
- ;;
- esac
- ;;
+ #echo cc_vendor=$cc_vendor'-'cc_version=$cc_version
+ case "$cc_vendor-$cc_version" in
+ gcc-4.2.1)
+ # Remove any -O flags
+ #echo PROD_CFLAGS=$PROD_CFLAGS
+ PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O[0-3]*//'`"
+ #echo new PROD_CFLAGS=$PROD_CFLAGS
+ ;;
+ esac
+ ;;
esac
-
-. $srcdir/config/intel-flags
+
if test "X-" = "X-$FC"; then
case $CC_BASENAME in
- clang)
- # clang has no fortran compiler. Use gfortran.
- FC=gfortran
- FC_BASENAME=gfortran
- ;;
gcc*)
FC=gfortran
FC_BASENAME=gfortran
@@ -81,15 +83,26 @@ if test "X-" = "X-$FC"; then
FC=ifort
FC_BASENAME=ifort
;;
+ mpicc*)
+ FC=mpif90
+ FC_BASENAME=mpif90
+ ;;
+ clang)
+ # clang has no fortran compiler. Use gfortran.
+ FC=gfortran
+ FC_BASENAME=gfortran
+ ;;
esac
fi
+# Figure out FORTRAN compiler flags
+. $srcdir/config/gnu-fflags
+. $srcdir/config/intel-fflags
+
+
+# The default C++ compiler is `clang++'.
if test "X-" = "X-$CXX"; then
case $CC_BASENAME in
- clang)
- CXX=clang++
- CXX_BASENAME=clang++
- ;;
gcc)
CXX=g++
CXX_BASENAME=g++
@@ -98,18 +111,21 @@ if test "X-" = "X-$CXX"; then
CXX=icpc
CXX_BASENAME=icpc
;;
+ mpicc*)
+ FC=mpif90
+ FC_BASENAME=mpif90
+ ;;
+ clang)
+ CXX=clang++
+ CXX_BASENAME=clang++
+ ;;
esac
fi
-case $CXX_BASENAME in
- clang++)
- PROD_CXXFLAGS="-O3"
- DEBUG_CXXFLAGS="-g -O0"
- # Use this for profiling with gprof
- # Just "-g" for now. More later.
- PROFILE_CXXFLAGS="-g"
- ;;
-esac
+# Figure out C++ compiler flags
+. $srcdir/config/intel-cxxflags # Do this ahead of GNU to avoid icpc being detected as g++
+. $srcdir/config/gnu-cxxflags
+. $srcdir/config/clang-cxxflags
# compiler version strings
case $CC in
@@ -132,16 +148,15 @@ case $CC in
echo "No match to get cc_version_info for $CC"
;;
esac
+
# Figure out Fortran compiler flags and version strings
case $FC in
*gfortran*)
- . $srcdir/config/gnu-fflags
fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS --version 2>&1 |\
grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'`
;;
*ifc*|*ifort*)
- . $srcdir/config/intel-fflags
fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Version' |\
sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
;;
@@ -155,13 +170,11 @@ esac
# get c++ version info
case $CXX in
clang++)
- . $srcdir/config/clang-cxxflags
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\
grep 'Apple' | sed 's/(.*//'`
;;
*g++*)
- . $srcdir/config/gnu-cxxflags
cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\
grep 'GCC' | sed 's/.*\((GCC) [-a-z0-9\. ]*.*\)/\1/'`
;;
diff --git a/config/clang-cxxflags b/config/clang-cxxflags
index 5685ca1..c279d67 100644
--- a/config/clang-cxxflags
+++ b/config/clang-cxxflags
@@ -112,7 +112,7 @@ if test "X-clang" = "X-$cxx_vendor" -o "X-Apple LLVM" = "X-$cxx_vendor"; then
;;
esac
- H5_CXXFLAGS="$H5_CXXFLAGS $arch"
+ H5_CXXFLAGS="$H5_CXXFLAGS $arch -std=c++98"
##############
# Production #
diff --git a/config/clang-warnings/error-general b/config/clang-warnings/error-general
index 883dff7..384fcc6 100644
--- a/config/clang-warnings/error-general
+++ b/config/clang-warnings/error-general
@@ -26,9 +26,6 @@
#
-Wunused-variable
#
-# H5VLpassthru.c
-# -Werror=unused-parameter
-#
-Wunused-parameter
#
#
diff --git a/config/cmake-presets/hidden-presets.json b/config/cmake-presets/hidden-presets.json
index 18ffdd1..02d200a 100644
--- a/config/cmake-presets/hidden-presets.json
+++ b/config/cmake-presets/hidden-presets.json
@@ -7,8 +7,8 @@
"description": "Basic build using Ninja generator",
"generator": "Ninja",
"hidden": true,
- "binaryDir": "${sourceParentDir}/build/${presetName}",
- "installDir": "${sourceParentDir}/install/${presetName}"
+ "binaryDir": "${sourceParentDir}/build112/${presetName}",
+ "installDir": "${sourceParentDir}/install112/${presetName}"
},
{
"name": "ci-x64",
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
index 94a6481..30ff60f 100644
--- a/config/cmake/CTestCustom.cmake
+++ b/config/cmake/CTestCustom.cmake
@@ -23,6 +23,7 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION
"stamp.verify"
"CMake Warning*stamp"
"src.ZLIB.*:[ \t]*warning"
+ "src.HDF5_ZLIB.*:[ \t]*warning"
"warning LNK4197:.*ZLIB-prefix"
"src.SZIP.*:[ \t]*warning"
# "POSIX name for this item is deprecated"
@@ -36,6 +37,7 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION
".*note.*expected.*void.*but argument is of type.*volatile.*"
".*src.SZIP.*:[ \t]*warning.*"
".*src.ZLIB.*:[ \t]*warning.*"
+ ".*src.HDF5_ZLIB.*:[ \t]*warning.*"
".*src.JPEG.*:[ \t]*warning.*"
".*POSIX name for this item is deprecated.*"
".*disabling jobserver mode.*"
@@ -64,19 +66,32 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
H5TEST-vds_env-clear-objects
PERFORM_h5perform-clear-objects
HL_test-clear-objects
+ HL_test-clean-objects
HL_FORTRAN_test-clear-objects
+ HL_FORTRAN_test-clean-objects
FORTRAN_testhdf5-clear-objects
+ FORTRAN_testhdf5-clean-objects
FORTRAN_flush1-clear-objects
+ FORTRAN_flush1-clean-objects
CPP_testhdf5-clear-objects
+ CPP_testhdf5-clean-objects
######### examples #########
EXAMPLES-clear-objects
+ EXAMPLES-clean-objects
CPP_ex-clear-objects
+ CPP_ex-clean-objects
CPP_ex_tutr-clear-objects
+ CPP_ex_tutr-clean-objects
HL_ex-clear-objects
+ HL_ex-clean-objects
f90_ex-clear-objects
+ f90_ex-clean-objects
HL_CPP_ptableTest-clear-objects
+ HL_CPP_ptableTest-clean-objects
HL_CPP_ex_ptExampleFL-clear-objects
+ HL_CPP_ex_ptExampleFL-clean-objects
HL_FORTRAN_f90_ex-clear-objects
+ HL_FORTRAN_f90_ex-clean-objects
######### tools/h5clear #########
H5CLEAR-clearall-objects
H5CLEAR-h5clear_gentest # does not close ids by design
@@ -196,5 +211,7 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE
PERFORM_h5perform-clearall-objects
######### hl/tools #########
HL_TOOLS-clear-objects
+ HL_TOOLS-clean-objects
H5WATCH-clearall-objects
+ H5WATCH-cleanall-objects
)
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 8900d4c..ee57eb0 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -159,7 +159,7 @@ CHECK_INCLUDE_FILE_CONCAT (stdbool.h ${HDF_PREFIX}_HAVE_STDBOOL_H)
## Check for non-standard extension quadmath.h
CHECK_INCLUDE_FILES(quadmath.h C_HAVE_QUADMATH)
-if (${C_HAVE_QUADMATH})
+if (C_HAVE_QUADMATH)
set(${HDF_PREFIX}_HAVE_QUADMATH_H 1)
else ()
set(${HDF_PREFIX}_HAVE_QUADMATH_H 0)
@@ -898,7 +898,7 @@ endif()
if (HDF5_BUILD_FORTRAN)
HDF_CHECK_TYPE_SIZE(__float128 _SIZEOF___FLOAT128)
- if (${_SIZEOF___FLOAT128})
+ if (_SIZEOF___FLOAT128)
set (${HDF_PREFIX}_HAVE_FLOAT128 1)
set (${HDF_PREFIX}_SIZEOF___FLOAT128 ${_SIZEOF___FLOAT128})
else ()
@@ -907,7 +907,7 @@ if (HDF5_BUILD_FORTRAN)
endif ()
HDF_CHECK_TYPE_SIZE(_Quad _SIZEOF__QUAD)
- if (NOT ${_SIZEOF__QUAD})
+ if (NOT _SIZEOF__QUAD)
set (${HDF_PREFIX}_SIZEOF__QUAD 0)
else ()
set (${HDF_PREFIX}_SIZEOF__QUAD ${_SIZEOF__QUAD})
@@ -927,12 +927,17 @@ if (HDF5_BUILD_FORTRAN)
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
${SOURCE_CODE}
)
+ if (CMAKE_VERSION VERSION_LESS 3.25)
+ set (_RUN_OUTPUT_VARIABLE "RUN_OUTPUT_VARIABLE")
+ else ()
+ set (_RUN_OUTPUT_VARIABLE "RUN_OUTPUT_STDOUT_VARIABLE")
+ endif()
TRY_RUN (RUN_RESULT_VAR COMPILE_RESULT_VAR
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler1.c
COMPILE_DEFINITIONS "-D_SIZEOF___FLOAT128=${H5_SIZEOF___FLOAT128};-D_HAVE_QUADMATH_H=${H5_HAVE_QUADMATH_H}"
COMPILE_OUTPUT_VARIABLE COMPILEOUT
- RUN_OUTPUT_VARIABLE OUTPUT_VAR
+ ${_RUN_OUTPUT_VARIABLE} OUTPUT_VAR
)
set (${RETURN_OUTPUT_VAR} ${OUTPUT_VAR})
@@ -969,7 +974,6 @@ if (HDF5_BUILD_FORTRAN)
message (FATAL_ERROR "Compilation of C ${FUNCTION_NAME} - Failed")
endif ()
endmacro ()
-
set (PROG_SRC
"
#include <float.h>\n\
@@ -991,7 +995,7 @@ if (HDF5_BUILD_FORTRAN)
#define C_LDBL_DIG DECIMAL_DIG\n\
#else\n\
#define C_LDBL_DIG LDBL_DIG\n\
-#endif\n\nint main() {\nprintf(\"\\%d\\\;\\%d\\\;\", C_LDBL_DIG, C_FLT128_DIG)\\\;\n\nreturn 0\\\;\n}\n
+#endif\n\nint main(void) {\nprintf(\"\\%d\\\;\\%d\\\;\", C_LDBL_DIG, C_FLT128_DIG)\\\;\n\nreturn 0\\\;\n}\n
"
)
@@ -1003,21 +1007,23 @@ if (HDF5_BUILD_FORTRAN)
list (GET PROG_OUTPUT4 0 H5_LDBL_DIG)
list (GET PROG_OUTPUT4 1 H5_FLT128_DIG)
- endif ()
- if (${HDF_PREFIX}_SIZEOF___FLOAT128 EQUAL "0" OR FLT128_DIG EQUAL "0")
- set (${HDF_PREFIX}_HAVE_FLOAT128 0)
- set (${HDF_PREFIX}_SIZEOF___FLOAT128 0)
- set (_PAC_C_MAX_REAL_PRECISION ${H5_LDBL_DIG})
+ if (${HDF_PREFIX}_SIZEOF___FLOAT128 EQUAL "0" OR FLT128_DIG EQUAL "0")
+ set (${HDF_PREFIX}_HAVE_FLOAT128 0)
+ set (${HDF_PREFIX}_SIZEOF___FLOAT128 0)
+ set (_PAC_C_MAX_REAL_PRECISION ${H5_LDBL_DIG})
+ else ()
+ set (_PAC_C_MAX_REAL_PRECISION ${H5_FLT128_DIG})
+ endif ()
+ if (NOT ${_PAC_C_MAX_REAL_PRECISION})
+ set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION 0)
+ else ()
+ set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${_PAC_C_MAX_REAL_PRECISION})
+ endif ()
+ message (STATUS "maximum decimal precision for C var - ${${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION}")
else ()
- set (_PAC_C_MAX_REAL_PRECISION ${H5_FLT128_DIG})
- endif ()
- if (NOT ${_PAC_C_MAX_REAL_PRECISION})
set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION 0)
- else ()
- set (${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION ${_PAC_C_MAX_REAL_PRECISION})
endif ()
- message (STATUS "maximum decimal precision for C var - ${${HDF_PREFIX}_PAC_C_MAX_REAL_PRECISION}")
endif()
@@ -1067,7 +1073,7 @@ endmacro ()
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine is using a special algorithm to convert
# 'long double' to '(unsigned) long' values. (This flag should only be set for
-# the IBM Power6 Linux. When the bit sequence of long double is
+# the IBM Power Linux. When the bit sequence of long double is
# 0x4351ccf385ebc8a0bfcc2a3c3d855620, the converted value of (unsigned)long
# is 0x004733ce17af227f, not the same as the library's conversion to 0x004733ce17af2282.
# The machine's conversion gets the correct value. We define the macro and disable
@@ -1077,7 +1083,7 @@ H5ConversionTests (${HDF_PREFIX}_LDOUBLE_TO_LONG_SPECIAL "Checking IF your syst
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine is using a special algorithm
# to convert some values of '(unsigned) long' to 'long double' values.
-# (This flag should be off for all machines, except for IBM Power6 Linux,
+# (This flag should be off for all machines, except for IBM Power Linux,
# when the bit sequences are 003fff..., 007fff..., 00ffff..., 01ffff...,
# ..., 7fffff..., the compiler uses a unknown algorithm. We define a
# macro and skip the test for now until we know about the algorithm.
diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c
index f80959f..725f049 100644
--- a/config/cmake/ConversionTests.c
+++ b/config/cmake/ConversionTests.c
@@ -11,13 +11,13 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#if defined(__has_attribute)
-#if __has_attribute(no_sanitize)
-#define HDF_NO_UBSAN __attribute__((no_sanitize("undefined")))
+# if __has_attribute(no_sanitize)
+# define HDF_NO_UBSAN __attribute__((no_sanitize("undefined")))
+# else
+# define HDF_NO_UBSAN
+# endif
#else
-#define HDF_NO_UBSAN
-#endif
-#else
-#define HDF_NO_UBSAN
+# define HDF_NO_UBSAN
#endif
#ifdef H5_LDOUBLE_TO_LONG_SPECIAL_TEST
@@ -34,45 +34,51 @@ int HDF_NO_UBSAN main(void)
unsigned char s2[8];
int ret = 1;
- if(sizeof(long double) == 16 && sizeof(long) == 8) {
- /*make sure the long double type has 16 bytes in size and
- * 11 bits of exponent. If it is,
- *the bit sequence should be like below. It's not
- *a decent way to check but this info isn't available. */
- memcpy(s, &ld, 16);
- if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 &&
- s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 &&
- s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) {
-
- /* Assign the hexadecimal value of long double type. */
- s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3;
- s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0;
- s[8]=0xbf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c;
- s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20;
-
- memcpy(&ld, s, 16);
-
- ll = (long)ld;
- memcpy(s2, &ll, 8);
-
- /* The library's algorithm converts it to 0x 00 47 33 ce 17 af 22 82
- * and gets wrong value 20041683600089730 on the IBM Power6 Linux.
- * But the IBM Power6 Linux converts it to 0x00 47 33 ce 17 af 22 7f
- * and gets the correct value 20041683600089727. It uses some special
- * algorithm. We're going to define the macro and skip the test until
- * we can figure out how they do it. */
- if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce &&
- s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f)
- ret = 0;
-
- ull = (unsigned long)ld;
- memcpy(s2, &ull, 8);
-
- /* The unsigned long is the same as signed long. */
- if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce &&
- s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f)
- ret = 0;
- }
+ if (sizeof(long double) == 16 && sizeof(long) == 8) {
+ /* Make sure the long double type has 16 bytes in size and
+ * 11 bits of exponent. If it is, the bit sequence should be
+ * like below. It's not a decent way to check but this info
+ * isn't available.
+ */
+ memcpy(s, &ld, 16);
+ if (s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 &&
+ s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 &&
+ s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) {
+
+ /* Assign the hexadecimal value of long double type. */
+ s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3;
+ s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0;
+ s[8]=0xbf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c;
+ s[12]=0x3d; s[13]=0x85; s[14]=0x56; s[15]=0x20;
+
+ memcpy(&ld, s, 16);
+
+ ll = (long)ld;
+ memcpy(s2, &ll, 8);
+
+ /* The library's algorithm converts it to 0x00 47 33 ce 17 af 22 82
+ * and gets wrong value 20041683600089730 on Linux on IBM Power
+ * architecture.
+ *
+ * But Linux on IBM Power converts it to 0x00 47 33 ce 17 af 22 7f
+ * and gets the correct value 20041683600089727. It uses some special
+ * algorithm. We're going to define the macro and skip the test until
+ * we can figure out how they do it.
+ */
+ if (s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce &&
+ s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f)
+
+ ret = 0;
+
+ ull = (unsigned long)ld;
+ memcpy(s2, &ull, 8);
+
+ /* The unsigned long is the same as signed long */
+ if(s2[0]==0x00 && s2[1]==0x47 && s2[2]==0x33 && s2[3]==0xce &&
+ s2[4]==0x17 && s2[5]==0xaf && s2[6]==0x22 && s2[7]==0x7f)
+
+ ret = 0;
+ }
}
done:
@@ -94,50 +100,61 @@ int HDF_NO_UBSAN main(void)
unsigned char s[16];
int flag=0, ret=1;
- /*Determine if long double has 16 byte in size, 11 bit exponent, and
- *the bias is 0x3ff */
- if(sizeof(long double) == 16) {
- ld = 1.0L;
- memcpy(s, &ld, 16);
- if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
- s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00)
- flag = 1;
- }
+ /* Determine if long double has 16 byte in size, 11 bit exponent, and
+ * the bias is 0x3ff
+ */
+ if (sizeof(long double) == 16) {
+ ld = 1.0L;
+ memcpy(s, &ld, 16);
+
+ if (s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
+ s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00)
- if(flag==1 && sizeof(long)==8) {
- ll = 0x003fffffffffffffL;
- ld = (long double)ll;
- memcpy(s, &ld, 16);
- /* The library converts the value to 0x434fffffffffffff8000000000000000.
- * In decimal it is 18014398509481982.000000, one value short of the original.
- * The IBM Power6 Linux converts it to 0x4350000000000000bff0000000000000.
- * The value is correct in decimal. It uses some special
- * algorithm. We're going to define the macro and skip the test until
- * we can figure out how they do it. */
- if(s[0]==0x43 && s[1]==0x50 && s[2]==0x00 && s[3]==0x00 &&
- s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 &&
- s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
- s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
- ret = 0;
+ flag = 1;
}
- if(flag==1 && sizeof(unsigned long)==8) {
- ull = 0xffffffffffffffffUL;
- ld = (long double)ull;
- memcpy(s, &ld, 16);
- /* Use a different value from signed long to test. The problem is the same
- * for both long and unsigned long. The value is 18446744073709551615.
- * The library converts the value to 0x43effffffffffffffe000000000000000.
- * In decimal it's 18446744073709548544.000000, very different from the original.
- * The IBM Power6 Linux converts it to 0x43f0000000000000bff0000000000000.
- * The value is correct in decimal. It uses some special
- * algorithm. We're going to define the macro and skip the test until
- * we can figure out how they do it. */
- if(s[0]==0x43 && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
- s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 &&
- s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
- s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
- ret = 0;
+
+ if (flag==1 && sizeof(long)==8) {
+ ll = 0x003fffffffffffffL;
+ ld = (long double)ll;
+ memcpy(s, &ld, 16);
+
+ /* The library converts the value to 0x434fffffffffffff8000000000000000.
+ * In decimal it is 18014398509481982.000000, one value short of the original.
+ *
+ * Linux on IBM Power architecture converts it to
+ * 0x4350000000000000bff0000000000000. The value is correct in decimal.
+ * It uses some special algorithm. We're going to define the macro and
+ * skip the test until we can figure out how they do it.
+ */
+ if (s[0]==0x43 && s[1]==0x50 && s[2]==0x00 && s[3]==0x00 &&
+ s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 &&
+ s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
+ s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
+
+ ret = 0;
}
+
+ if (flag==1 && sizeof(unsigned long)==8) {
+ ull = 0xffffffffffffffffUL;
+ ld = (long double)ull;
+ memcpy(s, &ld, 16);
+
+ /* Use a different value from signed long to test. The problem is the
+ * same for both long and unsigned long. The value is 18446744073709551615.
+ * The library converts the value to 0x43effffffffffffffe000000000000000.
+ * In decimal it's 18446744073709548544.000000, very different from the
+ * original. Linux on IBM Power architecture converts it to
+ * 0x43f0000000000000bff0000000000000. The value is correct in decimal.
+ * It uses some special algorithm. We're going to define the macro and
+ * skip the test until we can figure out how they do it.
+ */
+ if (s[0]==0x43 && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
+ s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00 &&
+ s[8]==0xbf && s[9]==0xf0 && s[10]==0x00 && s[11]==0x00 &&
+ s[12]==0x00 && s[13]==0x00 && s[14]==0x00 && s[15]==0x00)
+
+ ret = 0;
+ }
done:
exit(ret);
}
@@ -157,18 +174,21 @@ int HDF_NO_UBSAN main(void)
unsigned char s[16];
int ret = 0;
- if(sizeof(long double) == 16) {
- /*make sure the long double type is the same as the failing type
- *which has 16 bytes in size and 11 bits of exponent. If it is,
- *the bit sequence should be like below. It's not
- *a decent way to check but this info isn't available. */
+ if (sizeof(long double) == 16) {
+ /* Make sure the long double type is the same as the failing type
+ * which has 16 bytes in size and 11 bits of exponent. If it is,
+ * the bit sequence should be like below. It's not
+ * a decent way to check but this info isn't available.
+ */
memcpy(s, &ld, 16);
- if(s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 &&
+
+ if (s[0]==0x43 && s[1]==0x51 && s[2]==0xcc && s[3]==0xf3 &&
s[4]==0x85 && s[5]==0xeb && s[6]==0xc8 && s[7]==0xa0 &&
s[8]==0xbf && s[9]==0xcc && s[10]==0x2a && s[11]==0x3c) {
- /*slightly adjust the bit sequence (s[8]=0xdf). The converted
- *values will go wild on Mac OS 10.4 and IRIX64 6.5.*/
+ /* Slightly adjust the bit sequence (s[8]=0xdf). The converted
+ * values will go wild on Mac OS 10.4 and IRIX64 6.5.
+ */
s[0]=0x43; s[1]=0x51; s[2]=0xcc; s[3]=0xf3;
s[4]=0x85; s[5]=0xeb; s[6]=0xc8; s[7]=0xa0;
s[8]=0xdf; s[9]=0xcc; s[10]=0x2a; s[11]=0x3c;
@@ -178,7 +198,7 @@ int HDF_NO_UBSAN main(void)
ll = (long long)ld;
ull = (unsigned long long)ld;
- if(ll != 20041683600089728 || ull != 20041683600089728)
+ if (ll != 20041683600089728 || ull != 20041683600089728)
ret = 1;
}
}
@@ -200,93 +220,47 @@ int HDF_NO_UBSAN main(void)
unsigned char s[16];
int flag=0, ret=0;
- /*Determine if long double has 16 byte in size, 11 bit exponent, and
- *the bias is 0x3ff */
- if(sizeof(long double) == 16) {
+ /* Determine if long double has 16 byte in size, 11 bit exponent, and
+ * the bias is 0x3ff
+ */
+ if (sizeof(long double) == 16) {
ld = 1.0L;
memcpy(s, &ld, 16);
- if(s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
+ if (s[0]==0x3f && s[1]==0xf0 && s[2]==0x00 && s[3]==0x00 &&
s[4]==0x00 && s[5]==0x00 && s[6]==0x00 && s[7]==0x00)
+
flag = 1;
}
- if(flag==1 && sizeof(long long)==8) {
+ if (flag==1 && sizeof(long long)==8) {
ll = 0x01ffffffffffffffLL;
ld = (long double)ll;
memcpy(s, &ld, 16);
- /*Check if the bit sequence is as supposed to be*/
- if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff ||
+
+ /* Check if the bit sequence is as expected*/
+ if (s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff ||
s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff ||
s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00)
+
ret = 1;
}
- if(flag==1 && sizeof(unsigned long long)==8) {
+ if (flag==1 && sizeof(unsigned long long)==8) {
ull = 0x01ffffffffffffffULL;
ld = (long double)ull;
memcpy(s, &ld, 16);
- if(s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff ||
+
+ if (s[0]!=0x43 || s[1]!=0x7f || s[2]!=0xff || s[3]!=0xff ||
s[4]!=0xff || s[5]!=0xff || s[6]!=0xff || s[7]!=0xff ||
s[8]!=0xf0 || s[9]!=0x00 || s[10]!=0x00 || s[11]!=0x00)
+
ret = 1;
}
+
done:
exit(ret);
}
#endif
-#ifdef H5_NO_ALIGNMENT_RESTRICTIONS_TEST
-
-#include <stdlib.h>
-#include <string.h>
-
-typedef struct {
- size_t len;
- void *p;
-} hvl_t;
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
-extern "C"
-# endif
-int FC_DUMMY_MAIN()
-{ return 1;}
-#endif
-#endif
-int HDF_NO_UBSAN
-main ()
-{
-
- char *chp = "beefs";
- char **chpp = malloc (2 * sizeof (char *));
- char **chpp2;
- hvl_t vl = { 12345, (void *) chp };
- hvl_t *vlp;
- hvl_t *vlp2;
-
- memcpy ((void *) ((char *) chpp + 1), &chp, sizeof (char *));
- chpp2 = (char **) ((char *) chpp + 1);
- if (strcmp (*chpp2, chp)) {
- free (chpp);
- return 1;
- }
- free (chpp);
-
- vlp = malloc (2 * sizeof (hvl_t));
- memcpy ((void *) ((char *) vlp + 1), &vl, sizeof (hvl_t));
- vlp2 = (hvl_t *) ((char *) vlp + 1);
- if (vlp2->len != vl.len || vlp2->p != vl.p) {
- free (vlp);
- return 1;
- }
- free (vlp);
-
- ;
- return 0;
-}
-
-#endif
-
#ifdef H5_DISABLE_SOME_LDOUBLE_CONV_TEST
#include <stdio.h>
@@ -304,7 +278,7 @@ int HDF_NO_UBSAN main(void)
pclose(fp);
- if(strncmp(cpu, "ppc64le", 7) == 0)
+ if (strncmp(cpu, "ppc64le", 7) == 0)
return 0;
return 1;
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 761717d..838726c 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -14,13 +14,13 @@
#ifndef H5_CONFIG_H_
#define H5_CONFIG_H_
-/* Define if the Windows virtual file driver should be compiled */
+/* Define if this is a Windows machine */
#cmakedefine H5_HAVE_WINDOWS @H5_HAVE_WINDOWS@
/* Define if using MinGW */
#cmakedefine H5_HAVE_MINGW @H5_HAVE_MINGW@
-/* Define if on the Windows platform and default WIN32 API */
+/* Define if on the Windows platform and using the Win32 API */
#cmakedefine H5_HAVE_WIN32_API @H5_HAVE_WIN32_API@
/* Define if using a Windows compiler (i.e. Visual Studio) */
diff --git a/config/cmake/HDF5DeveloperBuild.cmake b/config/cmake/HDF5DeveloperBuild.cmake
new file mode 100644
index 0000000..40efb0e
--- /dev/null
+++ b/config/cmake/HDF5DeveloperBuild.cmake
@@ -0,0 +1,196 @@
+#
+# Copyright by The HDF Group.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://www.hdfgroup.org/licenses.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
+#
+
+# CMake settings for HDF5 Developer mode builds
+
+# Set CMake C++ flags based off of Debug build flags
+set (CMAKE_CXX_FLAGS_DEVELOPER ${CMAKE_CXX_FLAGS_DEBUG} CACHE STRING
+ "Flags used by the C++ compiler during developer builds." FORCE
+)
+
+# Set CMake C flags based off of Debug build flags. Add in -Og
+# option to disable some GCC optimizations that might affect
+# debugging negatively and also include some GCC compiler passes
+# that collect debugging information
+set (CMAKE_C_FLAGS_DEVELOPER "${CMAKE_C_FLAGS_DEBUG} -Og" CACHE STRING
+ "Flags used by the C compiler during developer builds." FORCE
+)
+
+# Set CMake binary linker flags based off of Debug binary linker flags
+set (CMAKE_EXE_LINKER_FLAGS_DEVELOPER ${CMAKE_EXE_LINKER_FLAGS_DEBUG}
+ CACHE STRING "Flags used for linking binaries during developer builds."
+ FORCE
+)
+
+# Set CMake shared library linker flags based off of Debug shared library
+# linker flags
+set (CMAKE_SHARED_LINKER_FLAGS_DEVELOPER ${CMAKE_SHARED_LINKER_FLAGS_DEBUG}
+ CACHE STRING "Flags used by the shared libraries linker during developer builds."
+ FORCE
+)
+
+mark_as_advanced (
+ CMAKE_CXX_FLAGS_DEVELOPER
+ CMAKE_C_FLAGS_DEVELOPER
+ CMAKE_EXE_LINKER_FLAGS_DEVELOPER
+ CMAKE_SHARED_LINKER_FLAGS_DEVELOPER
+)
+
+#-----------------------------------------------------------------------------
+# Define various HDF5 macros for debugging the library
+#-----------------------------------------------------------------------------
+
+# Enable debugging of various HDF5 modules
+set (HDF5_ENABLE_DEBUG_APIS ON CACHE BOOL "Turn on extra debug output in all packages" FORCE)
+
+# HDF5 module debug definitions for debug code which either isn't
+# currently integrated with HDF5_ENABLE_DEBUG_APIS, or which isn't
+# well integrated with HDF5's H5DEBUG(X) (where 'X' is a package
+# letter) system. This type of debug code usually always prints output
+# to stdout, regardless of whether debugging for its particular module
+# has been requested via the HDF5_DEBUG environment variable. Therefore,
+# we don't automatically enable this debug code, but allow developers
+# to quickly add those definitions into their build here, without
+# needing to hack up source files.
+option (HDF5_ENABLE_DEBUG_H5AC_DIRTY_BYTES "Enable printing of H5AC module dirty bytes information" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5AC_DIRTY_BYTES)
+if (HDF5_ENABLE_DEBUG_H5AC_DIRTY_BYTES)
+ list (APPEND HDF5_DEBUG_APIS H5AC_DEBUG_DIRTY_BYTES_CREATION)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5FA "Enable debugging of H5FA module" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5FA)
+if (HDF5_ENABLE_DEBUG_H5FA)
+ list (APPEND HDF5_DEBUG_APIS H5FA_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5FD_ALLOC "Enable debugging of H5FD module allocation code" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5FD_ALLOC)
+if (HDF5_ENABLE_DEBUG_H5FD_ALLOC)
+ list (APPEND HDF5_DEBUG_APIS H5FD_ALLOC_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5FL "Enable debugging of H5FL module" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5FL)
+if (HDF5_ENABLE_DEBUG_H5FL)
+ list (APPEND HDF5_DEBUG_APIS H5FL_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5FS "Enable debugging of H5FS module" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5FS)
+if (HDF5_ENABLE_DEBUG_H5FS)
+ list (APPEND HDF5_DEBUG_APIS H5FS_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5FS_SINFO "Enable debugging of H5FS module section info" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5FS_SINFO)
+if (HDF5_ENABLE_DEBUG_H5FS_SINFO)
+ list (APPEND HDF5_DEBUG_APIS H5FS_SINFO_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5MF_AGGR "Enable debugging of H5MF module aggregation code" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5MF_AGGR)
+if (HDF5_ENABLE_DEBUG_H5MF_AGGR)
+ list (APPEND HDF5_DEBUG_APIS H5MF_AGGR_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5MF_ALLOC "Enable debugging of H5MF module allocation code" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5MF_ALLOC)
+if (HDF5_ENABLE_DEBUG_H5MF_ALLOC)
+ list (APPEND HDF5_DEBUG_APIS H5MF_ALLOC_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5MF_ALLOC_MORE "Enable extra debugging of H5MF module allocation code" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5MF_ALLOC_MORE)
+if (HDF5_ENABLE_DEBUG_H5MF_ALLOC_MORE)
+ list (APPEND HDF5_DEBUG_APIS H5MF_ALLOC_DEBUG_MORE)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5MF_ALLOC_DUMP "Enable printing of debugging info for H5MF module allocation code" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5MF_ALLOC_DUMP)
+if (HDF5_ENABLE_DEBUG_H5MF_ALLOC_DUMP)
+ list (APPEND HDF5_DEBUG_APIS H5MF_ALLOC_DEBUG_DUMP)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5R "Enable debugging of H5R module" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5R)
+if (HDF5_ENABLE_DEBUG_H5R)
+ list (APPEND HDF5_DEBUG_APIS H5R_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5S_HYPER "Enable debugging of H5S hyperslab code" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5S_HYPER)
+if (HDF5_ENABLE_DEBUG_H5S_HYPER)
+ list (APPEND HDF5_DEBUG_APIS H5S_HYPER_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5T_REF "Enable debugging of H5T module reference code" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5T_REF)
+if (HDF5_ENABLE_DEBUG_H5T_REF)
+ list (APPEND HDF5_DEBUG_APIS H5T_REF_DEBUG)
+endif ()
+
+# HDF5 module debug definitions for debug code which may add
+# considerable amounts of overhead when enabled and is usually
+# only useful for specific circumstances rather than general
+# developer use.
+option (HDF5_ENABLE_DEBUG_H5B "Enable debugging of H5B module" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5B)
+if (HDF5_ENABLE_DEBUG_H5B)
+ list (APPEND HDF5_DEBUG_APIS H5B_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5B2 "Enable debugging of H5B2 module" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5B2)
+if (HDF5_ENABLE_DEBUG_H5B2)
+ list (APPEND HDF5_DEBUG_APIS H5B2_DEBUG)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5C_SANITY_CHECKS "Enable full sanity checking in H5C module" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5C_SANITY_CHECKS)
+if (HDF5_ENABLE_DEBUG_H5C_SANITY_CHECKS)
+ list (APPEND HDF5_DEBUG_APIS H5C_DO_SANITY_CHECKS)
+ list (APPEND HDF5_DEBUG_APIS H5C_DO_SLIST_SANITY_CHECKS)
+ list (APPEND HDF5_DEBUG_APIS H5C_DO_TAGGING_SANITY_CHECKS)
+ list (APPEND HDF5_DEBUG_APIS H5C_DO_EXTREME_SANITY_CHECKS)
+
+ # See note in H5Cprivate.h about this #define
+ # list (APPEND HDF5_DEBUG_APIS H5C_DO_MEMORY_SANITY_CHECKS=1)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5FL_TRACK "Enable tracking of free list allocations" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5FL_TRACK)
+if (HDF5_ENABLE_DEBUG_H5FL_TRACK)
+ list (APPEND HDF5_DEBUG_APIS H5FL_TRACK)
+
+ # Free list tracking requires the codestack functionality
+ set (HDF5_ENABLE_CODESTACK ON CACHE BOOL "Enable the function stack tracing (for developer debugging)." FORCE)
+else ()
+ unset (HDF5_ENABLE_CODESTACK CACHE)
+endif ()
+
+option (HDF5_ENABLE_DEBUG_H5FS_ASSERT "Enable extra debugging of H5FS module" OFF)
+mark_as_advanced (HDF5_ENABLE_DEBUG_H5FS_ASSERT)
+if (HDF5_ENABLE_DEBUG_H5FS_ASSERT)
+ list (APPEND HDF5_DEBUG_APIS H5FS_DEBUG_ASSERT)
+endif ()
+
+# If HDF5 free list debugging wasn't specifically enabled, disable
+# free lists entirely for developer build modes, as they can
+# make certain types of issues (like references to stale pointers)
+# much more difficult to debug
+if (NOT HDF5_ENABLE_DEBUG_H5FL AND NOT HDF5_ENABLE_DEBUG_H5FL_TRACK)
+ list (APPEND HDF5_DEVELOPER_DEFS H5_NO_FREE_LISTS)
+endif ()
+
+# Enable strict checking of the file format
+list (APPEND HDF5_DEVELOPER_DEFS H5_STRICT_FORMAT_CHECKS)
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index 5cf5088..fd09c51 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -17,6 +17,12 @@
enable_language (Fortran)
set (HDF_PREFIX "H5")
+
+# Force lowercase Fortran module file names
+if (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray")
+ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ef")
+endif ()
+
include (CheckFortranFunctionExists)
if (NOT CMAKE_VERSION VERSION_LESS "3.14.0")
diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake
index e656146..bd730a9 100644
--- a/config/cmake/HDFCXXCompilerFlags.cmake
+++ b/config/cmake/HDFCXXCompilerFlags.cmake
@@ -53,7 +53,7 @@ endif ()
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS}")
- if (${HDF_CFG_NAME} MATCHES "Debug")
+ if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer")
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og -ftrapv -fno-common")
endif ()
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index 1560bbd..3320ca8 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -51,7 +51,7 @@ endif()
if (CMAKE_COMPILER_IS_GNUCC)
set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
- if (${HDF_CFG_NAME} MATCHES "Debug")
+ if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer")
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Og -ftrapv -fno-common")
endif ()
@@ -176,6 +176,10 @@ endif ()
# Developer warnings (suggestions from gcc, not code problems)
#-----------------------------------------------------------------------------
option (HDF5_ENABLE_DEV_WARNINGS "Enable HDF5 developer group warnings" OFF)
+if (${HDF_CFG_NAME} MATCHES "Developer")
+ # Developer build modes should always have these types of warnings enabled
+ set (HDF5_ENABLE_DEV_WARNINGS ON CACHE BOOL "Enable HDF5 developer group warnings" FORCE)
+endif ()
if (HDF5_ENABLE_DEV_WARNINGS)
message (STATUS "....HDF5 developer group warnings are enabled")
if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
@@ -189,6 +193,19 @@ if (HDF5_ENABLE_DEV_WARNINGS)
elseif (CMAKE_C_COMPILER_ID MATCHES "IntelLLVM" OR CMAKE_C_COMPILER_ID MATCHES "[Cc]lang")
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/developer-general")
endif ()
+
+ # Turn on -Winline warnings now only for non-Debug and
+ # non-Developer builds. For at least GNU compilers this
+ # flag appears to conflict specifically with the -Og
+ # optimization flag and will produce warnings about functions
+ # not being considered for inlining
+ if (NOT ${HDF_CFG_NAME} MATCHES "Debug" AND NOT ${HDF_CFG_NAME} MATCHES "Developer")
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
+ list (APPEND H5_CFLAGS "-Winline")
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "Intel" AND NOT _INTEL_WINDOWS)
+ list (APPEND H5_CFLAGS "-Winline")
+ endif ()
+ endif ()
else ()
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-general")
@@ -270,6 +287,38 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
# ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-10")
endif ()
endif ()
+
+ # Append more extra warning flags that only gcc 12.x+ knows about
+ # or which should only be enabled for gcc 12.x+
+ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0)
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-12")
+ #else ()
+ # ADD_H5_FLAGS (H5_CFLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/no-developer-12")
+ endif ()
+ endif ()
+endif ()
+
+#-----------------------------------------------------------------------------
+# Option to allow the user to enable debug output
+# from various HDF5 modules
+#-----------------------------------------------------------------------------
+option (HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF)
+if (HDF5_ENABLE_DEBUG_APIS)
+ # Add standard debug definitions to any existing ones
+ list (APPEND HDF5_DEBUG_APIS
+ H5AC_DEBUG
+ H5CX_DEBUG
+ H5D_DEBUG
+ H5D_CHUNK_DEBUG
+ H5F_DEBUG
+ H5HL_DEBUG
+ H5I_DEBUG
+ H5O_DEBUG
+ H5S_DEBUG
+ H5T_DEBUG
+ H5Z_DEBUG
+ )
endif ()
#-----------------------------------------------------------------------------
diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake
index 84b3ebe..65a1cdc 100644
--- a/config/cmake/HDFFortranCompilerFlags.cmake
+++ b/config/cmake/HDFFortranCompilerFlags.cmake
@@ -54,17 +54,18 @@ if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERS
endif ()
endif ()
-#-----------------------------------------------------------------------------
-# CDash is configured to only allow 3000 warnings, so
-# break into groups (from the config/gnu-flags file)
-#-----------------------------------------------------------------------------
if (NOT MSVC AND NOT MINGW)
# General flags
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/intel-warnings/ifort-general")
- list (APPEND HDF5_CMAKE_Fortran_FLAGS "-stand f03" "-free")
+ list (APPEND HDF5_CMAKE_Fortran_FLAGS "-free")
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-general")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-developer-general")
+ else ()
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-no-developer-general")
+ endif ()
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-ffree-form" "-fimplicit-none")
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 8.0 AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.6)
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-std=f2008ts")
@@ -82,6 +83,11 @@ if (NOT MSVC AND NOT MINGW)
# Append more extra warning flags that only gcc 4.8+ knows about
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 4.8)
ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-4.8")
+ if (HDF5_ENABLE_DEV_WARNINGS)
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-developer-4.8")
+ else ()
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-no-developer-4.8")
+ endif ()
endif ()
# Append more extra warning flags that only gcc 4.9+ knows about
@@ -92,7 +98,7 @@ if (NOT MSVC AND NOT MINGW)
# Append more extra warning flags that only gcc 5.x+ knows about
if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 5.0)
if (HDF5_ENABLE_DEV_WARNINGS)
- ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-gfort-5")
+ ADD_H5_FLAGS (HDF5_CMAKE_Fortran_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/gfort-developer-5")
endif ()
endif ()
diff --git a/config/cmake/HDFMacros.cmake b/config/cmake/HDFMacros.cmake
index 6037570..42b6a22 100644
--- a/config/cmake/HDFMacros.cmake
+++ b/config/cmake/HDFMacros.cmake
@@ -77,7 +77,7 @@ macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent)
if (${target_type} MATCHES "SHARED")
set (targetfilename $<TARGET_PDB_FILE:${libtarget}>)
else ()
- get_property (target_name TARGET ${libtarget} PROPERTY "$<IF:$<CONFIG:Debug>,OUTPUT_NAME_DEBUG,OUTPUT_NAME_RELWITHDEBINFO>")
+ get_property (target_name TARGET ${libtarget} PROPERTY "$<IF:$<OR:$<CONFIG:Debug>,$<CONFIG:Developer>>,OUTPUT_NAME_DEBUG,OUTPUT_NAME_RELWITHDEBINFO>")
set (targetfilename $<TARGET_FILE_DIR:${libtarget}>/${target_name}.pdb)
endif ()
install (
@@ -121,6 +121,7 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
set_target_properties (${libtarget} PROPERTIES
OUTPUT_NAME ${LIB_RELEASE_NAME}
# OUTPUT_NAME_DEBUG ${LIB_DEBUG_NAME}
+ OUTPUT_NAME_DEVELOPER ${LIB_DEBUG_NAME}
OUTPUT_NAME_RELEASE ${LIB_RELEASE_NAME}
OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME}
OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME}
@@ -130,6 +131,7 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
if (WIN32)
set_target_properties (${libtarget} PROPERTIES
COMPILE_PDB_NAME_DEBUG ${LIB_DEBUG_NAME}
+ COMPILE_PDB_NAME_DEVELOPER ${LIB_DEBUG_NAME}
COMPILE_PDB_NAME_RELEASE ${LIB_RELEASE_NAME}
COMPILE_PDB_NAME_MINSIZEREL ${LIB_RELEASE_NAME}
COMPILE_PDB_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME}
@@ -155,7 +157,7 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion)
if (${importtype} MATCHES "IMPORT")
set (importprefix "${CMAKE_STATIC_LIBRARY_PREFIX}")
endif ()
- if (${HDF_CFG_NAME} MATCHES "Debug")
+ if (${HDF_CFG_NAME} MATCHES "Debug" OR ${HDF_CFG_NAME} MATCHES "Developer")
set (IMPORT_LIB_NAME ${LIB_DEBUG_NAME})
else ()
set (IMPORT_LIB_NAME ${LIB_RELEASE_NAME})
diff --git a/config/cmake/ZLIB/zlib-config.cmake.in b/config/cmake/ZLIB/zlib-config.cmake.in
index 307896b..9e6ef48 100644
--- a/config/cmake/ZLIB/zlib-config.cmake.in
+++ b/config/cmake/ZLIB/zlib-config.cmake.in
@@ -30,7 +30,7 @@ set (${ZLIB_PACKAGE_NAME}_VERSION_MINOR @ZLIB_VERSION_MINOR@)
#-----------------------------------------------------------------------------
# Don't include targets if this file is being picked up by another
-# project which has already build ZLIB as a subproject
+# project which has already built ZLIB as a subproject
#-----------------------------------------------------------------------------
if (NOT TARGET "@ZLIB_PACKAGE@")
include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE@@ZLIB_PACKAGE_EXT@-targets.cmake)
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index 3cae5ab..4713578 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -32,6 +32,10 @@ set_property (CACHE HDF5_INSTALL_MOD_FORTRAN PROPERTY STRINGS NO SHARED STATIC)
set (HDF5_BUILD_GENERATORS ON CACHE BOOL "Build Test Generators" FORCE)
+set (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
+
+set (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
+
set (MPIEXEC_MAX_NUMPROCS "4" CACHE STRING "Minimum number of processes for HDF parallel tests" FORCE)
set (HDF5_ENABLE_ALL_WARNINGS ON CACHE BOOL "Enable all warnings" FORCE)
@@ -69,6 +73,9 @@ set (LIBAEC_USE_LOCALCONTENT ON CACHE BOOL "Use local file for LIBAEC FetchConte
set (PLUGIN_TGZ_NAME "hdf5_plugins.tar.gz" CACHE STRING "Use PLUGINS from compressed file" FORCE)
set (PLUGIN_PACKAGE_NAME "pl" CACHE STRING "Name of PLUGIN package" FORCE)
+set (H5PL_VERS_MAJOR "1" CACHE STRING "Major version of hdf5 package for PLUGIN package" FORCE)
+set (H5PL_VERS_MINOR "12" CACHE STRING "Minor version of hdf5 package for PLUGIN package" FORCE)
+set (H5PL_VERS_RELEASE "3" CACHE STRING "Release version of hdf5 package for PLUGIN package" FORCE)
#############
# bitshuffle
diff --git a/config/cmake/CTestScript.cmake b/config/cmake/examples/CTestScript.cmake
index dcf2685..76bce56 100644
--- a/config/cmake/CTestScript.cmake
+++ b/config/cmake/examples/CTestScript.cmake
@@ -35,23 +35,30 @@ if (NOT SITE_OS_NAME)
message (STATUS "Dashboard script uname output: ${osname}-${osrel}-${cpu}\n")
set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
- if (SITE_BUILDNAME_SUFFIX)
- set (CTEST_BUILD_NAME "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}")
- endif ()
- set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS}")
else ()
## machine name provided
## --------------------------
if (CMAKE_HOST_UNIX)
- set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_OS_BITS}-${SITE_COMPILER_NAME}-${SITE_COMPILER_VERSION}")
+ set (CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_OS_BITS}-${SITE_COMPILER_NAME}-${SITE_COMPILER_VERSION}")
else ()
- set(CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}")
- endif ()
- if (SITE_BUILDNAME_SUFFIX)
- set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
+ set (CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}")
endif ()
- set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
endif ()
+if (SITE_BUILDNAME_SUFFIX)
+ set (CTEST_BUILD_NAME "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}")
+endif ()
+set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
+
+# Launchers work only with Makefile and Ninja generators.
+if(NOT "${CTEST_CMAKE_GENERATOR}" MATCHES "Make|Ninja" OR LOCAL_SKIP_TEST)
+ set(CTEST_USE_LAUNCHERS 0)
+ set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 0)
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=OFF")
+else()
+ set(CTEST_USE_LAUNCHERS 1)
+ set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 1)
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON")
+endif()
#-----------------------------------------------------------------------------
# MacOS machines need special options
diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/examples/HDF5_Examples.cmake.in
index 9f3db03..da2502c 100644
--- a/config/cmake/HDF5_Examples.cmake.in
+++ b/config/cmake/examples/HDF5_Examples.cmake.in
@@ -87,7 +87,7 @@ if(WIN32)
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(APPLE)
+elseif(APPLE)
set(ENV{DYLD_LIBRARY_PATH} "${INSTALLDIR}/lib")
set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
diff --git a/config/cmake/HDF5_Examples_options.cmake b/config/cmake/examples/HDF5_Examples_options.cmake
index cdd49eb..cdd49eb 100644
--- a/config/cmake/HDF5_Examples_options.cmake
+++ b/config/cmake/examples/HDF5_Examples_options.cmake
diff --git a/config/cmake/grepTest.cmake b/config/cmake/grepTest.cmake
index c4a6eb7..9dcedb5 100644
--- a/config/cmake/grepTest.cmake
+++ b/config/cmake/grepTest.cmake
@@ -192,6 +192,22 @@ if (TEST_FILTER)
endif ()
endif ()
+if (NOT DEFINED ENV{HDF5_NOCLEANUP})
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+ endif ()
+
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+ endif ()
+
+ if (TEST_DELETE_LIST)
+ foreach (dfile in ${TEST_DELETE_LIST})
+ file (REMOVE ${dfile})
+ endforeach ()
+ endif ()
+endif ()
+
# everything went fine...
message (STATUS "Passed: The output of ${TEST_PROGRAM} matched")
diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in
index 1a3fb7b..699db89 100644
--- a/config/cmake/hdf5-config.cmake.in
+++ b/config/cmake/hdf5-config.cmake.in
@@ -38,7 +38,7 @@ set (${HDF5_PACKAGE_NAME}_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@)
set (${HDF5_PACKAGE_NAME}_BUILD_JAVA @HDF5_BUILD_JAVA@)
set (${HDF5_PACKAGE_NAME}_BUILD_TOOLS @HDF5_BUILD_TOOLS@)
set (${HDF5_PACKAGE_NAME}_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@)
-set (${HDF5_PACKAGE_NAME}_BUILD_HL_TOOLS @HDF5_BUILD_HL_TOOLS@)
+set (${HDF5_PACKAGE_NAME}_BUILD_HL_GIF_TOOLS @HDF5_BUILD_HL_GIF_TOOLS@)
set (${HDF5_PACKAGE_NAME}_ENABLE_THREADSAFE @HDF5_ENABLE_THREADSAFE@)
set (${HDF5_PACKAGE_NAME}_ENABLE_PLUGIN_SUPPORT @HDF5_ENABLE_PLUGIN_SUPPORT@)
set (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT @HDF5_ENABLE_Z_LIB_SUPPORT@)
@@ -70,8 +70,8 @@ endif ()
if (${HDF5_PACKAGE_NAME}_BUILD_JAVA)
set (${HDF5_PACKAGE_NAME}_JAVA_INCLUDE_DIRS
@PACKAGE_CURRENT_BUILD_DIR@/lib/jarhdf5-@HDF5_VERSION_STRING@.jar
- @PACKAGE_CURRENT_BUILD_DIR@/lib/slf4j-api-1.7.33.jar
- @PACKAGE_CURRENT_BUILD_DIR@/lib/slf4j-nop-1.7.33.jar
+ @PACKAGE_CURRENT_BUILD_DIR@/lib/slf4j-api-2.0.6.jar
+ @PACKAGE_CURRENT_BUILD_DIR@/lib/slf4j-nop-2.0.6.jar
)
set (${HDF5_PACKAGE_NAME}_JAVA_LIBRARY "@PACKAGE_CURRENT_BUILD_DIR@/lib")
set (${HDF5_PACKAGE_NAME}_JAVA_LIBRARIES "${${HDF5_PACKAGE_NAME}_JAVA_LIBRARY}")
diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake
index f6fa3b3..294b05f 100644
--- a/config/cmake/jrunTest.cmake
+++ b/config/cmake/jrunTest.cmake
@@ -300,6 +300,22 @@ if (TEST_SKIP_COMPARE AND NOT TEST_NO_DISPLAY)
endif ()
endif ()
+if (NOT DEFINED ENV{HDF5_NOCLEANUP})
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+ endif ()
+
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+ endif ()
+
+ if (TEST_DELETE_LIST)
+ foreach (dfile in ${TEST_DELETE_LIST})
+ file (REMOVE ${dfile})
+ endforeach ()
+ endif ()
+endif ()
+
# everything went fine...
message (STATUS "${TEST_PROGRAM} Passed")
diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in
index 0e2c013..46aadb7 100644
--- a/config/cmake/libhdf5.settings.cmake.in
+++ b/config/cmake/libhdf5.settings.cmake.in
@@ -28,6 +28,7 @@ Linking Options:
AM_LDFLAGS: @AM_LDFLAGS@
Extra libraries: @LINK_LIBS@
Archiver: @CMAKE_AR@
+ AR_FLAGS:
Ranlib: @CMAKE_RANLIB@
Languages:
@@ -44,23 +45,24 @@ Languages:
Static C Library: @H5_ENABLE_STATIC_LIB@
Fortran: @HDF5_BUILD_FORTRAN@
-@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Compiler: @CMAKE_Fortran_COMPILER@ @CMAKE_Fortran_COMPILER_VERSION@
-@BUILD_FORTRAN_CONDITIONAL_TRUE@ Fortran Flags: @CMAKE_Fortran_FLAGS@
-@BUILD_FORTRAN_CONDITIONAL_TRUE@ H5 Fortran Flags: @HDF5_CMAKE_Fortran_FLAGS@
-@BUILD_FORTRAN_CONDITIONAL_TRUE@ AM Fortran Flags: @AM_FCFLAGS@
-@BUILD_FORTRAN_CONDITIONAL_TRUE@ Shared Fortran Library: @H5_ENABLE_SHARED_LIB@
-@BUILD_FORTRAN_CONDITIONAL_TRUE@ Static Fortran Library: @H5_ENABLE_STATIC_LIB@
+ Fortran Compiler: @CMAKE_Fortran_COMPILER@ @CMAKE_Fortran_COMPILER_VERSION@
+ Fortran Flags: @CMAKE_Fortran_FLAGS@
+ H5 Fortran Flags: @HDF5_CMAKE_Fortran_FLAGS@
+ AM Fortran Flags: @AM_FCFLAGS@
+ Shared Fortran Library: @H5_ENABLE_SHARED_LIB@
+ Static Fortran Library: @H5_ENABLE_STATIC_LIB@
+ Module Directory: @CMAKE_Fortran_MODULE_DIRECTORY@
C++: @HDF5_BUILD_CPP_LIB@
-@BUILD_CXX_CONDITIONAL_TRUE@ C++ Compiler: @CMAKE_CXX_COMPILER@ @CMAKE_CXX_COMPILER_VERSION@
-@BUILD_CXX_CONDITIONAL_TRUE@ C++ Flags: @CMAKE_CXX_FLAGS@
-@BUILD_CXX_CONDITIONAL_TRUE@ H5 C++ Flags: @HDF5_CMAKE_CXX_FLAGS@
-@BUILD_CXX_CONDITIONAL_TRUE@ AM C++ Flags: @AM_CXXFLAGS@
-@BUILD_CXX_CONDITIONAL_TRUE@ Shared C++ Library: @H5_ENABLE_SHARED_LIB@
-@BUILD_CXX_CONDITIONAL_TRUE@ Static C++ Library: @H5_ENABLE_STATIC_LIB@
+ C++ Compiler: @CMAKE_CXX_COMPILER@ @CMAKE_CXX_COMPILER_VERSION@
+ C++ Flags: @CMAKE_CXX_FLAGS@
+ H5 C++ Flags: @HDF5_CMAKE_CXX_FLAGS@
+ AM C++ Flags: @AM_CXXFLAGS@
+ Shared C++ Library: @H5_ENABLE_SHARED_LIB@
+ Static C++ Library: @H5_ENABLE_STATIC_LIB@
- JAVA: @HDF5_BUILD_JAVA@
-@BUILD_JAVA_CONDITIONAL_TRUE@ JAVA Compiler: @CMAKE_Java_COMPILER@ @Java_VERSION@
+ JAVA: @HDF5_BUILD_JAVA@
+ JAVA Compiler: @CMAKE_Java_COMPILER@ @Java_VERSION@
Features:
---------
@@ -71,7 +73,7 @@ Features:
Dimension scales w/ new references: @DIMENSION_SCALES_WITH_NEW_REF@
Build HDF5 Tests: @BUILD_TESTING@
Build HDF5 Tools: @HDF5_BUILD_TOOLS@
- Build High-level HDF5 Tools: @HDF5_BUILD_HL_TOOLS@
+ Build GIF Tools: @HDF5_BUILD_HL_GIF_TOOLS@
Threadsafety: @HDF5_ENABLE_THREADSAFE@
Default API mapping: @DEFAULT_API_VERSION@
With deprecated public symbols: @HDF5_ENABLE_DEPRECATED_SYMBOLS@
diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake
index dd0c9ec..ef1ac4a 100644
--- a/config/cmake/mccacheinit.cmake
+++ b/config/cmake/mccacheinit.cmake
@@ -11,9 +11,9 @@
#
# This is the CMakeCache file.
-########################
+#########################
# EXTERNAL cache entries
-########################
+#########################
set (CMAKE_INSTALL_FRAMEWORK_PREFIX "Library/Frameworks" CACHE STRING "Frameworks installation directory" FORCE)
@@ -25,14 +25,14 @@ set (HDF_PACKAGE_NAMESPACE "hdf5::" CACHE STRING "Name for HDF package namespace
set (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
-set (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
-
set (HDF5_BUILD_FORTRAN ON CACHE BOOL "Build FORTRAN support" FORCE)
set (HDF5_BUILD_HL_LIB ON CACHE BOOL "Build HIGH Level HDF5 Library" FORCE)
set (HDF5_BUILD_TOOLS ON CACHE BOOL "Build HDF5 Tools" FORCE)
+set (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" 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)
@@ -45,11 +45,18 @@ set (HDF5_ENABLE_USING_MEMCHECKER ON CACHE BOOL "Indicate that a memory checker
set (HDF5_NO_PACKAGES ON CACHE BOOL "CPACK - Disable packaging" FORCE)
-set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE)
+set (HDF_TEST_EXPRESS "2" CACHE STRING "Control testing framework (0-3)" FORCE)
+
+set (HDF5_MINGW_STATIC_GCC_LIBS ON CACHE BOOL "Statically link libgcc/libstdc++" FORCE)
+
+set (HDF5_ALLOW_EXTERNAL_SUPPORT "TGZ" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE)
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
+set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
set (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
+set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE)
+set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
set (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
set (SZAEC_TGZ_NAME "LIBAEC.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE)
set (USE_LIBAEC ON CACHE BOOL "Use libaec szip replacement" FORCE)
@@ -57,7 +64,3 @@ set (USE_LIBAEC ON CACHE BOOL "Use libaec szip replacement" FORCE)
set (CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
set (CTEST_CONFIGURATION_TYPE "Debug" CACHE STRING "Build Debug" FORCE)
-
-set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
-set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE)
-set (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake
index d1c454f..e26b8ea 100644
--- a/config/cmake/runTest.cmake
+++ b/config/cmake/runTest.cmake
@@ -378,6 +378,22 @@ if (TEST_SKIP_COMPARE AND NOT TEST_NO_DISPLAY)
)
endif ()
+if (NOT DEFINED ENV{HDF5_NOCLEANUP})
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}" AND NOT TEST_SAVE)
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+ endif ()
+
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+ endif ()
+
+ if (TEST_DELETE_LIST)
+ foreach (dfile in ${TEST_DELETE_LIST})
+ file (REMOVE ${dfile})
+ endforeach ()
+ endif ()
+endif ()
+
# everything went fine...
message (STATUS "${TEST_PROGRAM} Passed")
diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake
index 92bfd37..5267212 100644
--- a/config/cmake/scripts/HDF5options.cmake
+++ b/config/cmake/scripts/HDF5options.cmake
@@ -69,9 +69,9 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRIN
### disable using ext zlib
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF")
-### disable using ext szip
-#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")
+### enable using ext szip
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON")
+#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=ON")
#### package examples ####
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACK_EXAMPLES:BOOL=ON -DHDF5_EXAMPLES_COMPRESSED:STRING=HDF5Examples-2.0.3-Source.tar.gz -DHDF5_EXAMPLES_COMPRESSED_DIR:PATH=${CTEST_SCRIPT_DIRECTORY}")
diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake
index f5a4e3e..fadc67f 100644
--- a/config/cmake/vfdTest.cmake
+++ b/config/cmake/vfdTest.cmake
@@ -72,5 +72,21 @@ endif ()
message (STATUS "COMMAND Error: ${TEST_ERROR}")
+if (NOT DEFINED ENV{HDF5_NOCLEANUP})
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+ endif ()
+
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+ endif ()
+
+ if (TEST_DELETE_LIST)
+ foreach (dfile in ${TEST_DELETE_LIST})
+ file (REMOVE ${dfile})
+ endforeach ()
+ endif ()
+endif ()
+
# everything went fine...
message (STATUS "Passed: The ${TEST_PROGRAM} program used vfd ${TEST_VFD}")
diff --git a/config/cmake/volTest.cmake b/config/cmake/volTest.cmake
index 27ef8a2..a47c3e9 100644
--- a/config/cmake/volTest.cmake
+++ b/config/cmake/volTest.cmake
@@ -72,5 +72,21 @@ endif ()
message (STATUS "COMMAND Error: ${TEST_ERROR}")
+if (NOT DEFINED ENV{HDF5_NOCLEANUP})
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+ endif ()
+
+ if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err")
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+ endif ()
+
+ if (TEST_DELETE_LIST)
+ foreach (dfile in ${TEST_DELETE_LIST})
+ file (REMOVE ${dfile})
+ endforeach ()
+ endif ()
+endif ()
+
# everything went fine...
message (STATUS "Passed: The ${TEST_PROGRAM} program used vol ${TEST_VOL}")
diff --git a/config/conclude_fc.am b/config/conclude_fc.am
index 77403cb..d26016a 100644
--- a/config/conclude_fc.am
+++ b/config/conclude_fc.am
@@ -19,12 +19,14 @@
# AM_FCCPPFLAGS, FCCPPFLAGS are currently not used.
PPFCCOMPILE = $(FC) $(FCDEFS) $(DEFAULT_INCLUDES) $(FCINCLUDES) $(AM_FCCPPFLAGS) $(FCCPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
-LTPPFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(PPFCCOMPILE)
+LTPPFCCOMPILE = $(LIBTOOL) --silent --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(PPFCCOMPILE)
# Treat all .f90 and .F90 files as preprocessed Fortran.
.f90.o:
+ @if $(AM_V_P); then set -x; else echo " PPFC $@"; fi; \
$(PPFCCOMPILE) -c -o $@ $<
.F90.o:
+ @if $(AM_V_P); then set -x; else echo " PPFC $@"; fi; \
$(PPFCCOMPILE) -c -o $@ $<
include $(top_srcdir)/config/conclude.am
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags
index 5668c56..33a47c8 100644
--- a/config/gnu-cxxflags
+++ b/config/gnu-cxxflags
@@ -118,7 +118,7 @@ if test "X-g++" = "X-$cxx_vendor"; then
esac
# C++-specific
- H5_CXXFLAGS="$H5_CXXFLAGS $arch"
+ H5_CXXFLAGS="$H5_CXXFLAGS $arch -std=c++98"
##############
# Production #
diff --git a/config/gnu-fflags b/config/gnu-fflags
index 3096cee..b3385ec 100644
--- a/config/gnu-fflags
+++ b/config/gnu-fflags
@@ -149,6 +149,9 @@ if test "X-gfortran" = "X-$f9x_vendor"; then
H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-general)"
+ NO_DEVELOPER_WARNING_FCFLAGS="$NO_DEVELOPER_WARNING_FCFLAGS $(load_gnu_arguments gfort-no-developer-general)"
+ DEVELOPER_WARNING_FCFLAGS="$DEVELOPER_WARNING_FCFLAGS $(load_gnu_arguments gfort-developer-general)"
+
#############################
# Version-specific warnings #
#############################
@@ -156,13 +159,15 @@ if test "X-gfortran" = "X-$f9x_vendor"; then
# gfortran >= 4.8
if test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 8; then
H5_FCFLAGS="$H5_FCFLAGS $(load_gnu_arguments gfort-4.8)"
+ DEVELOPER_WARNING_FCFLAGS="$DEVELOPER_WARNING_FCFLAGS $(load_gnu_arguments gfort-developer-4.8)"
+ NO_DEVELOPER_WARNING_FCFLAGS="$NO_DEVELOPER_WARNING_FCFLAGS $(load_gnu_arguments gfort-no-developer-4.8)"
fi
# gfortran 4.9 (nothing new)
# gfortran >= 5
if test $f9x_vers_major -ge 5; then
- DEVELOPER_WARNING_FCFLAGS="$DEVELOPER_WARNING_FCFLAGS $(load_gnu_arguments developer-gfort-5)"
+ DEVELOPER_WARNING_FCFLAGS="$DEVELOPER_WARNING_FCFLAGS $(load_gnu_arguments gfort-developer-5)"
fi
# gfortran >= 6
diff --git a/config/gnu-warnings/4.8 b/config/gnu-warnings/4.8
index fa678ff..8a19289 100644
--- a/config/gnu-warnings/4.8
+++ b/config/gnu-warnings/4.8
@@ -7,9 +7,6 @@
-Wpacked-bitfield-compat
-Wsync-nand
-# warning flag added for GCC >= 4.5
--Wstrict-overflow=5
-
# This warning can only be truly addressed using the gcc extension of
# using D to indicate doubles (e.g., 1.23D).
-Wno-unsuffixed-float-constants
@@ -19,10 +16,6 @@
-Wtrampolines
# warning flag added for GCC >= 4.7
-#
-# -Wstack-usage=8192 warnings need to be swept up on a branch so
-# that we can stop burdening the whole development team.
-#
-Wstack-usage=8192
# warning flag added for GCC >= 4.8
diff --git a/config/gnu-warnings/cxx-4.8 b/config/gnu-warnings/cxx-4.8
index 744ebdc..387c41e 100644
--- a/config/gnu-warnings/cxx-4.8
+++ b/config/gnu-warnings/cxx-4.8
@@ -7,18 +7,11 @@
-Wpacked-bitfield-compat
-Wsync-nand
-# warning flag added for GCC >= 4.5
--Wstrict-overflow=5
-
# warning flags added for GCC >= 4.6
-Wdouble-promotion
-Wtrampolines
# warning flag added for GCC >= 4.7
-#
-# -Wstack-usage=8192 warnings need to be swept up on a branch so
-# that we can stop burdening the whole development team.
-#
-Wstack-usage=8192
# warning flag added for GCC >= 4.8
diff --git a/config/gnu-warnings/cxx-developer-4.8 b/config/gnu-warnings/cxx-developer-4.8
index e0d975f..f5fbdad 100644
--- a/config/gnu-warnings/cxx-developer-4.8
+++ b/config/gnu-warnings/cxx-developer-4.8
@@ -1,5 +1,10 @@
-# developer warning flags added for GCC >= 4.5
+# developer warning flag added for GCC >= 4.5
#
+# strict-overflow level 5 catches a LOT of false positives, but is useful
+# for detecting overflow conditions.
+#
+-Wstrict-overflow=5
+
# developer warning flag added for GCC >= 4.6
-Wsuggest-attribute=const
diff --git a/config/gnu-warnings/developer-12 b/config/gnu-warnings/developer-12
new file mode 100644
index 0000000..0835d96
--- /dev/null
+++ b/config/gnu-warnings/developer-12
@@ -0,0 +1,4 @@
+# Enable GCC's static analyzer for GCC 12+
+# (Temporarily disabled as the analyzer currently adds significant
+# compile time overhead for a few test files like cache.c)
+# -fanalyzer
diff --git a/config/gnu-warnings/developer-4.8 b/config/gnu-warnings/developer-4.8
index bfd15a1..be7720c 100644
--- a/config/gnu-warnings/developer-4.8
+++ b/config/gnu-warnings/developer-4.8
@@ -6,6 +6,13 @@
#
-Wjump-misses-init
+# developer warning flag added for GCC >= 4.5
+#
+# strict-overflow level 5 catches a LOT of false positives, but is useful
+# for detecting overflow conditions.
+#
+-Wstrict-overflow=5
+
# developer warning flag added for GCC >= 4.6
-Wsuggest-attribute=const
diff --git a/config/gnu-warnings/developer-general b/config/gnu-warnings/developer-general
index 460b874..79ecd6a 100644
--- a/config/gnu-warnings/developer-general
+++ b/config/gnu-warnings/developer-general
@@ -1,10 +1,17 @@
# (suggestions from gcc, not code problems)
-Waggregate-return
-Wdisabled-optimization
--Winline
-Wmissing-format-attribute
-Wmissing-noreturn
-Wswitch-default
-Wswitch-enum
-Wunsafe-loop-optimizations
-Wunused-macros
+# -Winline warnings aren't included here because, for at least
+# GNU compilers, this flag appears to conflict specifically with
+# the -Og optimization level flag added for Debug and Developer
+# builds and will produce warnings about functions not being
+# considered for inlining. The flag will be added to the list
+# of compiler flags separately if developer warnings are enabled
+# and the build type is not Debug or Developer
+#-Winline
diff --git a/config/gnu-warnings/error-8 b/config/gnu-warnings/error-8
index cbb25f6..36c1414 100644
--- a/config/gnu-warnings/error-8
+++ b/config/gnu-warnings/error-8
@@ -6,17 +6,4 @@
# in order to detect initializations that occur there. It's possible
# that GCC 8 only performs that analysis at -O3, though.
#
-#
-# NOTE: File Driver files are not compatible with these warnings as errors
-# H5FDlog.c,
-# -Werror=maybe-uninitialized
--Wmaybe-uninitialized
-# NOTE: src/ files are not compatible with these warnings as errors
-# src/H5Shyper.c,src/H5SL.c,src/H5Shyper.c
-# -Werror=maybe-uninitialized
-# NOTE: Test files are not compatible with these warnings as errors
-# test/cache_common.c,
-# -Werror=maybe-uninitialized
-# NOTE: hl/src/ files are not compatible with these warnings as errors
-# hl/src/H5DS.c,
-# -Werror=maybe-uninitialized
+-Werror=maybe-uninitialized
diff --git a/config/gnu-warnings/error-general b/config/gnu-warnings/error-general
index a66d284..73d1dd5 100644
--- a/config/gnu-warnings/error-general
+++ b/config/gnu-warnings/error-general
@@ -3,7 +3,10 @@
# circumstances, so ask the compiler to treat them as errors:
#
-Werror=bad-function-cast
+-Werror=cast-align
+-Werror=format
-Werror=implicit-function-declaration
+-Werror=int-to-pointer-cast
-Werror=missing-declarations
-Werror=missing-prototypes
-Werror=nested-externs
@@ -11,10 +14,11 @@
-Werror=packed
-Werror=pointer-sign
-Werror=pointer-to-int-cast
--Werror=int-to-pointer-cast
-Werror=redundant-decls
-Werror=strict-prototypes
-Werror=switch
+-Werror=unused-but-set-variable
+-Werror=unused-variable
#
#-Werror=discarded-qualifiers
#
@@ -25,43 +29,11 @@
#
-Wunused-function
#
-# H5FDdrvr_module.h
-# -Werror=unused-variable
-#
--Wunused-variable
-#
# H5VLpassthru.c
# -Werror=unused-parameter
#
-Wunused-parameter
#
-#
-#
-# NOTE: Tools files are not compatible with these warnings as errors
-# lib/h5tools.c
-# -Werror=cast-align
-#
--Wcast-align
-#
-# lib/h5diff_array.c
-# -Werror=unused-but-set-variable
-#
--Wunused-but-set-variable
-#
-# lib/h5tools_utils.c
-# -Werror=unused-parameter
-#
-#
-# NOTE: JNI files are not compatible with these warnings as errors
-# jni/h5pDCPLImp.c,jni/nativeData.c,jni/h5util.c,jni/h5rImp.c
-# jni/h5sImp.c,jni/h5tImp.c
-# -Werror=cast-align
-# jni/h5util.c
-# -Werror=format(-overflow)
-#
--Werror=format
-#
-#
#Examples and tests do not use the same set of extensive warning flags as libraries
# Here is a list of tests and examples that have issues with the stricter warnings as error
#
diff --git a/config/gnu-warnings/gfort-4.8 b/config/gnu-warnings/gfort-4.8
index 9d880de..f986072 100644
--- a/config/gnu-warnings/gfort-4.8
+++ b/config/gnu-warnings/gfort-4.8
@@ -1,5 +1,4 @@
# warning flags added for gfortran >= 4.4
--Warray-temporaries
-Wintrinsics-std
# warning flag added for gfortran >= 4.5
diff --git a/config/gnu-warnings/gfort-developer-4.8 b/config/gnu-warnings/gfort-developer-4.8
new file mode 100644
index 0000000..20effdc
--- /dev/null
+++ b/config/gnu-warnings/gfort-developer-4.8
@@ -0,0 +1,3 @@
+# warning flags added for gfortran >= 4.4
+-Warray-temporaries
+
diff --git a/config/gnu-warnings/developer-gfort-5 b/config/gnu-warnings/gfort-developer-5
index c5d3850..c5d3850 100644
--- a/config/gnu-warnings/developer-gfort-5
+++ b/config/gnu-warnings/gfort-developer-5
diff --git a/config/gnu-warnings/gfort-developer-general b/config/gnu-warnings/gfort-developer-general
new file mode 100644
index 0000000..dde15fe
--- /dev/null
+++ b/config/gnu-warnings/gfort-developer-general
@@ -0,0 +1,3 @@
+# There is no easy way in Fortran to indicate parameters are intentionally
+# unused and many callbacks will have these, generating a lot of noise.
+-Wunused-dummy-argument
diff --git a/config/gnu-warnings/gfort-no-developer-4.8 b/config/gnu-warnings/gfort-no-developer-4.8
new file mode 100644
index 0000000..82274ef
--- /dev/null
+++ b/config/gnu-warnings/gfort-no-developer-4.8
@@ -0,0 +1,3 @@
+# warning flags added for gfortran >= 4.4
+-Wno-array-temporaries
+
diff --git a/config/gnu-warnings/gfort-no-developer-general b/config/gnu-warnings/gfort-no-developer-general
new file mode 100644
index 0000000..bfcba22
--- /dev/null
+++ b/config/gnu-warnings/gfort-no-developer-general
@@ -0,0 +1,3 @@
+# There is no easy way in Fortran to indicate parameters are intentionally
+# unused and many callbacks will have these, generating a lot of noise.
+-Wno-unused-dummy-argument
diff --git a/config/gnu-warnings/no-cxx-developer-4.8 b/config/gnu-warnings/no-cxx-developer-4.8
index 3c3de93..d4d00e3 100644
--- a/config/gnu-warnings/no-cxx-developer-4.8
+++ b/config/gnu-warnings/no-cxx-developer-4.8
@@ -1,3 +1,6 @@
+# no-developer warning flag added for GCC >= 4.5
+-Wstrict-overflow=2
+
# no-developer warning flag added for GCC >= 4.6
-Wno-suggest-attribute=const
diff --git a/config/gnu-warnings/no-developer-4.8 b/config/gnu-warnings/no-developer-4.8
index 09a9a96..412b907 100644
--- a/config/gnu-warnings/no-developer-4.8
+++ b/config/gnu-warnings/no-developer-4.8
@@ -1,5 +1,6 @@
-# no-developer warning flag added for GCC >= 4.5
+# no-developer warning flags added for GCC >= 4.5
-Wno-jump-misses-init
+-Wstrict-overflow=2
# no-developer warning flag added for GCC >= 4.6
-Wno-suggest-attribute=const
diff --git a/config/ibm-aix b/config/ibm-aix
index fb7e1df..b2f5d05 100644
--- a/config/ibm-aix
+++ b/config/ibm-aix
@@ -148,8 +148,6 @@ ac_cv_sizeof_char=${ac_cv_sizeof_char=1}
ac_cv_sizeof_short=${ac_cv_sizeof_short=2}
ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8}
-# Do not cache __int64 since it is not a standard C type and some compilers
-# (e.g., gcc) does not support it.
ac_cv_sizeof_float=${ac_cv_sizeof_float=4}
ac_cv_sizeof_double=${ac_cv_sizeof_double=8}
ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=8}
diff --git a/config/intel-cxxflags b/config/intel-cxxflags
index 484100f..9d2be69 100644
--- a/config/intel-cxxflags
+++ b/config/intel-cxxflags
@@ -81,7 +81,7 @@ if test "X-icpc" = "X-$cxx_vendor"; then
# General #
###########
- H5_CXXFLAGS="$H5_CXXFLAGS $arch"
+ H5_CXXFLAGS="$H5_CXXFLAGS $arch -std=c++98"
##############
# Production #
diff --git a/config/intel-fflags b/config/intel-fflags
index 843d21e..ad1ce7c 100644
--- a/config/intel-fflags
+++ b/config/intel-fflags
@@ -122,7 +122,7 @@ if test "X-ifort" = "X-$f9x_vendor"; then
# General #
###########
- H5_FCFLAGS="$H5_FCFLAGS -stand:f03 -free"
+ H5_FCFLAGS="$H5_FCFLAGS -free"
H5_FCFLAGS="$H5_FCFLAGS $(load_intel_arguments ifort-general)"
#############################
diff --git a/config/intel-warnings/developer-general b/config/intel-warnings/developer-general
index fae56f0..861218e 100644
--- a/config/intel-warnings/developer-general
+++ b/config/intel-warnings/developer-general
@@ -1,4 +1,11 @@
--Winline
-Wreorder
-Wport
-Wstrict-aliasing
+# -Winline warnings aren't included here because, for at least
+# GNU compilers, this flag appears to conflict specifically with
+# the -Og optimization level flag added for Debug and Developer
+# builds and will produce warnings about functions not being
+# considered for inlining. The flag will be added to the list
+# of compiler flags separately if developer warnings are enabled
+# and the build type is not Debug or Developer
+#-Winline
diff --git a/config/pgi-cxxflags b/config/pgi-cxxflags
index 5fc74ae..84654cb 100644
--- a/config/pgi-cxxflags
+++ b/config/pgi-cxxflags
@@ -48,7 +48,7 @@ if test "X-pgc++" = "X-$cxx_vendor"; then
# General #
###########
- H5_CXXFLAGS="$H5_CXXFLAGS -Minform=warn"
+ H5_CXXFLAGS="$H5_CXXFLAGS -std=c++98 -Minform=warn"
##############
# Production #
diff --git a/config/sanitizer/README.md b/config/sanitizer/README.md
index 0d5fb6c..308f9c3 100644
--- a/config/sanitizer/README.md
+++ b/config/sanitizer/README.md
@@ -53,7 +53,7 @@ These obviously force the standard to be required, and also disables compiler-sp
## Sanitizer Builds [`sanitizers.cmake`](sanitizers.cmake)
-Sanitizers are tools that perform checks during a program’s runtime and returns issues, and as such, along with unit testing, code coverage and static analysis, is another tool to add to the programmers toolbox. And of course, like the previous tools, are tragically simple to add into any project using CMake, allowing any project and developer to quickly and easily use.
+Sanitizers are tools that perform checks during a program's runtime and return issues, and as such, along with unit testing, code coverage and static analysis, are another tool to add to the programmer's toolbox. And, of course, like the previous tools, they are simple to add to any project using CMake, allowing any project and developer to quickly and easily use them.
A quick rundown of the tools available, and what they do:
- [LeakSanitizer](https://clang.llvm.org/docs/LeakSanitizer.html) detects memory leaks, or issues where memory is allocated and never deallocated, causing programs to slowly consume more and more memory, eventually leading to a crash.