summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-02-08 23:23:09 (GMT)
committerGitHub <noreply@github.com>2021-02-08 23:23:09 (GMT)
commitbccf5b5c0864896a077f5d6ef43ec1410151e693 (patch)
tree3b56a298a33ebb410f88913ef0be3d652890c953 /configure.ac
parentaa95b70f6da1852f136e36954814be0fa4b02fa2 (diff)
downloadhdf5-bccf5b5c0864896a077f5d6ef43ec1410151e693.zip
hdf5-bccf5b5c0864896a077f5d6ef43ec1410151e693.tar.gz
hdf5-bccf5b5c0864896a077f5d6ef43ec1410151e693.tar.bz2
Add option to control gcc 10 warnings diagnostics (#321)
* OESS-98 convert plugin option to FetchContent, add tests * Fixes for pkcfg files because of plugin option * OESS-98 fix tools test for plugins * Keep doxygen comments under 100 chars long - format hint * Whitespace * HDFFV-11144 - Reclassify CMake messages * HDFFV-11099/11100 added help text * Reworked switch statement to compare string instead * Fix typo * Update CDash mode * Correct name of threadsafe * Correct option name * Undo accidental commit * Note LLVM 10 to 11 format default changes * Update format plugin * Undo clang-format version 11 changes * One more correction * Update supported platforms * Revert whitespace changes * Correct whitespace * Changes from PR#3 * HDFFV-11213 added option to control gcc10 warnings diagnostics
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac45
1 files changed, 45 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 131bd27..2ff8519 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2158,6 +2158,51 @@ AC_ARG_ENABLE([production],
## ----------------------------------------------------------------------
+## Check if the compiler should include build diagnostics
+##
+AC_MSG_CHECKING([enable build diagnostics])
+AC_ARG_ENABLE([diags],
+ [AS_HELP_STRING([--enable-diags=(yes|no|<custom>)],
+ [Allow default enhanced diagnostics to the build.
+ This is independent of the build mode and optimization
+ level.
+ [default=no]
+ ])],
+ [DIAGS=$enableval])
+
+## Set default
+if test "X-$DIAGS" = X- ; then
+ DIAGS=no
+fi
+
+## Allow this variable to be substituted in
+## other files (src/libhdf5.settings.in, etc.)
+AC_SUBST([DIAGS])
+
+case "X-$DIAGS" in
+ X-yes)
+ H5_CFLAGS="$H5_CFLAGS $DIAGS_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $DIAGS_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $DIAGS_FCFLAGS"
+ AC_MSG_RESULT([yes])
+ ;;
+ X-no)
+ H5_CFLAGS="$H5_CFLAGS $NO_DIAGS_CFLAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $NO_DIAGS_CXXFLAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $NO_DIAGS_FCFLAGS"
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ H5_CFLAGS="$H5_CFLAGS $DIAGS"
+ H5_CXXFLAGS="$H5_CXXFLAGS $DIAGS"
+ H5_FCFLAGS="$H5_FCFLAGS $DIAGS"
+ DIAGS="custom ($DIAGS)"
+ AC_MSG_RESULT([$DIAGS])
+ ;;
+esac
+
+
+## ----------------------------------------------------------------------
## Check if the compiler should include symbols
##
AC_MSG_CHECKING([enable debugging symbols])