added strict cfg check (#4093)
* runtests.sh: added strict mode - enabled via `STRICT=1` * CI-unixish.yml: added strict cfg check * runtests.sh: disabled syntax check for kde.cpp since `kde-4config` is no longer commonly available in recent distros * runtests.sh: disabled syntax check for opencv2.cpp since `opencv.pc` is not commonly available in distros * runtests.sh: added missing trailing slash to `CFG` - fixes define checks
This commit is contained in:
parent
6152e5712a
commit
56ac230e97
|
@ -25,6 +25,12 @@ jobs:
|
||||||
sudo apt-get install libtinyxml2-dev
|
sudo apt-get install libtinyxml2-dev
|
||||||
sudo apt-get install qtbase5-dev qttools5-dev libqt5charts5-dev qt5-default
|
sudo apt-get install qtbase5-dev qttools5-dev libqt5charts5-dev qt5-default
|
||||||
|
|
||||||
|
# packages for strict cfg checks
|
||||||
|
- name: Install missing software on ubuntu 20.04
|
||||||
|
if: matrix.os == 'ubuntu-20.04'
|
||||||
|
run: |
|
||||||
|
sudo apt-get install libcairo2-dev libcurl4-openssl-dev liblua5.3-dev libssl-dev libsqlite3-dev libcppunit-dev libsigc++-2.0-dev libgtk-3-dev libboost-all-dev libwxgtk3.0-gtk3-dev xmlstarlet
|
||||||
|
|
||||||
- name: Install missing software on macos
|
- name: Install missing software on macos
|
||||||
if: contains(matrix.os, 'macos')
|
if: contains(matrix.os, 'macos')
|
||||||
run: |
|
run: |
|
||||||
|
@ -117,10 +123,17 @@ jobs:
|
||||||
|
|
||||||
# fails on macos since some includes (e.g. sys/epoll.h) are not available
|
# fails on macos since some includes (e.g. sys/epoll.h) are not available
|
||||||
- name: Run cfg tests
|
- name: Run cfg tests
|
||||||
if: contains(matrix.os, 'ubuntu')
|
if: contains(matrix.os, 'ubuntu') && matrix.os != 'ubuntu-20.04'
|
||||||
run: |
|
run: |
|
||||||
make -j$(nproc) checkcfg
|
make -j$(nproc) checkcfg
|
||||||
|
|
||||||
|
- name: Run cfg tests (strict)
|
||||||
|
if: matrix.os == 'ubuntu-20.04'
|
||||||
|
run: |
|
||||||
|
make -j$(nproc) checkcfg
|
||||||
|
env:
|
||||||
|
STRICT: 1
|
||||||
|
|
||||||
# it seems macos has no "wc" command
|
# it seems macos has no "wc" command
|
||||||
- name: Run showtimetop5 tests
|
- name: Run showtimetop5 tests
|
||||||
if: contains(matrix.os, 'ubuntu')
|
if: contains(matrix.os, 'ubuntu')
|
||||||
|
|
|
@ -16,9 +16,6 @@ env:
|
||||||
- CXXFLAGS="${CXXFLAGS} -DCHECK_INTERNAL" MAKEFLAGS="HAVE_RULES=yes" MATCHCOMPILER=yes VERIFY=1
|
- CXXFLAGS="${CXXFLAGS} -DCHECK_INTERNAL" MAKEFLAGS="HAVE_RULES=yes" MATCHCOMPILER=yes VERIFY=1
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
# install needed deps
|
|
||||||
- travis_retry sudo apt-get update -qq
|
|
||||||
- travis_retry sudo apt-get install -qq python3-pip libxml2-utils libpcre3 gdb unzip wx-common xmlstarlet python3-dev liblua5.3-dev libcurl3 libcairo2-dev libsigc++-2.0-dev tidy libopencv-dev
|
|
||||||
# Python 2 modules
|
# Python 2 modules
|
||||||
- travis_retry python2 -m pip install --user pytest==4.6.4
|
- travis_retry python2 -m pip install --user pytest==4.6.4
|
||||||
- travis_retry python2 -m pip install --user unittest2
|
- travis_retry python2 -m pip install --user unittest2
|
||||||
|
|
|
@ -2,6 +2,12 @@
|
||||||
set -e # abort on error
|
set -e # abort on error
|
||||||
#set -x # be verbose
|
#set -x # be verbose
|
||||||
|
|
||||||
|
function exit_if_strict {
|
||||||
|
if [ -n "${STRICT}" ] && [ "${STRICT}" -eq 1 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
echo "Checking for pkg-config..."
|
echo "Checking for pkg-config..."
|
||||||
if pkg-config --version; then
|
if pkg-config --version; then
|
||||||
HAS_PKG_CONFIG=1
|
HAS_PKG_CONFIG=1
|
||||||
|
@ -9,11 +15,12 @@ if pkg-config --version; then
|
||||||
else
|
else
|
||||||
HAS_PKG_CONFIG=0
|
HAS_PKG_CONFIG=0
|
||||||
echo "pkg-config is not available, skipping all syntax checks."
|
echo "pkg-config is not available, skipping all syntax checks."
|
||||||
|
exit_if_strict
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/
|
||||||
CPPCHECK="$DIR"../../cppcheck
|
CPPCHECK="$DIR"../../cppcheck
|
||||||
CFG="$DIR"../../cfg
|
CFG="$DIR"../../cfg/
|
||||||
|
|
||||||
# Cppcheck options
|
# Cppcheck options
|
||||||
CPPCHECK_OPT='--check-library --enable=information --enable=style --error-exitcode=-1 --suppress=missingIncludeSystem --inline-suppr --template="{file}:{line}:{severity}:{id}:{message}"'
|
CPPCHECK_OPT='--check-library --enable=information --enable=style --error-exitcode=-1 --suppress=missingIncludeSystem --inline-suppr --template="{file}:{line}:{severity}:{id}:{message}"'
|
||||||
|
@ -63,12 +70,14 @@ function qt_fn {
|
||||||
set -e
|
set -e
|
||||||
if [ $QTCHECK_RETURNCODE -ne 0 ]; then
|
if [ $QTCHECK_RETURNCODE -ne 0 ]; then
|
||||||
echo "Qt not completely present or not working, skipping syntax check with ${CXX}."
|
echo "Qt not completely present or not working, skipping syntax check with ${CXX}."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
echo "Qt found and working, checking syntax with ${CXX} now."
|
echo "Qt found and working, checking syntax with ${CXX} now."
|
||||||
${CXX} ${CXX_OPT} ${QTCONFIG} ${DIR}qt.cpp
|
${CXX} ${CXX_OPT} ${QTCONFIG} ${DIR}qt.cpp
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Qt not present, skipping syntax check with ${CXX}."
|
echo "Qt not present, skipping syntax check with ${CXX}."
|
||||||
|
exit_if_strict
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -103,6 +112,7 @@ function wxwidgets_fn {
|
||||||
set -e
|
set -e
|
||||||
if [ $WXCONFIG_RETURNCODE -ne 0 ]; then
|
if [ $WXCONFIG_RETURNCODE -ne 0 ]; then
|
||||||
echo "wx-config does not work, skipping syntax check for wxWidgets tests."
|
echo "wx-config does not work, skipping syntax check for wxWidgets tests."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
set +e
|
set +e
|
||||||
echo -e "#include <wx/filefn.h>\n#include <wx/app.h>\n#include <wx/artprov.h>\n#include <wx/version.h>\n#if wxVERSION_NUMBER<2950\n#error \"Old version\"\n#endif" | ${CXX} ${CXX_OPT} ${WXCONFIG} -x c++ -
|
echo -e "#include <wx/filefn.h>\n#include <wx/app.h>\n#include <wx/artprov.h>\n#include <wx/version.h>\n#if wxVERSION_NUMBER<2950\n#error \"Old version\"\n#endif" | ${CXX} ${CXX_OPT} ${WXCONFIG} -x c++ -
|
||||||
|
@ -110,6 +120,7 @@ function wxwidgets_fn {
|
||||||
set -e
|
set -e
|
||||||
if [ $WXCHECK_RETURNCODE -ne 0 ]; then
|
if [ $WXCHECK_RETURNCODE -ne 0 ]; then
|
||||||
echo "wxWidgets not completely present (with GUI classes) or not working, skipping syntax check with ${CXX}."
|
echo "wxWidgets not completely present (with GUI classes) or not working, skipping syntax check with ${CXX}."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
echo "wxWidgets found, checking syntax with ${CXX} now."
|
echo "wxWidgets found, checking syntax with ${CXX} now."
|
||||||
${CXX} ${CXX_OPT} ${WXCONFIG} -Wno-deprecated-declarations ${DIR}wxwidgets.cpp
|
${CXX} ${CXX_OPT} ${WXCONFIG} -Wno-deprecated-declarations ${DIR}wxwidgets.cpp
|
||||||
|
@ -131,12 +142,14 @@ function gtk_fn {
|
||||||
set -e
|
set -e
|
||||||
if [ $GTKCHECK_RETURNCODE -ne 0 ]; then
|
if [ $GTKCHECK_RETURNCODE -ne 0 ]; then
|
||||||
echo "GTK+ not completely present or not working, skipping syntax check with ${CXX}."
|
echo "GTK+ not completely present or not working, skipping syntax check with ${CXX}."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
echo "GTK+ found and working, checking syntax with ${CXX} now."
|
echo "GTK+ found and working, checking syntax with ${CXX} now."
|
||||||
${CC} ${CC_OPT} ${GTKCONFIG} ${DIR}gtk.c
|
${CC} ${CC_OPT} ${GTKCONFIG} ${DIR}gtk.c
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "GTK+ not present, skipping syntax check with ${CXX}."
|
echo "GTK+ not present, skipping syntax check with ${CXX}."
|
||||||
|
exit_if_strict
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -149,6 +162,7 @@ function boost_fn {
|
||||||
set -e
|
set -e
|
||||||
if [ ${BOOSTCHECK_RETURNCODE} -ne 0 ]; then
|
if [ ${BOOSTCHECK_RETURNCODE} -ne 0 ]; then
|
||||||
echo "Boost not completely present or not working, skipping syntax check with ${CXX}."
|
echo "Boost not completely present or not working, skipping syntax check with ${CXX}."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
echo "Boost found and working, checking syntax with ${CXX} now."
|
echo "Boost found and working, checking syntax with ${CXX} now."
|
||||||
${CXX} ${CXX_OPT} ${DIR}boost.cpp
|
${CXX} ${CXX_OPT} ${DIR}boost.cpp
|
||||||
|
@ -166,12 +180,14 @@ function sqlite3_fn {
|
||||||
set -e
|
set -e
|
||||||
if [ $SQLITE3CHECK_RETURNCODE -ne 0 ]; then
|
if [ $SQLITE3CHECK_RETURNCODE -ne 0 ]; then
|
||||||
echo "SQLite3 not completely present or not working, skipping syntax check with ${CC}."
|
echo "SQLite3 not completely present or not working, skipping syntax check with ${CC}."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
echo "SQLite3 found and working, checking syntax with ${CC} now."
|
echo "SQLite3 found and working, checking syntax with ${CC} now."
|
||||||
${CC} ${CC_OPT} ${SQLITE3CONFIG} ${DIR}sqlite3.c
|
${CC} ${CC_OPT} ${SQLITE3CONFIG} ${DIR}sqlite3.c
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "SQLite3 not present, skipping syntax check with ${CC}."
|
echo "SQLite3 not present, skipping syntax check with ${CC}."
|
||||||
|
exit_if_strict
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -192,12 +208,14 @@ function python_fn {
|
||||||
set -e
|
set -e
|
||||||
if [ $PYTHON3CONFIG_RETURNCODE -ne 0 ]; then
|
if [ $PYTHON3CONFIG_RETURNCODE -ne 0 ]; then
|
||||||
echo "Python 3 not completely present or not working, skipping syntax check with ${CC}."
|
echo "Python 3 not completely present or not working, skipping syntax check with ${CC}."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
echo "Python 3 found and working, checking syntax with ${CC} now."
|
echo "Python 3 found and working, checking syntax with ${CC} now."
|
||||||
${CC} ${CC_OPT} ${PYTHON3CONFIG} ${DIR}python.c
|
${CC} ${CC_OPT} ${PYTHON3CONFIG} ${DIR}python.c
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Python 3 not present, skipping syntax check with ${CC}."
|
echo "Python 3 not present, skipping syntax check with ${CC}."
|
||||||
|
exit_if_strict
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -213,12 +231,14 @@ function lua_fn {
|
||||||
set -e
|
set -e
|
||||||
if [ $LUACONFIG_RETURNCODE -ne 0 ]; then
|
if [ $LUACONFIG_RETURNCODE -ne 0 ]; then
|
||||||
echo "Lua not completely present or not working, skipping syntax check with ${CC}."
|
echo "Lua not completely present or not working, skipping syntax check with ${CC}."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
echo "Lua found and working, checking syntax with ${CC} now."
|
echo "Lua found and working, checking syntax with ${CC} now."
|
||||||
${CC} ${CC_OPT} ${LUACONFIG} ${DIR}lua.c
|
${CC} ${CC_OPT} ${LUACONFIG} ${DIR}lua.c
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Lua not present, skipping syntax check with ${CC}."
|
echo "Lua not present, skipping syntax check with ${CC}."
|
||||||
|
exit_if_strict
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -234,12 +254,14 @@ function libcurl_fn {
|
||||||
set -e
|
set -e
|
||||||
if [ $LIBCURLCONFIG_RETURNCODE -ne 0 ]; then
|
if [ $LIBCURLCONFIG_RETURNCODE -ne 0 ]; then
|
||||||
echo "libcurl not completely present or not working, skipping syntax check with ${CC}."
|
echo "libcurl not completely present or not working, skipping syntax check with ${CC}."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
echo "libcurl found and working, checking syntax with ${CC} now."
|
echo "libcurl found and working, checking syntax with ${CC} now."
|
||||||
${CC} ${CC_OPT} ${LIBCURLCONFIG} ${DIR}libcurl.c
|
${CC} ${CC_OPT} ${LIBCURLCONFIG} ${DIR}libcurl.c
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "libcurl not present, skipping syntax check with ${CC}."
|
echo "libcurl not present, skipping syntax check with ${CC}."
|
||||||
|
exit_if_strict
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -255,12 +277,14 @@ function cairo_fn {
|
||||||
set -e
|
set -e
|
||||||
if [ $CAIROCONFIG_RETURNCODE -ne 0 ]; then
|
if [ $CAIROCONFIG_RETURNCODE -ne 0 ]; then
|
||||||
echo "cairo not completely present or not working, skipping syntax check with ${CC}."
|
echo "cairo not completely present or not working, skipping syntax check with ${CC}."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
echo "cairo found and working, checking syntax with ${CC} now."
|
echo "cairo found and working, checking syntax with ${CC} now."
|
||||||
${CC} ${CC_OPT} ${CAIROCONFIG} ${DIR}cairo.c
|
${CC} ${CC_OPT} ${CAIROCONFIG} ${DIR}cairo.c
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "cairo not present, skipping syntax check with ${CC}."
|
echo "cairo not present, skipping syntax check with ${CC}."
|
||||||
|
exit_if_strict
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -278,10 +302,12 @@ function kde_fn {
|
||||||
set -e
|
set -e
|
||||||
if [ $KDECONFIG_RETURNCODE -ne 0 ]; then
|
if [ $KDECONFIG_RETURNCODE -ne 0 ]; then
|
||||||
echo "kde4-config does not work, skipping syntax check."
|
echo "kde4-config does not work, skipping syntax check."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
KDEQTCONFIG=$(get_pkg_config_cflags QtCore)
|
KDEQTCONFIG=$(get_pkg_config_cflags QtCore)
|
||||||
if [ -n "$KDEQTCONFIG" ]; then
|
if [ -n "$KDEQTCONFIG" ]; then
|
||||||
echo "Suitable Qt not present, Qt is necessary for KDE. Skipping syntax check."
|
echo "Suitable Qt not present, Qt is necessary for KDE. Skipping syntax check."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
set +e
|
set +e
|
||||||
echo -e "#include <KDE/KGlobal>\n" | ${CXX} ${CXX_OPT} -I${KDECONFIG} ${KDEQTCONFIG} -x c++ -
|
echo -e "#include <KDE/KGlobal>\n" | ${CXX} ${CXX_OPT} -I${KDECONFIG} ${KDEQTCONFIG} -x c++ -
|
||||||
|
@ -289,6 +315,7 @@ function kde_fn {
|
||||||
set -e
|
set -e
|
||||||
if [ $KDECHECK_RETURNCODE -ne 0 ]; then
|
if [ $KDECHECK_RETURNCODE -ne 0 ]; then
|
||||||
echo "KDE headers not completely present or not working, skipping syntax check with ${CXX}."
|
echo "KDE headers not completely present or not working, skipping syntax check with ${CXX}."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
echo "KDE found, checking syntax with ${CXX} now."
|
echo "KDE found, checking syntax with ${CXX} now."
|
||||||
${CXX} ${CXX_OPT} -I${KDECONFIG} ${KDEQTCONFIG} ${DIR}kde.cpp
|
${CXX} ${CXX_OPT} -I${KDECONFIG} ${KDEQTCONFIG} ${DIR}kde.cpp
|
||||||
|
@ -308,12 +335,14 @@ function libsigcpp_fn {
|
||||||
set -e
|
set -e
|
||||||
if [ $LIBSIGCPPCONFIG_RETURNCODE -ne 0 ]; then
|
if [ $LIBSIGCPPCONFIG_RETURNCODE -ne 0 ]; then
|
||||||
echo "libsigc++ not completely present or not working, skipping syntax check with ${CXX}."
|
echo "libsigc++ not completely present or not working, skipping syntax check with ${CXX}."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
echo "libsigc++ found and working, checking syntax with ${CXX} now."
|
echo "libsigc++ found and working, checking syntax with ${CXX} now."
|
||||||
${CXX} ${CXX_OPT} ${LIBSIGCPPCONFIG} ${DIR}libsigc++.cpp
|
${CXX} ${CXX_OPT} ${LIBSIGCPPCONFIG} ${DIR}libsigc++.cpp
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "libsigc++ not present, skipping syntax check with ${CXX}."
|
echo "libsigc++ not present, skipping syntax check with ${CXX}."
|
||||||
|
exit_if_strict
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -329,12 +358,14 @@ function openssl_fn {
|
||||||
set -e
|
set -e
|
||||||
if [ $OPENSSLCONFIG_RETURNCODE -ne 0 ]; then
|
if [ $OPENSSLCONFIG_RETURNCODE -ne 0 ]; then
|
||||||
echo "OpenSSL not completely present or not working, skipping syntax check with ${CC}."
|
echo "OpenSSL not completely present or not working, skipping syntax check with ${CC}."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
echo "OpenSSL found and working, checking syntax with ${CC} now."
|
echo "OpenSSL found and working, checking syntax with ${CC} now."
|
||||||
${CC} ${CC_OPT} ${OPENSSLCONFIG} ${DIR}openssl.c
|
${CC} ${CC_OPT} ${OPENSSLCONFIG} ${DIR}openssl.c
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "OpenSSL not present, skipping syntax check with ${CC}."
|
echo "OpenSSL not present, skipping syntax check with ${CC}."
|
||||||
|
exit_if_strict
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -350,12 +381,14 @@ function opencv2_fn {
|
||||||
set -e
|
set -e
|
||||||
if [ $OPENCVCONFIG_RETURNCODE -ne 0 ]; then
|
if [ $OPENCVCONFIG_RETURNCODE -ne 0 ]; then
|
||||||
echo "OpenCV not completely present or not working, skipping syntax check with ${CXX}."
|
echo "OpenCV not completely present or not working, skipping syntax check with ${CXX}."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
echo "OpenCV found and working, checking syntax with ${CXX} now."
|
echo "OpenCV found and working, checking syntax with ${CXX} now."
|
||||||
${CXX} ${CXX_OPT} ${OPENCVCONFIG} ${DIR}opencv2.cpp
|
${CXX} ${CXX_OPT} ${OPENCVCONFIG} ${DIR}opencv2.cpp
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "OpenCV not present, skipping syntax check with ${CXX}."
|
echo "OpenCV not present, skipping syntax check with ${CXX}."
|
||||||
|
exit_if_strict
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -365,6 +398,7 @@ function cppunit_fn {
|
||||||
if [ $HAS_PKG_CONFIG -eq 1 ]; then
|
if [ $HAS_PKG_CONFIG -eq 1 ]; then
|
||||||
if ! pkg-config cppunit; then
|
if ! pkg-config cppunit; then
|
||||||
echo "cppunit not found, skipping syntax check for cppunit"
|
echo "cppunit not found, skipping syntax check for cppunit"
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
echo "cppunit found, checking syntax with ${CXX} now."
|
echo "cppunit found, checking syntax with ${CXX} now."
|
||||||
${CXX} ${CXX_OPT} -Wno-deprecated-declarations ${DIR}cppunit.cpp
|
${CXX} ${CXX_OPT} -Wno-deprecated-declarations ${DIR}cppunit.cpp
|
||||||
|
@ -405,7 +439,8 @@ do
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --library=gtk -f ${DIR}gtk.c
|
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --library=gtk -f ${DIR}gtk.c
|
||||||
;;
|
;;
|
||||||
kde.cpp)
|
kde.cpp)
|
||||||
kde_fn
|
# TODO: "kde-4config" is no longer commonly available in recent distros
|
||||||
|
#kde_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --library=kde ${DIR}kde.cpp
|
${CPPCHECK} ${CPPCHECK_OPT} --inconclusive --library=kde ${DIR}kde.cpp
|
||||||
;;
|
;;
|
||||||
libcurl.c)
|
libcurl.c)
|
||||||
|
@ -421,7 +456,8 @@ do
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --library=lua ${DIR}lua.c
|
${CPPCHECK} ${CPPCHECK_OPT} --library=lua ${DIR}lua.c
|
||||||
;;
|
;;
|
||||||
opencv2.cpp)
|
opencv2.cpp)
|
||||||
opencv2_fn
|
# TODO: "opencv.pc" is not commonly available in distros
|
||||||
|
#opencv2_fn
|
||||||
${CPPCHECK} ${CPPCHECK_OPT} --library=opencv2 ${DIR}opencv2.cpp
|
${CPPCHECK} ${CPPCHECK_OPT} --library=opencv2 ${DIR}opencv2.cpp
|
||||||
;;
|
;;
|
||||||
openmp.c)
|
openmp.c)
|
||||||
|
@ -468,12 +504,14 @@ do
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unhandled file $f"
|
echo "Unhandled file $f"
|
||||||
|
exit_if_strict
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# Check the syntax of the defines in the configuration files
|
# Check the syntax of the defines in the configuration files
|
||||||
if ! xmlstarlet --version; then
|
if ! xmlstarlet --version; then
|
||||||
echo "xmlstarlet needed to extract defines, skipping defines check."
|
echo "xmlstarlet needed to extract defines, skipping defines check."
|
||||||
|
exit_if_strict
|
||||||
else
|
else
|
||||||
for configfile in ${CFG}*.cfg; do
|
for configfile in ${CFG}*.cfg; do
|
||||||
echo "Checking defines in $configfile"
|
echo "Checking defines in $configfile"
|
||||||
|
|
Loading…
Reference in New Issue