add the ability to parse the gccxml preprocessor output in order to reduce the number of false positives; fix wrong wxASSERT in wxMethod::IsOk; provide more help when called with --help

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-03-27 19:15:00 +00:00
parent 1512f0f7d8
commit 5570107a9d
4 changed files with 143 additions and 38 deletions

View File

@@ -11,8 +11,9 @@
############
gccxmloutput="wxapi.xml" # where do we put the gccXML output:
allheaders="/tmp/wx-all.h" # headers which includes all wx public headers
gccxmloutput="wxapi.xml" # the file where we store the gccXML output
preprocoutput="wxapi-preproc.txt" # the file where we store the preprocessor's #define values
allheaders="/tmp/wx-all.h" # the header which includes all wx public headers (autogenerated)
# the list of all wxWidgets public headers
listcmd="ls wx/*.h wx/aui/*.h wx/html/*.h wx/protocol/*.h wx/richtext/*.h wx/stc/*.h wx/xml/*.h wx/xrc/*.h"
@@ -52,14 +53,22 @@ done
flags="@CXXFLAGS@"
# NOTE: it's important to define __WXDEBUG__ because some functions of wx
# are declared (and thus parsed by gcc) only if that symbol is defined;
# so we remove __WXDEBUG__ symbol from $flags, in case it's defined:
# are declared (and thus parsed by gcc) only if that symbol is defined.
# So we remove it from $flags (in case it's defined) and then readd it.
flags=`echo "$flags" | sed -e 's/-pthread//g' | sed -e 's/__WXDEBUG__//g'`
# append some other flags:
flags="-I . -I @top_srcdir@/include $flags -D__WXDEBUG__ -D__WX@TOOLKIT@__ -DWXBUILDING $allheaders"
# run gccxml with the same flag used for the real compilation of wx sources:
echo "Running gccxml on the $allheaders file..."
if [[ -f "$gccxmloutput" ]]; then rm $gccxmloutput; fi
gccxml -I . -I @top_srcdir@/include $flags -D__WX@TOOLKIT@__ -DWXBUILDING $allheaders -fxml=$gccxmloutput
gccxml $flags -fxml=$gccxmloutput
# now get the list of the #defined values for wx headers, so that the result
# can be passed to ifacecheck to aid the comparison
echo "Running gccxml's preprocessor on the $allheaders file..."
gccxml -E -dM $flags >$preprocoutput
# cleanup
rm $allheaders