summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-02-22 04:05:43 (GMT)
committerGitHub <noreply@github.com>2021-02-22 04:05:43 (GMT)
commitdf1a4af96126682ea4a05c2b26bf6b7c916579ff (patch)
tree993205ed1edde76001a811532f91997138b46744 /config
parent88960489604861813b3676bc234f49ca8ee937d3 (diff)
downloadhdf5-df1a4af96126682ea4a05c2b26bf6b7c916579ff.zip
hdf5-df1a4af96126682ea4a05c2b26bf6b7c916579ff.tar.gz
hdf5-df1a4af96126682ea4a05c2b26bf6b7c916579ff.tar.bz2
HDF5 1 8 merge of recent changes and tools (#353)
* Update supported platforms * Merge PR#3 changes from develop * # WARNING: head commit changed in the meantime Merge gcc 10 diagnostics option from develop Merge CMake changes from develop Merge warnings from develop Merge #318 OSX changes from develop Merge tools changes from develop Merge test macros from develop * Format updates * Fix missing semicolon and format fix * Format update * Correct actions, remove java option * Update autotools build files * Add testfiles * Fix configure issue with make flags * Init fapls to default * Update generated files and fix h5repack id closure * update format
Diffstat (limited to 'config')
-rw-r--r--config/cce-fflags19
-rw-r--r--config/cce-flags24
-rw-r--r--config/clang-cxxflags1
-rw-r--r--config/clang-flags15
-rw-r--r--config/clang-warnings/noerror-general80
-rw-r--r--config/cmake/ConfigureChecks.cmake23
-rw-r--r--config/cmake/H5pubconf.h.in29
-rw-r--r--config/cmake/HDF5PluginMacros.cmake10
-rw-r--r--config/cmake/HDF5UseFortran.cmake44
-rw-r--r--config/cmake/HDF5_Examples_options.cmake2
-rw-r--r--config/cmake/HDFCXXCompilerFlags.cmake34
-rw-r--r--config/cmake/HDFCompilerFlags.cmake57
-rw-r--r--config/cmake/HDFFortranCompilerFlags.cmake16
-rw-r--r--config/cmake/fileCompareTest.cmake27
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake75
-rw-r--r--config/cmake_ext_mod/FindSZIP.cmake4
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake10
-rw-r--r--config/cmake_ext_mod/HDFUseCXX.cmake12
-rw-r--r--config/cmake_ext_mod/HDFUseFortran.cmake16
-rw-r--r--config/cmake_ext_mod/grepTest.cmake10
-rw-r--r--config/commence.am31
-rw-r--r--config/conclude.am6
-rw-r--r--config/examples.am6
-rw-r--r--config/freebsd32
-rw-r--r--config/gnu-cxxflags20
-rw-r--r--config/gnu-fflags13
-rw-r--r--config/gnu-flags34
-rw-r--r--config/gnu-warnings/4.84
-rw-r--r--config/gnu-warnings/71
-rw-r--r--config/gnu-warnings/9.31
-rw-r--r--config/gnu-warnings/cxx-4.826
-rw-r--r--config/gnu-warnings/cxx-noerror-511
-rw-r--r--config/gnu-warnings/cxx-noerror-general32
-rw-r--r--config/gnu-warnings/developer-106
-rw-r--r--config/gnu-warnings/developer-4.81
-rw-r--r--config/gnu-warnings/error-general7
-rw-r--r--config/gnu-warnings/no-developer-4.81
-rw-r--r--config/gnu-warnings/noerror-512
-rw-r--r--config/gnu-warnings/noerror-825
-rw-r--r--config/gnu-warnings/noerror-general91
-rw-r--r--config/ibm-aix49
-rw-r--r--config/ibm-flags28
-rw-r--r--config/libhdf5.pc.in (renamed from config/cmake/libhdf5.pc.in)0
-rw-r--r--config/linux-gnulibc122
-rw-r--r--config/pgi-fflags20
-rw-r--r--config/pgi-flags42
-rw-r--r--config/solaris107
47 files changed, 910 insertions, 226 deletions
diff --git a/config/cce-fflags b/config/cce-fflags
index 2e93b36..813d4c7 100644
--- a/config/cce-fflags
+++ b/config/cce-fflags
@@ -50,15 +50,24 @@ if test "X-cce" = "X-$f9x_vendor"; then
H5_FCFLAGS="${H5_FCFLAGS} -hnocaf"
# Production
- # -Wl,-s to remove all symbols for smaller file
- PROD_FCFLAGS="-O3 -Wl,-s"
+ PROD_FCFLAGS=
# Debug
- DEBUG_FCFLAGS="-g -O0"
+ DEBUG_FCFLAGS=
+
+ # Symbols
+ # -Wl,-s to remove all symbols for smaller file
+ SYMBOLS_FCFLAGS="-g"
+ NO_SYMBOLS_FCFLAGS="-Wl,-s"
- # Profile
+ # Profiling
# Use this for profiling with gprof
- PROFILE_FCFLAGS="-g -p"
+ PROFILE_FCFLAGS="-p"
+
+ # Optimization
+ HIGH_OPT_FCFLAGS="-O3"
+ DEBUG_OPT_FCFLAGS="-O0"
+ NO_OPT_FCFLAGS="-O0"
# Flags are set
f9x_flags_set=yes
diff --git a/config/cce-flags b/config/cce-flags
index d6d6085..0903dec 100644
--- a/config/cce-flags
+++ b/config/cce-flags
@@ -52,18 +52,25 @@ if test "X-cce" = "X-$cc_vendor"; then
H5_CFLAGS="${H5_CFLAGS:--hc99 $arch}"
# Production
- # -Wl,-s to remove all symbols for smaller file
- PROD_CFLAGS="-O3 -Wl,-s"
- PROD_CPPFLAGS=
+ PROD_CFLAGS=
# Debug
- DEBUG_CFLAGS="-g -O0"
- DEBUG_CPPFLAGS=
+ # NDEBUG is handled explicitly in configure
+ DEBUG_CFLAGS=
+
+ # Symbols
+ # -Wl,-s to remove all symbols for smaller file
+ SYMBOLS_CFLAGS="-g"
+ NO_SYMBOLS_CFLAGS="-Wl,-s"
- # Profile
+ # Profiling
# Use this for profiling with gprof
- PROFILE_CFLAGS="-g -p"
- PROFILE_CPPFLAGS=
+ PROFILE_CFLAGS="-p"
+
+ # Optimization
+ HIGH_OPT_CFLAGS="-O3"
+ DEBUG_OPT_CFLAGS="-O0"
+ NO_OPT_CFLAGS="-O0"
# Flags are set
cc_flags_set=yes
@@ -75,3 +82,4 @@ if test "X-$cc_flags_set" = "X-"; then
cc_vendor=
cc_version=
fi
+
diff --git a/config/clang-cxxflags b/config/clang-cxxflags
index bd8ce2d..e7ab6d8 100644
--- a/config/clang-cxxflags
+++ b/config/clang-cxxflags
@@ -173,6 +173,7 @@ if test "X-clang" = "X-$cxx_vendor" -o "X-Apple LLVM" = "X-$cxx_vendor"; then
H5_CXXFLAGS="$H5_CXXFLAGS $(load_clang_arguments general)"
H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_clang_arguments error-general)"
+ H5_NECXXFLAGS="$H5_NECXXFLAGS $(load_clang_arguments noerror-general)"
######################
# Developer warnings #
diff --git a/config/clang-flags b/config/clang-flags
index ab37749..92a8973 100644
--- a/config/clang-flags
+++ b/config/clang-flags
@@ -56,7 +56,10 @@ load_clang_arguments()
#
if test "X-" = "X-$cc_flags_set"; then
# clang -v will return version number following "clang" on Linux machines,
- # but on Macs the version number will follow "Apple LLVM version"
+ # but on Xcode the version number will follow "Apple LLVM version"
+ # Note that the Xcode reported LLVM version doesn't match the canonical
+ # LLVM version, so you'll need to do different version checks for
+ # Xcode.
cc_version="`$CC $CFLAGS $H5_CFLAGS -v 2>&1 |\
grep 'clang version' | sed 's/.*clang version \([-a-z0-9\.]*\).*/\1/'`"
if test -n "$cc_version"; then
@@ -160,9 +163,16 @@ if test "X-clang" = "X-$cc_vendor" -o "X-Apple LLVM" = "X-$cc_vendor"; then
################
HIGH_OPT_CFLAGS="-O3"
- DEBUG_OPT_CFLAGS="-g"
NO_OPT_CFLAGS="-O0"
+ # -Og is only understood by clang 4+ and Xcode 9+
+ # Otherwise use -O1 (which is what -Og usually equates to)
+ if test "X-clang" = "X-$cc_vendor" -a $cc_vers_major -ge 4 -o "X-Apple LLVM" = "X-$cc_vendor" -a $cc_vers_major -ge 9; then
+ DEBUG_OPT_CFLAGS="-Og"
+ else
+ DEBUG_OPT_CFLAGS="-O1"
+ fi
+
############
# Warnings #
############
@@ -173,6 +183,7 @@ if test "X-clang" = "X-$cc_vendor" -o "X-Apple LLVM" = "X-$cc_vendor"; then
H5_CFLAGS="$H5_CFLAGS $(load_clang_arguments general)"
H5_ECFLAGS="$H5_ECFLAGS $(load_clang_arguments error-general)"
+ H5_NECFLAGS="$H5_NECFLAGS $(load_clang_arguments noerror-general)"
######################
# Developer warnings #
diff --git a/config/clang-warnings/noerror-general b/config/clang-warnings/noerror-general
new file mode 100644
index 0000000..ad50dfc
--- /dev/null
+++ b/config/clang-warnings/noerror-general
@@ -0,0 +1,80 @@
+#
+# HDF5 code should not trigger the following warnings under any
+# circumstances, so ask the compiler to treat them as errors:
+#
+-Wbad-function-cast
+-Wimplicit-function-declaration
+-Wincompatible-pointer-types
+-Wmissing-declarations
+-Wpacked
+-Wshadow
+-Wswitch
+#
+# NOTE: Following files are not compatible with incompatible-pointer-types as errors
+# src/H5Dchunk.c,src/H5Dint.c,src/H5Gint.c,src/H5HFcache.c,src/H5I.c,src/H5T.c
+-Wno-error=incompatible-pointer-types-discards-qualifiers
+#
+#
+# NOTE: File Driver files are not compatible with these warnings as errors
+# H5FDdirect.c,H5FDmpio.c,H5FDros3.c,
+# -Werror=unused-function
+#
+-Wunused-function
+#
+# H5FDdrvr_module.h
+# -Werror=unused-variable
+#
+-Wunused-variable
+#
+# H5VLpassthru.c
+# -Werror=unused-parameter
+#
+-Wunused-parameter
+#
+#
+#
+# NOTE: Tools files are not compatible with these warnings as errors
+# lib/h5tools.c
+# -Werror=cast-align
+#
+-Wcast-align
+#
+# lib/h5tools_utils.c
+# -Werror=unused-parameter
+#
+#
+# NOTE: JNI files are not compatible with these warnings as errors
+# jni/h5pDCPLImp.c,jni/nativeData.c,jni/h5util.c,jni/h5rImp.c
+# jni/h5sImp.c,jni/h5tImp.c
+# -Werror=cast-align
+# jni/h5util.c
+# -Werror=format(-overflow)
+#
+-Wformat
+#
+#
+#Examples and tests do not use the same set of extensive warning flags as libraries
+# Here is a list of tests and examples that have issues with the stricter warnings as error
+#
+# NOTE: Test files are not compatible with these warnings as errors
+# thread_id.c,
+# -Werror=unused-function
+# dsets.c
+# -Werror=unused-parameter
+#
+#
+# NOTE: Examples files are not compatible with these warnings as errors
+# h5_vds-eiger.c,h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,h5_vds-percival-unlim-maxmin.c
+# h5_vds-percival.c,h5_read.c,h5_rdwt.c,h5_mount.c,h5_extend.c,h5_extend_write.c
+# h5_write.c,h5_vds-simpleIO.c,h5_ref2reg_deprec.c,h5_crtgrp.c,h5_select.c
+# h5_vds-percival-unlim.c,h5_crtatt.c,h5_group.c,h5_attribute.c,h5_crtdat.c
+# h5_reference_deprec.c
+# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c
+# -Werror=strict-prototypes
+# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c
+# -Werror=old-style-definition
+# h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,
+# -Werror=unused-variable
+# h5_elink_unix2win.c,h5_extlink.c,h5_attribute.c
+# -Werror=unused-parameter
+
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index a4d6070..b437266 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -154,14 +154,18 @@ if (NOT WINDOWS)
add_definitions ("-D_GNU_SOURCE")
else ()
set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg})
- message (STATUS "${msg}... no")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... no")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test TEST_DIRECT_VFD_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n"
)
endif ()
else ()
set (TEST_DIRECT_VFD_WORKS "" CACHE INTERNAL ${msg})
- message (STATUS "${msg}... no")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... no")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test TEST_DIRECT_VFD_WORKS Compile failed with the following output:\n ${OUTPUT}\n"
)
@@ -181,7 +185,7 @@ option (HDF5_ENABLE_ROS3_VFD "Build the ROS3 Virtual File Driver" OFF)
list (APPEND LINK_LIBS ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES})
INCLUDE_DIRECTORIES (${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR})
else ()
- message (STATUS "The Read-Only S3 VFD was requested but cannot be built.\nPlease check that openssl and cURL are available on your\nsystem, and/or re-configure without option HDF5_ENABLE_ROS3_VFD.")
+ message (WARNING "The Read-Only S3 VFD was requested but cannot be built.\nPlease check that openssl and cURL are available on your\nsystem, and/or re-configure without option HDF5_ENABLE_ROS3_VFD.")
endif ()
endif ()
@@ -190,7 +194,6 @@ endif ()
#-----------------------------------------------------------------------------
macro (H5ConversionTests TEST msg)
if (NOT DEFINED ${TEST})
- # message (STATUS "===> ${TEST}")
TRY_RUN (${TEST}_RUN ${TEST}_COMPILE
${CMAKE_BINARY_DIR}
${HDF_RESOURCES_DIR}/ConversionTests.c
@@ -200,17 +203,23 @@ macro (H5ConversionTests TEST msg)
if (${TEST}_COMPILE)
if (${TEST}_RUN MATCHES 0)
set (${TEST} 1 CACHE INTERNAL ${msg})
- message (STATUS "${msg}... yes")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... yes")
+ endif ()
else ()
set (${TEST} "" CACHE INTERNAL ${msg})
- message (STATUS "${msg}... no")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... no")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test ${TEST} Run failed with the following output and exit code:\n ${OUTPUT}\n"
)
endif ()
else ()
set (${TEST} "" CACHE INTERNAL ${msg})
- message (STATUS "${msg}... no")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... no")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test ${TEST} Compile failed with the following output:\n ${OUTPUT}\n"
)
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index e7fc0fc..a1c1dd1 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -26,13 +26,6 @@
/* Define if using a Windows compiler (i.e. Visual Studio) */
#cmakedefine H5_HAVE_VISUAL_STUDIO @H5_HAVE_VISUAL_STUDIO@
-/* Define if building universal (internal helper macro) */
-#cmakedefine H5_AC_APPLE_UNIVERSAL_BUILD @H5_AC_APPLE_UNIVERSAL_BUILD@
-
-/* Define if the memory buffers being written to disk should be cleared before
- writing. */
-#cmakedefine H5_CLEAR_MEMORY @H5_CLEAR_MEMORY@
-
/* Define if C++ compiler recognizes offsetof */
#cmakedefine H5_CXX_HAVE_OFFSETOF @CXX_HAVE_OFFSETOF@
@@ -555,8 +548,17 @@
/* The size of `long', as computed by sizeof. */
#cmakedefine H5_SIZEOF_LONG @H5_SIZEOF_LONG@
+/* The size of `long double', as computed by sizeof. */
+#cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@
+
#else
- # if defined(__LP64__) && __LP64__
+
+ /* On Apple, to support Universal Binaries (where multiple CPU
+ architectures exist in one library/executable), we can't assume
+ the machine doing the compiling has the same endianness or type
+ sizes as all the various architectures (PowerPC, Intel, ARM). */
+
+ # if defined(__LP64__) && __LP64__
#define H5_SIZEOF_LONG 8
#define H5_SIZEOF_SIZE_T 8
#define H5_SIZEOF_SSIZE_T 8
@@ -566,10 +568,15 @@
#define H5_SIZEOF_SSIZE_T 4
# endif
-#endif
+ # if defined(__i386__) || defined(__x86_64__)
+ #define H5_SIZEOF_LONG_DOUBLE 16
+ # elif defined(__aarch64__)
+ #define H5_SIZEOF_LONG_DOUBLE 8
+ # else
+ #cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@
+ # endif
-/* The size of `long double', as computed by sizeof. */
-#cmakedefine H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@
+#endif
/* Define size of long long and/or __int64 bit integer type only if the type
exists. */
diff --git a/config/cmake/HDF5PluginMacros.cmake b/config/cmake/HDF5PluginMacros.cmake
index a858353..4e05399 100644
--- a/config/cmake/HDF5PluginMacros.cmake
+++ b/config/cmake/HDF5PluginMacros.cmake
@@ -14,7 +14,9 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type)
)
endif ()
FetchContent_GetProperties(PLUGIN)
- message (STATUS "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}")
+ endif ()
if(NOT PLUGIN_POPULATED)
FetchContent_Populate(PLUGIN)
include (${HDF_RESOURCES_DIR}/HDF5PluginCache.cmake)
@@ -65,8 +67,10 @@ macro (EXTERNAL_PLUGIN_LIBRARY compress_type)
add_dependencies (h5ex_d_zfp ${HDF5_LIBSH_TARGET})
target_include_directories (h5ex_d_zfp PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR}")
endif ()
- endif()
- message (STATUS "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}")
+ endif ()
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "HDF5_INCLUDE_DIR=${HDF5_INCLUDE_DIR}")
+ endif ()
set (PLUGIN_BINARY_DIR "${plugin_BINARY_DIR}")
set (PLUGIN_SOURCE_DIR "${plugin_SOURCE_DIR}")
set (PLUGIN_LIBRARY "PLUGIN")
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
index e616984..913b6e1 100644
--- a/config/cmake/HDF5UseFortran.cmake
+++ b/config/cmake/HDF5UseFortran.cmake
@@ -41,7 +41,9 @@ else ()
# so this one is used.
#-----------------------------------------------------------------------------
macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1 RETURN_VAR)
- message (STATUS "Detecting Fortran ${FUNCTION_NAME}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Detecting Fortran ${FUNCTION_NAME}")
+ endif ()
file (WRITE
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler1.f90
"${SOURCE_CODE}"
@@ -55,18 +57,24 @@ macro (FORTRAN_RUN FUNCTION_NAME SOURCE_CODE RUN_RESULT_VAR1 COMPILE_RESULT_VAR1
if (${COMPILE_RESULT_VAR})
set(${RETURN_VAR} ${RUN_RESULT_VAR})
if (${RUN_RESULT_VAR} MATCHES 0)
- message (STATUS "Testing Fortran ${FUNCTION_NAME} - OK")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Testing Fortran ${FUNCTION_NAME} - OK")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran ${FUNCTION_NAME} exists passed\n"
)
else ()
- message (STATUS "Testing Fortran ${FUNCTION_NAME} - Fail")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Testing Fortran ${FUNCTION_NAME} - Fail")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Fortran ${FUNCTION_NAME} exists failed: ${RUN_RESULT_VAR}\n"
)
endif ()
else ()
- message (STATUS "Compiling Fortran ${FUNCTION_NAME} - Fail")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Compiling Fortran ${FUNCTION_NAME} - Fail")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Fortran ${FUNCTION_NAME} compiles failed: ${COMPILE_RESULT_VAR}\n"
)
@@ -281,7 +289,9 @@ string (REGEX REPLACE " " "" pack_int_sizeof "${pack_int_sizeof}")
set (PAC_FC_ALL_INTEGER_KINDS_SIZEOF "\{${pack_int_sizeof}\}")
-message (STATUS "....FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}")
+if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "....FOUND SIZEOF for INTEGER KINDs ${PAC_FC_ALL_INTEGER_KINDS_SIZEOF}")
+endif ()
# **********
# REALS
# **********
@@ -426,7 +436,9 @@ else ()
# so this one is used.
#-----------------------------------------------------------------------------
macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR)
- message (STATUS "Detecting C ${FUNCTION_NAME}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Detecting C ${FUNCTION_NAME}")
+ endif ()
if (HDF5_REQUIRED_LIBRARIES)
set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}")
@@ -446,22 +458,28 @@ macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR)
set (${RETURN_VAR} ${OUTPUT_VAR})
- #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- #message (STATUS "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ")
- #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- #message (STATUS "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ")
- #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ #if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ # message (TRACE "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ")
+ # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ # message (TRACE "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ")
+ # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ #endif ()
if (${COMPILE_RESULT_VAR})
if (${RUN_RESULT_VAR} MATCHES 1)
set (${RUN_RESULT_VAR} 1 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
- message (STATUS "Testing C ${FUNCTION_NAME} - OK")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Testing C ${FUNCTION_NAME} - OK")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the C ${FUNCTION_NAME} exists passed with the following output:\n"
"${OUTPUT_VAR}\n\n"
)
else ()
- message (STATUS "Testing C ${FUNCTION_NAME} - Fail")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Testing C ${FUNCTION_NAME} - Fail")
+ endif ()
set (${RUN_RESULT_VAR} 0 CACHE INTERNAL "Have C function ${FUNCTION_NAME}")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the C ${FUNCTION_NAME} exists failed with the following output:\n"
diff --git a/config/cmake/HDF5_Examples_options.cmake b/config/cmake/HDF5_Examples_options.cmake
index b042c06..d318aac 100644
--- a/config/cmake/HDF5_Examples_options.cmake
+++ b/config/cmake/HDF5_Examples_options.cmake
@@ -38,6 +38,8 @@
### enable Fortran builds
#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FORTRAN:BOOL=ON")
+### enable FILTERS builds
+#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF_BUILD_FILTERS:BOOL=ON")
#############################################################################################
### enable parallel program builds
diff --git a/config/cmake/HDFCXXCompilerFlags.cmake b/config/cmake/HDFCXXCompilerFlags.cmake
index b0f9e23..12dec20 100644
--- a/config/cmake/HDFCXXCompilerFlags.cmake
+++ b/config/cmake/HDFCXXCompilerFlags.cmake
@@ -14,7 +14,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS OFF)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}")
-message (STATUS "Warnings Configuration: CXX default: ${CMAKE_CXX_FLAGS}")
+if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Warnings Configuration: CXX default: ${CMAKE_CXX_FLAGS}")
+endif ()
#-----------------------------------------------------------------------------
# Compiler specific flags : Shouldn't there be compiler tests for these
#-----------------------------------------------------------------------------
@@ -28,6 +30,14 @@ if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstdarg-opt")
endif ()
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.0)
+ if (HDF5_ENABLE_BUILD_DIAGS)
+ message (STATUS "... default color and URL extended diagnostic messages enabled")
+ else ()
+ message (STATUS "... disable color and URL extended diagnostic messages")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-urls=never -fno-diagnostics-color")
+ endif ()
+ endif ()
endif ()
endif ()
@@ -89,14 +99,20 @@ if (NOT MSVC AND NOT MINGW)
AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
# add the general CXX flags for g++ compiler versions 4.8 and above.
ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-general")
- ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-general")
+ if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
+ ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-general")
+ else ()
+ ADD_H5_FLAGS (H5_CXXFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-noerror-general")
+ endif ()
endif ()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
ADD_H5_FLAGS (HDF5_CMAKE_CXX_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general")
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "PGI")
list (APPEND HDF5_CMAKE_CXX_FLAGS "-Minform=inform")
endif ()
- message (STATUS "CMAKE_CXX_FLAGS_GENERAL=${HDF5_CMAKE_CXX_FLAGS}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "CMAKE_CXX_FLAGS_GENERAL=${HDF5_CMAKE_CXX_FLAGS}")
+ endif ()
endif ()
#-----------------------------------------------------------------------------
@@ -152,7 +168,11 @@ if (NOT MSVC AND NOT MINGW)
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
# autotools always add the C flags with the CXX flags
ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-5")
- ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-5")
+ if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
+ ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-error-5")
+ else ()
+ ADD_H5_FLAGS (H5_CXXFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/cxx-noerror-5")
+ endif ()
endif ()
# Append more extra warning flags that only gcc 6.x+ know about
@@ -177,7 +197,11 @@ if (NOT MSVC AND NOT MINGW)
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
# autotools always add the C flags with the CXX flags
ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/8")
- #ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
+ #if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
+ # ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
+ #else ()
+ # ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-8")
+ #endif ()
if (HDF5_ENABLE_DEV_WARNINGS)
# autotools always add the C flags with the CXX flags
ADD_H5_FLAGS (H5_CXXFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8")
diff --git a/config/cmake/HDFCompilerFlags.cmake b/config/cmake/HDFCompilerFlags.cmake
index e4808d2..bce906d 100644
--- a/config/cmake/HDFCompilerFlags.cmake
+++ b/config/cmake/HDFCompilerFlags.cmake
@@ -15,7 +15,9 @@ set(CMAKE_C_STANDARD_REQUIRED TRUE)
set (CMAKE_C_FLAGS "${CMAKE_C99_STANDARD_COMPILE_OPTION} ${CMAKE_C_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_SANITIZER_FLAGS} ${CMAKE_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_SANITIZER_FLAGS} ${CMAKE_CXX_FLAGS}")
-message (STATUS "Warnings Configuration: default: ${CMAKE_C_FLAGS} : ${CMAKE_CXX_FLAGS}")
+if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Warnings Configuration: default: ${CMAKE_C_FLAGS} : ${CMAKE_CXX_FLAGS}")
+endif ()
#-----------------------------------------------------------------------------
# Compiler specific flags : Shouldn't there be compiler tests for these
#-----------------------------------------------------------------------------
@@ -29,6 +31,20 @@ if (CMAKE_COMPILER_IS_GNUCC)
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstdarg-opt")
endif ()
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 10.0)
+ #-----------------------------------------------------------------------------
+ # Option to allow the user to enable build extended diagnostics
+ #
+ # This should NOT be on by default as it can cause process issues.
+ #-----------------------------------------------------------------------------
+ option (HDF5_ENABLE_BUILD_DIAGS "Enable color and URL extended diagnostic messages" OFF)
+ if (HDF5_ENABLE_BUILD_DIAGS)
+ message (STATUS "... default color and URL extended diagnostic messages enabled")
+ else ()
+ message (STATUS "... disable color and URL extended diagnostic messages")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-urls=never -fno-diagnostics-color")
+ endif ()
+ endif ()
endif ()
endif ()
@@ -69,6 +85,18 @@ endif ()
# break into groups (from the config/gnu-flags file)
#-----------------------------------------------------------------------------
if (NOT MSVC AND NOT MINGW)
+ #-----------------------------------------------------------------------------
+ # Option to allow the user to interpret certain warnings as errors
+ #
+ # This should NOT be on by default as it can cause a lot of conflicts with
+ # new operating systems and compiler versions. Header files that are out of
+ # our control (MPI, HDFS, etc.) can also raise warnings.
+ #-----------------------------------------------------------------------------
+ option (HDF5_ENABLE_WARNINGS_AS_ERRORS "Interpret some warnings as errors" OFF)
+ if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
+ message (STATUS "...some warnings will be interpreted as errors")
+ endif ()
+
if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
list (APPEND HDF5_CMAKE_C_FLAGS "-erroff=%none -DBSD_COMP")
else ()
@@ -96,18 +124,28 @@ if (NOT MSVC AND NOT MINGW)
# Add general CFlags for GCC versions 4.8 and above
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.8)
ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/gnu-warnings/general")
- ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-general")
+ if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
+ ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-general")
+ else ()
+ ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/gnu-warnings/noerror-general")
+ endif ()
endif ()
# gcc automatically inlines based on the optimization level
# this is just a failsafe
list (APPEND H5_CFLAGS0 "-finline-functions")
elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
ADD_H5_FLAGS (HDF5_CMAKE_C_FLAGS "${HDF5_SOURCE_DIR}/config/clang-warnings/general")
- ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/error-general")
+ if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
+ ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/error-general")
+ else ()
+ ADD_H5_FLAGS (H5_CFLAGS0 "${HDF5_SOURCE_DIR}/config/clang-warnings/noerror-general")
+ endif ()
elseif (CMAKE_C_COMPILER_ID STREQUAL "PGI")
list (APPEND HDF5_CMAKE_C_FLAGS "-Minform=inform")
endif ()
- message (STATUS "CMAKE_C_FLAGS_GENERAL=${HDF5_CMAKE_C_FLAGS}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "CMAKE_C_FLAGS_GENERAL=${HDF5_CMAKE_C_FLAGS}")
+ endif ()
endif ()
#-----------------------------------------------------------------------------
@@ -132,7 +170,6 @@ if (NOT MSVC AND NOT MINGW)
endif ()
endif ()
-
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
# Technically, variable-length arrays are part of the C99 standard, but
# we should approach them a bit cautiously... Only needed for gcc 4.X
@@ -158,7 +195,11 @@ if (NOT MSVC AND NOT MINGW)
# Append more extra warning flags that only gcc 5.x+ know about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0)
ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/5")
- ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5")
+ if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
+ ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5")
+ else ()
+ ADD_H5_FLAGS (H5_CFLAGS1 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-5")
+ endif ()
endif ()
# Append more extra warning flags that only gcc 6.x+ know about
@@ -179,7 +220,9 @@ if (NOT MSVC AND NOT MINGW)
# Append more extra warning flags that only gcc 8.x+ know about
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 8.0)
ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/8")
- ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
+ if (HDF5_ENABLE_WARNINGS_AS_ERRORS)
+ ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/error-8")
+ endif ()
if (HDF5_ENABLE_DEV_WARNINGS)
ADD_H5_FLAGS (H5_CFLAGS3 "${HDF5_SOURCE_DIR}/config/gnu-warnings/developer-8")
else ()
diff --git a/config/cmake/HDFFortranCompilerFlags.cmake b/config/cmake/HDFFortranCompilerFlags.cmake
index d133069..8b631ad 100644
--- a/config/cmake/HDFFortranCompilerFlags.cmake
+++ b/config/cmake/HDFFortranCompilerFlags.cmake
@@ -10,7 +10,9 @@
# help@hdfgroup.org.
#
-message (STATUS "Warnings Configuration: default Fortran: ${CMAKE_Fortran_FLAGS}")
+if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Warnings Configuration: default Fortran: ${CMAKE_Fortran_FLAGS}")
+endif ()
#-----------------------------------------------------------------------------
# Option to allow the user to disable compiler warnings
@@ -43,6 +45,14 @@ endif ()
#-----------------------------------------------------------------------------
# HDF5 library compile options
#-----------------------------------------------------------------------------
+if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 10.0)
+ if (HDF5_ENABLE_BUILD_DIAGS)
+ message (STATUS "... default color and URL extended diagnostic messages enabled")
+ else ()
+ message (STATUS "... disable color and URL extended diagnostic messages")
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fdiagnostics-urls=never -fno-diagnostics-color")
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# CDash is configured to only allow 3000 warnings, so
@@ -64,7 +74,9 @@ if (NOT MSVC AND NOT MINGW)
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "PGI")
list (APPEND HDF5_CMAKE_Fortran_FLAGS "-Mfreeform" "-Mdclchk" "-Mstandard" "-Mallocatable=03")
endif ()
- message (STATUS "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "HDF5_CMAKE_Fortran_FLAGS=${HDF5_CMAKE_Fortran_FLAGS}")
+ endif ()
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
diff --git a/config/cmake/fileCompareTest.cmake b/config/cmake/fileCompareTest.cmake
index 2bbeecc..4a8dc09 100644
--- a/config/cmake/fileCompareTest.cmake
+++ b/config/cmake/fileCompareTest.cmake
@@ -24,9 +24,6 @@ endif ()
if (NOT TEST_FUNCTION)
message (FATAL_ERROR "Require TEST_FUNCTION (LT,LTEQ,EQ,GTEQ,GT) to be defined")
endif ()
-#if (NOT TEST_EXPECT)
-# message (STATUS "Require TEST_EXPECT to be defined")
-#endif ()
set (TEST_ONE_SIZE 0)
set (TEST_TWO_SIZE 0)
@@ -53,7 +50,9 @@ if (TEST_STRINGS STREQUAL "YES")
RESULT_VARIABLE TEST_RESULT
)
- message (STATUS "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}-${TEST_O_STRING_LEN}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}-${TEST_O_STRING_LEN}")
+ endif ()
# if the return value is !=${TEST_EXPECT} bail out
if (NOT TEST_RESULT EQUAL TEST_EXPECT)
message (FATAL_ERROR "Failed: The output of ${TEST_FOLDER}/${TEST_ONEFILE} did not match ${TEST_FOLDER}/${TEST_TWOFILE}.\n${TEST_ERROR}")
@@ -66,31 +65,41 @@ else ()
file (SIZE ${TEST_FOLDER}/${TEST_TWOFILE} TEST_TWO_SIZE)
if (TEST_FUNCTION MATCHES "LT")
if (TEST_ONE_SIZE LESS TEST_TWO_SIZE)
- message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less ${TEST_FOLDER}/${TEST_TWOFILE}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
else ()
message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less ${TEST_FOLDER}/${TEST_TWOFILE}")
endif ()
elseif (TEST_FUNCTION MATCHES "LTEQ")
if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
- message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSES "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was less or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
else ()
message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT less or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
endif ()
elseif (TEST_FUNCTION MATCHES "EQ")
if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
- message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
else ()
message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT equal ${TEST_FOLDER}/${TEST_TWOFILE}")
endif ()
elseif (TEST_FUNCTION MATCHES "GTEQ")
if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
- message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
else ()
message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater or equal ${TEST_FOLDER}/${TEST_TWOFILE}")
endif ()
elseif (TEST_FUNCTION MATCHES "GT")
if (TEST_ONE_SIZE LESS_EQUAL TEST_TWO_SIZE)
- message (STATUS "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater ${TEST_FOLDER}/${TEST_TWOFILE}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Passed: The size of ${TEST_FOLDER}/${TEST_ONEFILE} was greater ${TEST_FOLDER}/${TEST_TWOFILE}")
+ endif ()
else ()
message (FATAL_ERROR "The size of ${TEST_FOLDER}/${TEST_ONEFILE} was NOT greater ${TEST_FOLDER}/${TEST_TWOFILE}")
endif ()
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index c654702..61a47be 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -22,21 +22,6 @@ include (CheckVariableExists)
include (TestBigEndian)
include (CheckStructHasMember)
-#-----------------------------------------------------------------------------
-# APPLE/Darwin setup
-#-----------------------------------------------------------------------------
-if (APPLE)
- list (LENGTH CMAKE_OSX_ARCHITECTURES ARCH_LENGTH)
- if (ARCH_LENGTH GREATER 1)
- set (CMAKE_OSX_ARCHITECTURES "" CACHE STRING "" FORCE)
- message (FATAL_ERROR "Building Universal Binaries on OS X is NOT supported by the HDF5 project. This is"
- "due to technical reasons. The best approach would be build each architecture in separate directories"
- "and use the 'lipo' tool to combine them into a single executable or library. The 'CMAKE_OSX_ARCHITECTURES'"
- "variable has been set to a blank value which will build the default architecture for this system.")
- endif ()
- set (${HDF_PREFIX}_AC_APPLE_UNIVERSAL_BUILD 0)
-endif ()
-
# Check for Darwin (not just Apple - we also want to catch OpenDarwin)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set (${HDF_PREFIX}_HAVE_DARWIN 1)
@@ -226,7 +211,9 @@ macro (HDF_FUNCTION_TEST OTHER_TEST)
)
endif ()
- #message (STATUS "Performing ${OTHER_TEST}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (TRACE "Performing ${OTHER_TEST}")
+ endif ()
try_compile (${OTHER_TEST}
${CMAKE_BINARY_DIR}
${HDF_RESOURCES_EXT_DIR}/HDFTests.c
@@ -236,9 +223,13 @@ macro (HDF_FUNCTION_TEST OTHER_TEST)
)
if (${OTHER_TEST})
set (${HDF_PREFIX}_${OTHER_TEST} 1 CACHE INTERNAL "Other test ${FUNCTION}")
- message (STATUS "Performing Other Test ${OTHER_TEST} - Success")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Performing Other Test ${OTHER_TEST} - Success")
+ endif ()
else ()
- message (STATUS "Performing Other Test ${OTHER_TEST} - Failed")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Performing Other Test ${OTHER_TEST} - Failed")
+ endif ()
set (${HDF_PREFIX}_${OTHER_TEST} "" CACHE INTERNAL "Other test ${FUNCTION}")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing Other Test ${OTHER_TEST} failed with the following output:\n"
@@ -299,17 +290,23 @@ if (MINGW OR NOT WINDOWS)
set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg})
set (LARGEFILE 1)
set (HDF_EXTRA_FLAGS ${HDF_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
- message (STATUS "${msg}... yes")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... yes")
+ endif ()
else ()
set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
- message (STATUS "${msg}... no")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... no")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Test TEST_LFS_WORKS Run failed with the following exit code:\n ${TEST_LFS_WORKS_RUN}\n"
)
endif ()
else ()
set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
- message (STATUS "${msg}... no")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... no")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Test TEST_LFS_WORKS Compile failed\n"
)
@@ -342,11 +339,15 @@ endif ()
macro (HDF_CHECK_TYPE_SIZE type var)
set (aType ${type})
set (aVar ${var})
-# message (STATUS "Checking size of ${aType} and storing into ${aVar}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (TRACE "Checking size of ${aType} and storing into ${aVar}")
+ endif ()
CHECK_TYPE_SIZE (${aType} ${aVar})
if (NOT ${aVar})
set (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}")
-# message (STATUS "Size of ${aType} was NOT Found")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (TRACE "Size of ${aType} was NOT Found")
+ endif ()
endif ()
endmacro ()
@@ -576,7 +577,9 @@ endif ()
#-----------------------------------------------------------------------------
if (WINDOWS)
if (NOT HDF_NO_IOEO_TEST)
- message (STATUS "Checking for InitOnceExecuteOnce:")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Checking for InitOnceExecuteOnce:")
+ endif ()
if (NOT DEFINED ${HDF_PREFIX}_HAVE_IOEO)
if (LARGEFILE)
set (CMAKE_REQUIRED_DEFINITIONS
@@ -605,7 +608,9 @@ if (WINDOWS)
# if the return value was 0 then it worked
if ("${HAVE_IOEO_EXITCODE}" EQUAL 0)
set (${HDF_PREFIX}_HAVE_IOEO 1 CACHE INTERNAL "Test InitOnceExecuteOnce")
- message (STATUS "Performing Test InitOnceExecuteOnce - Success")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Performing Test InitOnceExecuteOnce - Success")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing C SOURCE FILE Test InitOnceExecuteOnce succeded with the following output:\n"
"${OUTPUT}\n"
@@ -617,7 +622,9 @@ if (WINDOWS)
set (${HDF_PREFIX}_HAVE_IOEO "" CACHE INTERNAL "Test InitOnceExecuteOnce")
endif ()
- message (STATUS "Performing Test InitOnceExecuteOnce - Failed")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Performing Test InitOnceExecuteOnce - Failed")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing InitOnceExecuteOnce Test failed with the following output:\n"
"${OUTPUT}\n"
@@ -640,7 +647,9 @@ endforeach ()
#-----------------------------------------------------------------------------
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:")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Checking for appropriate format for 64 bit long:")
+ endif ()
set (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH")
if (${HDF_PREFIX}_SIZEOF_LONG_LONG)
set (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
@@ -657,7 +666,9 @@ if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "
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 ()
- message (STATUS "Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}")
+ endif ()
endif ()
else ()
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
@@ -666,9 +677,13 @@ if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "
endif ()
if (PRINT_LL_FOUND)
- message (STATUS "Checking for appropriate format for 64 bit long: found ${${HDF_PREFIX}_PRINTF_LL_WIDTH}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Checking for appropriate format for 64 bit long: found ${${HDF_PREFIX}_PRINTF_LL_WIDTH}")
+ endif ()
else ()
- message (STATUS "Checking for appropriate format for 64 bit long: not found")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Checking for appropriate format for 64 bit long: not found")
+ endif ()
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/FindSZIP.cmake b/config/cmake_ext_mod/FindSZIP.cmake
index c3dc04a..846a3d1 100644
--- a/config/cmake_ext_mod/FindSZIP.cmake
+++ b/config/cmake_ext_mod/FindSZIP.cmake
@@ -118,7 +118,9 @@ if (NOT SZIP_FOUND)
"SZip was not found. Make sure SZIP_LIBRARY and SZIP_INCLUDE_DIR are set or set the SZIP_INSTALL environment variable."
)
if (NOT SZIP_FIND_QUIETLY)
- message (STATUS "${SZIP_DIR_MESSAGE}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${SZIP_DIR_MESSAGE}")
+ endif ()
else ()
if (SZIP_FIND_REQUIRED)
message (FATAL_ERROR "SZip was NOT found and is Required by this project")
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index c26956b..c84c842 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -28,7 +28,9 @@ macro (SET_HDF_BUILD_TYPE)
endif()
endif()
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
- message (STATUS "Setting build type to 'RelWithDebInfo' as none was specified.")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Setting build type to 'RelWithDebInfo' as none was specified.")
+ endif()
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
@@ -458,19 +460,19 @@ endmacro ()
macro (ADD_H5_FLAGS h5_flag_var infile)
file (STRINGS ${infile} TEST_FLAG_STREAM)
- #message (STATUS "TEST_FLAG_STREAM=${TEST_FLAG_STREAM}")
+ #message (TRACE "TEST_FLAG_STREAM=${TEST_FLAG_STREAM}")
list (LENGTH TEST_FLAG_STREAM len_flag)
if (len_flag GREATER 0)
math (EXPR _FP_LEN "${len_flag} - 1")
foreach (line RANGE 0 ${_FP_LEN})
list (GET TEST_FLAG_STREAM ${line} str_flag)
string (REGEX REPLACE "^#.*" "" str_flag "${str_flag}")
- #message (STATUS "str_flag=${str_flag}")
+ #message (TRACE "str_flag=${str_flag}")
if (str_flag)
list (APPEND ${h5_flag_var} "${str_flag}")
endif ()
endforeach ()
endif ()
- #message (STATUS "h5_flag_var=${${h5_flag_var}}")
+ #message (TRACE "h5_flag_var=${${h5_flag_var}}")
endmacro ()
diff --git a/config/cmake_ext_mod/HDFUseCXX.cmake b/config/cmake_ext_mod/HDFUseCXX.cmake
index 9b4b138..28e7f8a 100644
--- a/config/cmake_ext_mod/HDFUseCXX.cmake
+++ b/config/cmake_ext_mod/HDFUseCXX.cmake
@@ -70,7 +70,9 @@ macro (HDF_CXX_FUNCTION_TEST OTHER_TEST)
)
endif ()
- #message (STATUS "Performing ${OTHER_TEST}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (TRACE "Performing ${OTHER_TEST}")
+ endif ()
TRY_COMPILE (${OTHER_TEST}
${CMAKE_BINARY_DIR}
${HDF_RESOURCES_EXT_DIR}/HDFCXXTests.cpp
@@ -80,9 +82,13 @@ macro (HDF_CXX_FUNCTION_TEST OTHER_TEST)
)
if (${OTHER_TEST} EQUAL 0)
set (${OTHER_TEST} 1 CACHE INTERNAL "CXX test ${FUNCTION}")
- message (STATUS "Performing CXX Test ${OTHER_TEST} - Success")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Performing CXX Test ${OTHER_TEST} - Success")
+ endif ()
else ()
- message (STATUS "Performing CXX Test ${OTHER_TEST} - Failed")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Performing CXX Test ${OTHER_TEST} - Failed")
+ endif ()
set (${OTHER_TEST} "" CACHE INTERNAL "CXX test ${FUNCTION}")
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Performing CXX Test ${OTHER_TEST} failed with the following output:\n"
diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake
index 17fdefb..9cbcd76 100644
--- a/config/cmake_ext_mod/HDFUseFortran.cmake
+++ b/config/cmake_ext_mod/HDFUseFortran.cmake
@@ -135,7 +135,9 @@ else ()
# so this one is used for a sizeof test.
#-----------------------------------------------------------------------------
macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
- message (STATUS "Testing Fortran ${FUNCTION}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Testing Fortran ${FUNCTION}")
+ endif ()
if (HDF5_REQUIRED_LIBRARIES)
set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}")
@@ -153,13 +155,17 @@ else ()
OUTPUT_VARIABLE OUTPUT
)
- # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- # message (STATUS "Test result ${OUTPUT}")
- # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ # if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ # message (TRACE "Test result ${OUTPUT}")
+ # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ # endif ()
if (${RESULT_VAR})
set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
- message (STATUS "Testing Fortran ${FUNCTION} - OK")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Testing Fortran ${FUNCTION} - OK")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran ${FUNCTION} exists passed with the following output:\n"
"${OUTPUT}\n\n"
diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake
index 8538f32..631fca6 100644
--- a/config/cmake_ext_mod/grepTest.cmake
+++ b/config/cmake_ext_mod/grepTest.cmake
@@ -16,18 +16,12 @@
if (NOT TEST_PROGRAM)
message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
endif ()
-#if (NOT TEST_ARGS)
-# message (STATUS "Require TEST_ARGS to be defined")
-#endif ()
if (NOT TEST_FOLDER)
message (FATAL_ERROR "Require TEST_FOLDER to be defined")
endif ()
if (NOT TEST_OUTPUT)
message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
endif ()
-#if (NOT TEST_EXPECT)
-# message (STATUS "Require TEST_EXPECT to be defined")
-#endif ()
if (NOT TEST_FILTER)
message (STATUS "Optional TEST_FILTER to be defined")
endif ()
@@ -55,7 +49,9 @@ endif ()
if (TEST_ENV_VAR)
set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
- #message (STATUS "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (TRACE "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}")
+ endif ()
endif ()
# run the test program, capture the stdout/stderr and the result var
diff --git a/config/commence.am b/config/commence.am
index 731ad43..385da06 100644
--- a/config/commence.am
+++ b/config/commence.am
@@ -43,15 +43,15 @@ LIBH5CPP_HL=$(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
# Install directories that automake doesn't know about
docdir = $(exec_prefix)/doc
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -61,17 +61,17 @@ H5CC_PP=${DESTDIR}$(bindir)/h5pcc
H5FC=${DESTDIR}$(bindir)/h5fc
H5FC_PP=${DESTDIR}$(bindir)/h5pfc
H5CPP=${DESTDIR}$(bindir)/h5c++
-
+
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS=@AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
+AM_CFLAGS=@AM_CFLAGS@ @H5_CFLAGS@
AM_FCFLAGS=@AM_FCFLAGS@ @H5_FCFLAGS@
-AM_CXXFLAGS=@AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
+AM_CXXFLAGS=@AM_CXXFLAGS@ @H5_CXXFLAGS@
AM_CPPFLAGS=@AM_CPPFLAGS@ @H5_CPPFLAGS@
AM_LDFLAGS=@AM_LDFLAGS@ @H5_LDFLAGS@
@@ -95,8 +95,9 @@ CHECK_CLEANFILES=*.chkexe *.chklog *.clog *.clog2
# commands that should be executed even if a file with the same name already
# exists.
.PHONY: build-check-clean build-check-p build-check-s build-lib build-progs \
- build-tests check-clean check-install check-p check-s check-vfd \
- install-doc lib progs tests uninstall-doc _exec_check-s _test help
+ build-tests check-clean check-install check-p check-s check-vfd \
+ install-doc lib progs tests uninstall-doc \
+ _exec_check-s _test help
help:
@$(top_srcdir)/bin/makehelp
diff --git a/config/conclude.am b/config/conclude.am
index 2abc6e3..8412057 100644
--- a/config/conclude.am
+++ b/config/conclude.am
@@ -25,8 +25,8 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
$(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB)
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
-TESTS = $(TEST_PROG) $(TEST_SCRIPT) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+TESTS = $(TEST_PROG) $(TEST_SCRIPT) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
@@ -183,7 +183,7 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
fi; \
fi; \
fi
-
+
# The dummysh.chkexe here prevents the target from being
# empty if there are no tests in the current directory.
# $${log} is the log file.
diff --git a/config/examples.am b/config/examples.am
index 1cdee34..03108ef 100644
--- a/config/examples.am
+++ b/config/examples.am
@@ -33,7 +33,7 @@
## INSTALL_TOP_FILES
##
## EXAMPLEDIR
-## The directory into which examples should be installed.
+## The directory into which examples should be installed.
##
## Build rules for $(EXTRA_PROG).
## Dependencies for example programs.
@@ -62,7 +62,7 @@ install-data-local:
uninstall-local:
@$(MAKE) $(AM_MAKEFLAGS) uninstall-examples
-install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
+install-examples: $(EXAMPLEDIR) $(INSTALL_FILES)
@for f in X $(INSTALL_FILES); do \
if test $$f != X; then \
(set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \
@@ -109,7 +109,7 @@ installcheck-local:
H5CCFLAGS="-shlib" $(MAKE) $(AM_MAKEFLAGS) check; \
else \
$(MAKE) $(AM_MAKEFLAGS) check; \
- fi
+ fi
@if test "$(INSTALL_FILES)" -a $(TEST_EXAMPLES_SCRIPT) -a -d $(EXAMPLEDIR); then \
echo "============================"; \
echo "Testing $(TEST_EXAMPLES_SCRIPT)"; \
diff --git a/config/freebsd b/config/freebsd
index 5ac3de5..7f25ba8 100644
--- a/config/freebsd
+++ b/config/freebsd
@@ -18,24 +18,31 @@
#
# See BlankForm in this directory for details.
-# The default compiler is `gcc'
+# The default compiler is 'cc'
if test "X-" = "X-$CC"; then
- CC=gcc
- CC_BASENAME=gcc
+ CC=cc
+ CC_BASENAME=cc
fi
-# Figure out C compiler flags
+# Figure out clang C compiler flags
+. $srcdir/config/clang-flags
+
+# Figure out GNU C compiler flags
. $srcdir/config/gnu-flags
# Figure out Intel C compiler flags
. $srcdir/config/intel-flags
# The default Fortran 90 compiler
+# No default Fortran compiler for clang. flang exists on
+# FreeBSD as a port, but this is tied to an ancient LLVM
+# and lacks Fortran 2003 features which causes configure
+# to fail.
if test "X-" = "X-$FC"; then
case $CC_BASENAME in
gcc*|pgcc*)
- FC=gfortran40
- FC_BASENAME=gfortran40
+ FC=gfortran
+ FC_BASENAME=gfortran
;;
icc*)
FC=ifort
@@ -54,3 +61,16 @@ fi
# Figure out Intel F90 compiler flags
. $srcdir/config/intel-fflags
+# The default C++ compiler
+
+# The default compiler is 'c++'.
+if test -z "$CXX"; then
+ CXX=c++
+ CXX_BASENAME=c++
+fi
+
+# Figure out Clang CXX compiler flags
+. $srcdir/config/clang-cxxflags
+
+# Figure out GNU CXX compiler flags
+. $srcdir/config/gnu-cxxflags
diff --git a/config/gnu-cxxflags b/config/gnu-cxxflags
index b8cac77..3fe13d8 100644
--- a/config/gnu-cxxflags
+++ b/config/gnu-cxxflags
@@ -144,6 +144,15 @@ if test "X-g++" = "X-$cxx_vendor"; then
DEBUG_CXXFLAGS="-ftrapv -fno-common"
fi
+ ########################
+ # Enhanced Diagnostics #
+ ########################
+
+ if test $cc_vers_major -ge 10; then
+ NO_DIAGS_CXXFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color"
+ fi
+ DIAGS_CXXFLAGS=
+
###########
# Symbols #
###########
@@ -184,10 +193,11 @@ if test "X-g++" = "X-$cxx_vendor"; then
if test $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8 -o $cxx_vers_major -ge 5; then
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-general)"
H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments cxx-error-general)"
+ H5_NECXXFLAGS="$H5_NECXXFLAGS $(load_gnu_arguments cxx-noerror-general)"
- ######################
- # Developer warnings #
- ######################
+ ######################
+ # Developer warnings #
+ ######################
NO_DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments no-developer-general)
DEVELOPER_WARNING_CXXFLAGS=$(load_gnu_arguments developer-general)
@@ -209,7 +219,7 @@ if test "X-g++" = "X-$cxx_vendor"; then
# gcc >= 4.8
if test $cxx_vers_major -ge 5 -o $cxx_vers_major -eq 4 -a $cxx_vers_minor -ge 8; then
- H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 4.8)"
+ H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-4.8)"
DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-4.8)"
NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-4.8)"
fi
@@ -224,6 +234,7 @@ if test "X-g++" = "X-$cxx_vendor"; then
if test $cxx_vers_major -ge 5; then
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments cxx-5)"
H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments cxx-error-5)"
+ H5_NECXXFLAGS="$H5_NECXXFLAGS $(load_gnu_arguments cxx-noerror-5)"
fi
# gcc >= 6
@@ -241,6 +252,7 @@ if test "X-g++" = "X-$cxx_vendor"; then
if test $cxx_vers_major -ge 8; then
H5_CXXFLAGS="$H5_CXXFLAGS $(load_gnu_arguments 8)"
#H5_ECXXFLAGS="$H5_ECXXFLAGS $(load_gnu_arguments error-8)"
+ #H5_NECXXFLAGS="$H5_NECXXFLAGS $(load_gnu_arguments noerror-8)"
DEVELOPER_WARNING_CXXFLAGS="$DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments developer-8)"
NO_DEVELOPER_WARNING_CXXFLAGS="$NO_DEVELOPER_WARNING_CXXFLAGS $(load_gnu_arguments no-developer-8)"
fi
diff --git a/config/gnu-fflags b/config/gnu-fflags
index 09c96ce..d4f876d 100644
--- a/config/gnu-fflags
+++ b/config/gnu-fflags
@@ -100,11 +100,20 @@ if test "X-gfortran" = "X-$f9x_vendor"; then
#########
if test $f9x_vers_major -ge 5 -o $f9x_vers_major -eq 4 -a $f9x_vers_minor -ge 5; then
- DEBUG_FCFLAGS=$DEBUG_OPT_FCFLAGS "-fcheck=all"
+ DEBUG_FCFLAGS="-fcheck=all"
else
- DEBUG_FCFLAGS=$DEBUG_OPT_FCFLAGS "-fbounds-check"
+ DEBUG_FCFLAGS="-fbounds-check"
fi
+ ########################
+ # Enhanced Diagnostics #
+ ########################
+
+ if test $cc_vers_major -ge 10; then
+ NO_DIAGS_FCFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color"
+ fi
+ DIAGS_FCFLAGS=
+
###########
# Symbols #
###########
diff --git a/config/gnu-flags b/config/gnu-flags
index ee570c5..01533de 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -118,12 +118,16 @@ if test "X-gcc" = "X-$cc_vendor"; then
esac
case "$host_os-$host_cpu" in
- # cygwin needs the "-std=c99" flag removed, so make
- # a specific case for Cygwin without the flag and a default
- # case to add the flag everywhere else
+ # Cygwin needs the "-std=c99" flag removed.
cygwin-*)
;;
-
+ # On Solaris, gcc needs the gnu99 standard to pick up certain POSIX
+ # things. Do NOT use this as the gcc norm as this encourages the use
+ # of non-standard gcc extensions.
+ *solaris*)
+ H5_CFLAGS="$H5_CFLAGS -std=gnu99"
+ ;;
+ # Everybody else gets c99 as the standard.
*)
H5_CFLAGS="$H5_CFLAGS -std=c99"
;;
@@ -154,6 +158,15 @@ if test "X-gcc" = "X-$cc_vendor"; then
DEBUG_CFLAGS="-ftrapv -fno-common"
fi
+ ########################
+ # Enhanced Diagnostics #
+ ########################
+
+ if test $cc_vers_major -ge 10; then
+ NO_DIAGS_CFLAGS="-fdiagnostics-urls=never -fno-diagnostics-color"
+ fi
+ DIAGS_CFLAGS=
+
###########
# Symbols #
###########
@@ -192,6 +205,7 @@ if test "X-gcc" = "X-$cc_vendor"; then
if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 8 -o $cc_vers_major -gt 4; then
H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments general)"
H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-general)"
+ H5_NECFLAGS="$H5_NECFLAGS $(load_gnu_arguments noerror-general)"
######################
# Developer warnings #
@@ -231,6 +245,7 @@ if test "X-gcc" = "X-$cc_vendor"; then
if test $cc_vers_major -ge 5; then
H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 5)"
H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-5)"
+ H5_NECFLAGS="$H5_NECFLAGS $(load_gnu_arguments noerror-5)"
fi
# gcc >= 6
@@ -248,6 +263,7 @@ if test "X-gcc" = "X-$cc_vendor"; then
if test $cc_vers_major -ge 8; then
H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 8)"
H5_ECFLAGS="$H5_ECFLAGS $(load_gnu_arguments error-8)"
+ H5_NECFLAGS="$H5_NECFLAGS $(load_gnu_arguments noerror-8)"
DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-8)"
NO_DEVELOPER_WARNING_CFLAGS="$NO_DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments no-developer-8)"
fi
@@ -257,6 +273,16 @@ if test "X-gcc" = "X-$cc_vendor"; then
H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 9)"
fi
+ # gcc >= 9.3
+ if test $cc_vers_major -ge 10 -o $cc_vers_major -eq 9 -a $cc_vers_minor -ge 3; then
+ H5_CFLAGS="$H5_CFLAGS $(load_gnu_arguments 9.3)"
+ fi
+
+ # gcc >= 10
+ if test $cc_vers_major -ge 10; then
+ DEVELOPER_WARNING_CFLAGS="$DEVELOPER_WARNING_CFLAGS $(load_gnu_arguments developer-10)"
+ fi
+
#################
# Flags are set #
#################
diff --git a/config/gnu-warnings/4.8 b/config/gnu-warnings/4.8
index c7e3dd1..fa678ff 100644
--- a/config/gnu-warnings/4.8
+++ b/config/gnu-warnings/4.8
@@ -10,6 +10,10 @@
# 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
+
# warning flags added for GCC >= 4.6
-Wdouble-promotion
-Wtrampolines
diff --git a/config/gnu-warnings/7 b/config/gnu-warnings/7
index 266f5c1..9d5b44d 100644
--- a/config/gnu-warnings/7
+++ b/config/gnu-warnings/7
@@ -3,5 +3,4 @@
-Wduplicated-branches
-Wformat-overflow=2
-Wformat-truncation=1
--Wimplicit-fallthrough=5
-Wrestrict
diff --git a/config/gnu-warnings/9.3 b/config/gnu-warnings/9.3
new file mode 100644
index 0000000..f37fdd6
--- /dev/null
+++ b/config/gnu-warnings/9.3
@@ -0,0 +1 @@
+-Wc11-c2x-compat
diff --git a/config/gnu-warnings/cxx-4.8 b/config/gnu-warnings/cxx-4.8
new file mode 100644
index 0000000..744ebdc
--- /dev/null
+++ b/config/gnu-warnings/cxx-4.8
@@ -0,0 +1,26 @@
+# warning flags added for GCC >= 4.3
+-Wlarger-than=2560
+-Wlogical-op
+
+# warning flags added for GCC >= 4.4
+-Wframe-larger-than=16384
+-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
+-Wmaybe-uninitialized
+
diff --git a/config/gnu-warnings/cxx-noerror-5 b/config/gnu-warnings/cxx-noerror-5
new file mode 100644
index 0000000..7bce3e8
--- /dev/null
+++ b/config/gnu-warnings/cxx-noerror-5
@@ -0,0 +1,11 @@
+#
+# In GCC 4.4.7, the compiler gripes about shadowed global
+# declarations when a local variable uses the name of a
+# function that's in a system header file. For some reason,
+# later versions of GCC (e.g., 5.2.0) don't complain about
+# the shadowed globals. Maybe later versions are less fussy?
+# Anyway, the shadowing seems to be harmless, and GCC 4.4.7
+# is not a supported compiler, so let us promote shadowed globals
+# warnings to errors only for GCC 5 and later.
+#
+-Wshadow
diff --git a/config/gnu-warnings/cxx-noerror-general b/config/gnu-warnings/cxx-noerror-general
new file mode 100644
index 0000000..8cc1d94
--- /dev/null
+++ b/config/gnu-warnings/cxx-noerror-general
@@ -0,0 +1,32 @@
+#
+# HDF5 code should not trigger the following warnings under any
+# circumstances, so ask the compiler to treat them as errors:
+#
+# NOTE: c++/test files are not compatible with these warnings as errors
+# c++/test/tcompound.cpp
+# -Werror=cast-align
+-Wcast-align
+# NOTE: c++/src files are not compatible with these warnings as errors
+# c++/src/H5Object.cpp
+# -Werror=missing-declarations
+-Wmissing-declarations
+-Wpacked
+-Wredundant-decls
+-Wswitch
+# NOTE: c++/test files are not compatible with these warnings as errors
+# c++/test/tattr.cpp
+# -Werror=unused-but-set-variable
+-Wunused-but-set-variable
+-Wunused-function
+-Wunused-variable
+# NOTE: c++/src files are not compatible with these warnings as errors
+# c++/src/H5Object.cpp,c++/src/H5StrType.cpp,c++/src/H5PredType.cpp
+# -Werror=unused-parameter
+-Wunused-parameter
+#
+# Other files not compatible
+# NOTE: c++/test files are not compatible with these warnings as errors
+# c++/test/titerate.cpp,c++/test/tarray.cpp
+# -Werror=missing-declarations
+# c++/test/titerate.cpp,c++/test/tarray.cpp,c++/test/tlinks.cpp,c++/test/ttypes.cpp,c++/test/dsets.cpp
+# -Werror=unused-parameter
diff --git a/config/gnu-warnings/developer-10 b/config/gnu-warnings/developer-10
new file mode 100644
index 0000000..fcd460d
--- /dev/null
+++ b/config/gnu-warnings/developer-10
@@ -0,0 +1,6 @@
+# New warning
+-Warith-conversion
+
+# Enable static analysis of program flow
+-fanalyzer
+-fdiagnostics-path-format=none
diff --git a/config/gnu-warnings/developer-4.8 b/config/gnu-warnings/developer-4.8
index fd76f6c..bfd15a1 100644
--- a/config/gnu-warnings/developer-4.8
+++ b/config/gnu-warnings/developer-4.8
@@ -5,7 +5,6 @@
# the variable is never *used* before it has been initialized?
#
-Wjump-misses-init
--Wunsuffixed-float-constants
# developer warning flag added for GCC >= 4.6
-Wsuggest-attribute=const
diff --git a/config/gnu-warnings/error-general b/config/gnu-warnings/error-general
index 4b822a5..4358b20 100644
--- a/config/gnu-warnings/error-general
+++ b/config/gnu-warnings/error-general
@@ -12,15 +12,12 @@
-Werror=packed
-Werror=pointer-sign
-Werror=pointer-to-int-cast
+-Werror=redundant-decls
-Werror=strict-prototypes
-Werror=switch
#
#-Werror=discarded-qualifiers
#
-# NOTE: hl/src/H5LTparse.c file is not compatible with these warnings as errors
-# -Werror=redundant-decls
-#
--Wredundant-decls
#
# NOTE: File Driver files are not compatible with these warnings as errors
# H5FDdirect.c,H5FDmpio.c,H5FDros3.c,
@@ -62,7 +59,7 @@
# jni/h5util.c
# -Werror=format(-overflow)
#
--Wformat
+-Werror=format
#
#
#Examples and tests do not use the same set of extensive warning flags as libraries
diff --git a/config/gnu-warnings/no-developer-4.8 b/config/gnu-warnings/no-developer-4.8
index 1e29c78..09a9a96 100644
--- a/config/gnu-warnings/no-developer-4.8
+++ b/config/gnu-warnings/no-developer-4.8
@@ -1,6 +1,5 @@
# no-developer warning flag added for GCC >= 4.5
-Wno-jump-misses-init
--Wno-unsuffixed-float-constants
# no-developer warning flag added for GCC >= 4.6
-Wno-suggest-attribute=const
diff --git a/config/gnu-warnings/noerror-5 b/config/gnu-warnings/noerror-5
new file mode 100644
index 0000000..a7d40dd
--- /dev/null
+++ b/config/gnu-warnings/noerror-5
@@ -0,0 +1,12 @@
+-Wincompatible-pointer-types
+#
+# In GCC 4.4.7, the compiler gripes about shadowed global
+# declarations when a local variable uses the name of a
+# function that's in a system header file. For some reason,
+# later versions of GCC (e.g., 5.2.0) don't complain about
+# the shadowed globals. Maybe later versions are less fussy?
+# Anyway, the shadowing seems to be harmless, and GCC 4.4.7
+# is not a supported compiler, so let us promote shadowed globals
+# warnings to errors only for GCC 5 and later.
+#
+-Wshadow
diff --git a/config/gnu-warnings/noerror-8 b/config/gnu-warnings/noerror-8
new file mode 100644
index 0000000..2f54a4d
--- /dev/null
+++ b/config/gnu-warnings/noerror-8
@@ -0,0 +1,25 @@
+# NOTE: src/ files are not compatible with these warnings as errors
+# src/H5Dchunk.c
+# -Werror=cast-function-type
+-Wcast-function-type
+#
+# For GCC 8, promote maybe-initialized warnings to an error. GCC 8
+# reports 0 maybe-uninitialized warnings where earlier versions
+# make many false reports. GCC 8 seems to analyze calls to static
+# 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
diff --git a/config/gnu-warnings/noerror-general b/config/gnu-warnings/noerror-general
new file mode 100644
index 0000000..e19014f
--- /dev/null
+++ b/config/gnu-warnings/noerror-general
@@ -0,0 +1,91 @@
+#
+# HDF5 code should not trigger the following warnings under any
+# circumstances, so ask the compiler to treat them as errors:
+#
+-Wbad-function-cast
+-Wdeclaration-after-statement
+-Wimplicit-function-declaration
+-Wmissing-declarations
+-Wmissing-prototypes
+-Wnested-externs
+-Wold-style-definition
+-Wpacked
+-Wpointer-sign
+-Wpointer-to-int-cast
+-Wredundant-decls
+-Wstrict-prototypes
+-Wswitch
+#
+#-Werror=discarded-qualifiers
+#
+#
+# NOTE: File Driver files are not compatible with these warnings as errors
+# H5FDdirect.c,H5FDmpio.c,H5FDros3.c,
+# -Werror=unused-function
+#
+-Wunused-function
+#
+# H5FDdrvr_module.h
+# -Werror=unused-variable
+#
+-Wunused-variable
+#
+# H5VLpassthru.c
+# -Werror=unused-parameter
+#
+-Wunused-parameter
+#
+#
+#
+# NOTE: Tools files are not compatible with these warnings as errors
+# lib/h5tools.c
+# -Werror=cast-align
+#
+-Wcast-align
+#
+# lib/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)
+#
+-Wformat
+#
+#
+#Examples and tests do not use the same set of extensive warning flags as libraries
+# Here is a list of tests and examples that have issues with the stricter warnings as error
+#
+# NOTE: Test files are not compatible with these warnings as errors
+# thread_id.c,
+# -Werror=unused-function
+# dsets.c
+# -Werror=unused-parameter
+# external.c,perform/sio_engine.c
+# -Werror=format(-truncation)
+#
+#
+# NOTE: Examples files are not compatible with these warnings as errors
+# h5_vds-eiger.c,h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,h5_vds-percival-unlim-maxmin.c
+# h5_vds-percival.c,h5_read.c,h5_rdwt.c,h5_mount.c,h5_extend.c,h5_extend_write.c
+# h5_write.c,h5_vds-simpleIO.c,h5_ref2reg_deprec.c,h5_crtgrp.c,h5_select.c
+# h5_vds-percival-unlim.c,h5_crtatt.c,h5_group.c,h5_attribute.c,h5_crtdat.c
+# h5_reference_deprec.c
+# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c
+# -Werror=strict-prototypes
+# h5_rdwt.c,h5_crtgrp.c,h5_crtatt.c,h5_crtdat.c
+# -Werror=old-style-definition
+# h5_vds-exclim.c,h5_vds.c,h5_vds-exc.c,
+# -Werror=unused-variable
+# h5_elink_unix2win.c,h5_extlink.c,h5_attribute.c
+# -Werror=unused-parameter
+
diff --git a/config/ibm-aix b/config/ibm-aix
index c046b83..b4a558d 100644
--- a/config/ibm-aix
+++ b/config/ibm-aix
@@ -57,9 +57,25 @@ if test "X-" = "X-$f9x_flags_set"; then
FCFLAGS="$FCFLAGS ${F9XSUFFIXFLAG}"
H5_FCFLAGS="$H5_FCFLAGS ${F9XSUFFIXFLAG}"
FSEARCH_DIRS="-I./ -I../src"
- DEBUG_FCFLAGS="-g"
- PROD_FCFLAGS="-O"
- PROFILE_FCFLAGS="-g -pg"
+
+ # Produciton
+ PROD_FCFLAGS=
+
+ # Debug
+ DEBUG_FCFLAGS=
+
+ # Symbols
+ SYMBOLS_FCFLAGS="-g"
+ NO_SYMBOLS_FCFLAGS=
+
+ # Profiling
+ PROFILE_FCFLAGS="-pg"
+
+ # Optimization
+ HIGH_OPT_FCFLAGS="-O"
+ DEBUG_OPT_FCFLAGS=
+ NO_OPT_FCFLAGS=
+
f9x_flags_set=yes
fi
@@ -89,13 +105,30 @@ case $CC_BASENAME in
;;
*)
+ # Undetermined compiler
+ # Use very generic flags
H5_CFLAGS="$H5_CFLAGS -ansi"
- DEBUG_CFLAGS="-g"
- DEBUG_CPPFLAGS=
- PROD_CFLAGS="-O"
- PROD_CPPFLAGS=
+
+ # Produciton
+ PROD_CFLAGS=
+
+ # Debug
+ DEBUG_CFLAGS=
+
+ # Symbols
+ SYMBOLS_CFLAGS="-g"
+ NO_SYMBOLS_CFLAGS=
+
+ # Profiling
PROFILE_CFLAGS="-pg"
- PROFILE_CPPFLAGS=
+
+ # Optimization
+ HIGH_OPT_CFLAGS="-O"
+ DEBUG_OPT_CFLAGS=
+ NO_OPT_CFLAGS=
+
+ # Flags are set
+ cc_flags_set=yes
;;
esac
diff --git a/config/ibm-flags b/config/ibm-flags
index 5c12b79..85fdb88 100644
--- a/config/ibm-flags
+++ b/config/ibm-flags
@@ -55,17 +55,32 @@ if test "XL" = "$cc_vendor"; then
enable_shared="${enable_shared:-no}"
# Make sure this is applied to other API compile options such as C++.
AM_CFLAGS="$AM_CFLAGS"
+
# -qflag=w:w makes the lowest level of reported compile issues to be "warning"
# instead of "information". This suppresses a very large number of messages
# concerning the portability of __inline__.
H5_CFLAGS="-qlanglvl=stdc99 -qflag=w:w $H5_CFLAGS"
- DEBUG_CFLAGS="-g -qfullpath"
- DEBUG_CPPFLAGS=
+
+ # Produciton
+ PROD_CFLAGS=
+
+ # Debug
+ # NDEBUG is handled explicitly in configure
+ DEBUG_CFLAGS="-qfullpath"
+
+ # Symbols
+ SYMBOLS_CFLAGS="-g"
+ NO_SYMBOLS_CFLAGS=
+
+ # Profiling
+ PROFILE_CFLAGS="-pg"
+
+ # Optimization
# -O causes test/dtypes to fail badly. Turn it off for now.
- PROD_CFLAGS=""
- PROD_CPPFLAGS=
- PROFILE_CFLAGS="-g -qfullpath -pg"
- PROFILE_CPPFLAGS=
+ HIGH_OPT_CFLAGS=
+ DEBUG_OPT_CFLAGS=
+ NO_OPT_CFLAGS=
+
# Flags are set
cc_flags_set=yes
fi
@@ -104,3 +119,4 @@ if test X != X$CXX; then
fi
fi
+
diff --git a/config/cmake/libhdf5.pc.in b/config/libhdf5.pc.in
index 4a2ebaa..4a2ebaa 100644
--- a/config/cmake/libhdf5.pc.in
+++ b/config/libhdf5.pc.in
diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1
index a02b08a..0fef161 100644
--- a/config/linux-gnulibc1
+++ b/config/linux-gnulibc1
@@ -136,9 +136,25 @@ case $FC_BASENAME in
# (just in case since this should be a default EIP)
H5_FCFLAGS="$H5_FCFLAGS"
FSEARCH_DIRS=""
- DEBUG_FCFLAGS="-g"
- PROD_FCFLAGS="-O"
- PROFILE_FCFLAGS="-g -pg"
+
+ # Production
+ PROD_FCFLAGS=
+
+ # Debug
+ DEBUG_FCFLAGS=
+
+ # Symbols
+ SYMBOLS_FCFLAGS="-g"
+ NO_SYMBOLS_FCFLAGS="-s"
+
+ # Profiling
+ PROFILE_FCFLAGS="-pg"
+
+ # Optimization
+ HIGH_OPT_FCFLAGS="-O"
+ DEBUG_OPT_FCFLAGS=
+ NO_OPT_FCFLAGS=
+
f9x_flags_set=yes
;;
#
diff --git a/config/pgi-fflags b/config/pgi-fflags
index 3e5529d..3171695 100644
--- a/config/pgi-fflags
+++ b/config/pgi-fflags
@@ -67,6 +67,7 @@ if test "X-pgf90" = "X-$f9x_vendor"; then
# General
FC_BASENAME=pgf90
+ Fortran_COMPILER_ID=PGI
F9XSUFFIXFLAG=""
FSEARCH_DIRS=""
# Uncomment the following to add something specific for FCFLAGS.
@@ -81,15 +82,24 @@ if test "X-pgf90" = "X-$f9x_vendor"; then
#else
# PROD_FCFLAGS="-O2 -s"
#fi
- PROD_FCFLAGS="-fast -s -Mnoframe"
+ PROD_FCFLAGS="-fast -Mnoframe"
# Debug
- DEBUG_FCFLAGS="-g -Mbounds -Mchkptr -Mdclchk"
+ DEBUG_FCFLAGS="-Mbounds -Mchkptr -Mdclchk"
- # Profile
- PROFILE_FCFLAGS="-g -Mprof=func,line"
+ # Symbols
+ SYMBOLS_FCFLAGS="-g"
+ NO_SYMBOLS_FCFLAGS="-s"
+
+ # Profiling
+ PROFILE_FCFLAGS="-Mprof=func,line"
# Use this for profiling with gprof
- #PROFILE_FCFLAGS="-g -pg"
+ #PROFILE_FCFLAGS="-pg"
+
+ # Optimization
+ HIGH_OPT_FCFLAGS=
+ DEBUG_OPT_FCFLAGS=
+ NO_OPT_FCFLAGS=
# Flags are set
f9x_flags_set=yes
diff --git a/config/pgi-flags b/config/pgi-flags
index b426558..e1bec00 100644
--- a/config/pgi-flags
+++ b/config/pgi-flags
@@ -70,33 +70,49 @@ if test "X-pgcc" = "X-$cc_vendor"; then
# Production
case "$cc_vendor-$cc_version" in
- # Tweak down compiler optimizations for v10.6, it has a bug
pgcc-10.6*)
- PROD_CFLAGS="-O1 -s"
+ PROD_CFLAGS=
;;
- # Tweak down compiler optimizations for v9.x
pgcc-9.*)
- PROD_CFLAGS="-O1 -s"
+ PROD_CFLAGS=
;;
*)
- PROD_CFLAGS="-fast -s"
+ PROD_CFLAGS="-fast"
;;
esac
- PROD_CPPFLAGS=
# Debug
- DEBUG_CFLAGS="-g -Mbounds"
- DEBUG_CPPFLAGS=
+ # NDEBUG is handled explicitly by the configure script
+ DEBUG_CFLAGS="-Mbounds"
- # Profile
- PROFILE_CFLAGS="-g -Mprof=func,line"
+ # Symbols
+ SYMBOLS_CFLAGS="-g"
+ NO_SYMBOLS_CFLAGS="-s"
+
+ # Profiling
+ PROFILE_CFLAGS="-Mprof=func,line"
# Use this for profiling with gprof
- #PROFILE_CFLAGS="-g -pg"
- PROFILE_CPPFLAGS=
+ #PROFILE_CFLAGS="-pg"
+
+ # Optimization
+ case "$cc_vendor-$cc_version" in
+ # Tweak down compiler optimizations for v10.6, it has a bug
+ pgcc-10.6*)
+ HIGH_OPT_CFLAGS="-O1"
+ ;;
+ # Tweak down compiler optimizations for v9.x
+ pgcc-9.*)
+ HIGH_OPT_CFLAGS="-O1"
+ ;;
+ *)
+ HIGH_OPT_CFLAGS=
+ ;;
+ esac
+ DEBUG_OPT_CFLAGS=
+ NO_OPT_CFLAGS=
# Flags are set
cc_flags_set=yes
-
fi
# Clear cc info if no flags set
diff --git a/config/solaris b/config/solaris
index 1b63f42..b7c7963 100644
--- a/config/solaris
+++ b/config/solaris
@@ -29,17 +29,44 @@ fi
# Try solaris native compiler flags
if test "X-" = "X-$cc_flags_set"; then
- H5_CFLAGS="$H5_CFLAGS -erroff=%none -DBSD_COMP"
- # -g produces rather slow code. "-g -O" produces much faster code with some
- # loss of debugger functions such as not able to print local variables.
- DEBUG_CFLAGS="-g -O"
- DEBUG_CPPFLAGS=
- PROD_CFLAGS="-O -s"
- PROD_CPPFLAGS=
- PROFILE_CFLAGS=-xpg
- PROFILE_CPPFLAGS=
+ # HDF5 must be built with a C99 compiler on Solaris
+ # -erroff=%none turns on all warnings
+ H5_CFLAGS="$H5_CFLAGS -xc99=all -erroff=%none"
+
+ # Production
+ # NDEBUG is handled explicitly by the configure script
+ PROD_CFLAGS=
+
+ # Debug
+ # NDEBUG is handled explicitly by the configure script
+ # -g is hanled by the symbols flags
+ DEBUG_CFLAGS=
+
+ # Symbols
+ # -g produces output for dbx, NOT gdb. You can use "gdb on" from
+ # inside gdb to use gdb commands if you need to debug.
+ # If you want a LOT of debugging information (at the expense of
+ # really slow code), try using -g3. That will even let you debug
+ # into macros.
+ # -s strips symbols, as in gcc
+ NO_SYMBOLS_CFLAGS="-s"
+ SYMBOLS_CFLAGS="-g"
+
+ # Profile
+ # This produces profiling output for gprof. If you want to use
+ # the Solaris profiler, use -xprofile instead.
+ PROFILE_CFLAGS="-xpg"
+
+ # Optimization
+ # -O has switched to -xO{1|2|3|4|5}. -xO3 is probably a good compromise
+ # for the daily tests, but you might want to switch to -xO2 or lower
+ # if you are actively debugging.
+ HIGH_OPT_CFLAGS="-xO5"
+ DEBUG_OPT_CFLAGS="-xO3"
+ NO_OPT_CFLAGS=
+
cc_flags_set=yes
-# Special linking flag is needed to build with Fortran on Solaris 5.9
+ # Special linking flag is needed to build with Fortran on Solaris 5.9
system_version="`uname -r`"
case "$system_version" in
5.9*)
@@ -50,10 +77,6 @@ if test "X-" = "X-$cc_flags_set"; then
;;
esac
- # Turn off optimization flag for SUNpro compiler versions 4.x which
- # have an optimization bug. Version 5.0 works.
- ($CC -V 2>&1) | grep -s 'cc: .* C 4\.' >/dev/null 2>&1 \
- && PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O//'`"
fi
LIBS="$LIBS"
@@ -69,11 +92,32 @@ if test "X-" = "X-$f9x_flags_set"; then
FSEARCH_DIRS=""
H5_FCFLAGS="$H5_FCFLAGS"
+
+ # TODO: Revisit these flags.
+
+ # Production
+ # NDEBUG is handled explicitly by the configure script
+ PROD_FCFLAGS=
+
+ # Debug
+ # NDEBUG is handled explicitly by the configure script
+ # -g is hanled by the symbols flags
+ DEBUG_FCFLAGS=
+
+ # Symbols
+ NO_SYMBOLS_FCFLAGS=
+ SYMBOLS_FCFLAGS="-g"
+
+ # Profile
+ PROFILE_FCFLAGS=
+
+ # Optimization
# -g produces rather slow code. "-g -O" produces much faster code with some
# loss of debugger functions such as not able to print local variables.
- DEBUG_FCFLAGS="-g -O"
- PROD_FCFLAGS="-O2"
- PROFILE_FCFLAGS=""
+ HIGH_OPT_FCFLAGS="-O2"
+ DEBUG_OPT_FCFLAGS="-O"
+ NO_OPT_FCFLAGS=
+
f9x_flags_set=yes
fi
@@ -106,14 +150,30 @@ fi
if test -z "$cxx_flags_set"; then
H5_CXXFLAGS="$H5_CXXFLAGS -instances=static"
H5_CPPFLAGS="$H5_CPPFLAGS -LANG:std"
+
+ # Production
+ # NDEBUG is handled explicitly by the configure script
+ PROD_CXXFLAGS=
+
+ # Debug
+ # NDEBUG is handled explicitly by the configure script
+ # -g is hanled by the symbols flags
+ DEBUG_CXXFLAGS=
+
+ # Symbols
+ NO_SYMBOLS_CXXFLAGS="-s"
+ SYMBOLS_CXXFLAGS="-g"
+
+ # Profile
+ PROFILE_CXXFLAGS="-xpg"
+
+ # Optimization
# -g produces rather slow code. "-g -O" produces much faster code with some
# loss of debugger functions such as not able to print local variables.
- DEBUG_CXXFLAGS="-g -O"
- DEBUG_CPPFLAGS=
- PROD_CXXFLAGS="-O -s"
- PROD_CPPFLAGS=
- PROFILE_CXXFLAGS=-xpg
- PROFILE_CPPFLAGS=
+ HIGH_OPT_CXXFLAGS="-O"
+ DEBUG_OPT_CXXFLAGS="-O"
+ NO_OPT_CXXFLAGS=
+
cxx_flags_set=yes
fi
@@ -155,4 +215,3 @@ case $CXX in
;;
esac
-