Add build directory search for includes to cppcheck.sh

Try to find the build location if you build out of tree.
Not a very thorough sesrch, just enough to find it on my system.
Needs local customization for the general case.
Also fix missing ", delete config statement with bad syntax.
pull/1760/head
George Baltz N3GB 2025-06-06 15:31:46 -04:00
rodzic 32b57107f4
commit c3d21b477e
1 zmienionych plików z 16 dodań i 1 usunięć

Wyświetl plik

@ -5,6 +5,19 @@ set -x
# There are things that could still be done...especially in the C++ area
echo "Ideally there should be no errors or warnings"
# We need the generated include files, not just the base
# If this is not the build directory, try to find one
BUILDINC=""
if ! test -f Makefile; then
# Find mine, YMMV
if test -d build; then
BUILDINC="-I build/src -I build/include -I build/include/hamlib"
# Put code here to find your build directory and set BUILDINC
else
echo "Unknown build directory, some includes won't be found"
fi
fi
# We do suppress some errors which are expected or other code
# There are quite a few C++ items to take care of still if anybody cares
SUPPRESS="\
@ -23,7 +36,7 @@ SUPPRESS="\
--suppress=*:extra/gnuradio/wfm.h \
--suppress=*:extra/gnuradio/gnuradio.cc \
--suppress=missingIncludeSystem \
--suppress=*:style/rigs/adat/adat.c
"
#CHECK="\
#-D RIG_LEVEL_LINEOUT=1 \
@ -83,6 +96,7 @@ if test $# -eq 0 ; then
-I include/hamlib/ \
-I lib \
-I security \
$BUILDINC \
-q \
--force \
--enable=all \
@ -100,6 +114,7 @@ else
-I include/hamlib/ \
-I lib \
-I security \
$BUILDINC \
-q \
--force \
--enable=all \