diff options
author | Quincey Koziol <quincey@koziol.cc> | 2023-12-29 14:42:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-29 14:42:35 (GMT) |
commit | 3a21ee0877ecea5593112b7c8370cb8571a7e627 (patch) | |
tree | 6a1cde6a6027859601d28375ba299e4556be25d5 /configure.ac | |
parent | 6ffc55c6d9c1f3a30e4db1bc71c452c50952ee85 (diff) | |
download | hdf5-3a21ee0877ecea5593112b7c8370cb8571a7e627.zip hdf5-3a21ee0877ecea5593112b7c8370cb8571a7e627.tar.gz hdf5-3a21ee0877ecea5593112b7c8370cb8571a7e627.tar.bz2 |
Add 'warning density' computation to the warnhist script (#3910)
* Add 'warning density' computation to the warnhist script, along with several
cleanups to it. Add "--enable-show-all-warnings" configure (and CMake)
option to disable compiler diagnostic suppression (and therefore show all the
otherwise suppressed compiler diagnostics), disabled by default. Clean up
a buncn of misc. warnings.
Signed-off-by: Quincey Koziol <qkoziol@amazon.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 689ab3d..650ee1d 100644 --- a/configure.ac +++ b/configure.ac @@ -2312,6 +2312,45 @@ case "X-$DEV_WARNINGS" in esac ## ---------------------------------------------------------------------- +## Check if they would like suppessed compiler diagnostics displayed +## (i.e. not suppressed) +## +## NOTE: Compiler diagnostics (i.e. warnings) are suppressed for some +## "noisy" warnings that are harmless (in the opinion of the primary +## HDF5 development team), but this option is provided to allow +## developers to see those warnings. +## +AC_MSG_CHECKING([whether showing all compiler warnings is enabled]) +AC_ARG_ENABLE([show-all-warnings], + [AS_HELP_STRING([--enable-show-all-warnings], + [Enable showing all compiler warnings (for developer debugging). + [default=no] + ])], + [SHOW_ALL_WARNINGS=$enableval]) + +## Set the default level. +if test "X-$SHOW_ALL_WARNINGS" = X- ; then + SHOW_ALL_WARNINGS=no +fi + +## Allow this variable to be substituted in +## other files (src/libhdf5.settings.in, etc.) +AC_SUBST([SHOW_ALL_WARNINGS]) + +case "X-$SHOW_ALL_WARNINGS" in + X-yes) + AC_MSG_RESULT([yes]) + AC_DEFINE([SHOW_ALL_WARNINGS], [1], [Define if showing all warnings is desired (i.e. not suppressed internally with H5_DIAG_OFF)]) + ;; + X-no) + AC_MSG_RESULT([no]) + ;; + *) + AC_MSG_ERROR([Unrecognized value: $SHOW_ALL_WARNINGS]) + ;; +esac + +## ---------------------------------------------------------------------- ## Check if the compiler should use profiling flags/settings ## AC_MSG_CHECKING([profiling]) |