mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
By default, demote warnings promoted to errors back to warnings.
This commit is contained in:
+19
-1
@@ -17,6 +17,24 @@
|
||||
# if the compiler is not GNU; otherwise 'cc_flags_set' is set to 'yes'
|
||||
#
|
||||
|
||||
#
|
||||
# For now, do not promote any warnings to errors.
|
||||
#
|
||||
PROMOTE_ERRORS_DFLT=no
|
||||
|
||||
#
|
||||
# This filter rewrites -Werror= as -W, in that way demoting warnings
|
||||
# promoted to errors back to warnings, if PROMOTE_ERRORS is no.
|
||||
#
|
||||
demote_errors()
|
||||
{
|
||||
if [ ${PROMOTE_ERRORS:-${PROMOTE_ERRORS_DFLT}} = no ]; then
|
||||
sed 's,-Werror=,-W,g'
|
||||
else
|
||||
cat
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Prepend `$srcdir/config/gnu-` to the filename suffix(es) given as
|
||||
# subroutine argument(s), remove comments starting with # and ending
|
||||
@@ -26,7 +44,7 @@
|
||||
load_gcc_arguments()
|
||||
{
|
||||
set -- $(for arg; do
|
||||
sed 's,#.*$,,' $srcdir/config/gnu-${arg}
|
||||
sed 's,#.*$,,' $srcdir/config/gnu-${arg} | demote_errors
|
||||
done)
|
||||
IFS=' ' echo "$*"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user