Skip to content

Commit

Permalink
Fix issue with -Werror cleanup sed command in configure.ac (HDFGroup#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF authored Mar 25, 2024
1 parent 638c4d9 commit be16b70
Showing 1 changed file with 29 additions and 14 deletions.
43 changes: 29 additions & 14 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit be16b70

Please sign in to comment.