mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-01 16:28:09 +08:00
Fix issue with -Werror cleanup sed command in configure.ac (#4223)
This commit is contained in:
parent
638c4d901f
commit
be16b70272
43
configure.ac
43
configure.ac
@ -198,21 +198,36 @@ saved_user_CPPFLAGS="$CPPFLAGS"
|
||||
##
|
||||
## Regex:
|
||||
##
|
||||
## -Werror Literal -Werror
|
||||
## \( Start optional capturing group
|
||||
## = Literal equals sign
|
||||
## [^[:space:]-] Non-space characters
|
||||
## \+ 1 or more of the above
|
||||
## \) End optional capturing group
|
||||
## \? 0 or 1 capturing group matches
|
||||
## -Werror Literal -Werror
|
||||
## \( Start optional capturing group
|
||||
## = Literal equals sign
|
||||
## [^[:space:]] Non-space characters
|
||||
## \+ 1 or more of the above
|
||||
## \) End optional capturing group
|
||||
## \? 0 or 1 capturing group matches
|
||||
##
|
||||
WERROR_SED= "sed -e 's/-Werror\(=[^[:space:]]\+\)\?//g'"
|
||||
|
||||
CFLAGS="`echo $CFLAGS | $WERROR_SED`"
|
||||
CXXFLAGS="`echo $CXXFLAGS | $WERROR_SED`"
|
||||
FCFLAGS="`echo $FCFLAGS | $WERROR_SED`"
|
||||
JAVACFLAGS="`echo $JAVACFLAGS | $WERROR_SED`"
|
||||
CPPFLAGS="`echo $CPPFLAGS | $WERROR_SED`"
|
||||
## Note that the outer pair of '[]' ends up getting removed
|
||||
WERROR_SED='s/-Werror\(=[[^[:space:]]]\+\)\?//g'
|
||||
CFLAGS_SED="`echo $CFLAGS | sed -e $WERROR_SED`"
|
||||
if test $? -eq 0; then
|
||||
CFLAGS="$CFLAGS_SED"
|
||||
fi
|
||||
CXXFLAGS_SED="`echo $CXXFLAGS | sed -e $WERROR_SED`"
|
||||
if test $? -eq 0; then
|
||||
CXXFLAGS="$CXXFLAGS_SED"
|
||||
fi
|
||||
FCFLAGS_SED="`echo $FCFLAGS | sed -e $WERROR_SED`"
|
||||
if test $? -eq 0; then
|
||||
FCFLAGS="$FCFLAGS_SED"
|
||||
fi
|
||||
JAVACFLAGS_SED="`echo $JAVACFLAGS | sed -e $WERROR_SED`"
|
||||
if test $? -eq 0; then
|
||||
JAVACFLAGS="$JAVACFLAGS_SED"
|
||||
fi
|
||||
CPPFLAGS_SED="`echo $CPPFLAGS | sed -e $WERROR_SED`"
|
||||
if test $? -eq 0; then
|
||||
CPPFLAGS="$CPPFLAGS_SED"
|
||||
fi
|
||||
|
||||
## Support F9X variable to define Fortran compiler if FC variable is
|
||||
## not used. This should be deprecated in the future.
|
||||
|
Loading…
Reference in New Issue
Block a user