From 13a6be0cdbafbaf5861f1d13c9d02226c684de4c Mon Sep 17 00:00:00 2001 From: firewave Date: Sat, 9 Sep 2023 19:50:16 +0200 Subject: [PATCH] build Cppcheck with Boost for improved ValueFlow performance --- .github/workflows/build.yml | 2 +- scripts/install_cppcheck.sh | 3 ++- scripts/install_cppcheck_dependencies_with_apt.sh | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6dd09ba7e..ef3f36d77 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -180,7 +180,7 @@ jobs: cache-name: cache-cppcheck with: path: ~/cppcheck.local - key: ${{ steps.os.outputs.image }}-build-${{ env.cache-name }}-${{ env.CPPCHECK_VER }} + key: ${{ steps.os.outputs.image }}-build-${{ env.cache-name }}-${{ env.CPPCHECK_VER }}-boost - run: sudo scripts/install_cppcheck_dependencies_with_apt.sh $CPPCHECK_VER - run: ./bootstrap - run: ./configure diff --git a/scripts/install_cppcheck.sh b/scripts/install_cppcheck.sh index 94600b239..6bdfc6bb9 100755 --- a/scripts/install_cppcheck.sh +++ b/scripts/install_cppcheck.sh @@ -130,7 +130,8 @@ fi ;; 2.8 | 2.9 | 2.1*) # Cppcheck 2.8 removed the dependency on z3 - make_args="FILESDIR=$FILESDIR PREFIX=$FILESDIR" + # Cppcheck 2.8 added optional support for utilizing Boost + make_args="FILESDIR=$FILESDIR PREFIX=$FILESDIR CPPFLAGS=-DHAVE_BOOST" ;; 2.*) make_args="FILESDIR=$FILESDIR PREFIX=$FILESDIR USE_Z3=yes" diff --git a/scripts/install_cppcheck_dependencies_with_apt.sh b/scripts/install_cppcheck_dependencies_with_apt.sh index c5a055dd7..0c2f308df 100755 --- a/scripts/install_cppcheck_dependencies_with_apt.sh +++ b/scripts/install_cppcheck_dependencies_with_apt.sh @@ -24,6 +24,8 @@ case "$CPPCHECK_VER" in ;; 2.8 | 2.9 | 2.1*) # Cppcheck 2.8 removed the dependency on z3 + # Cppcheck 2.8 added optional support for utilizing Boost + PACKAGES="$PACKAGES libboost-container-dev" ;; 2.*) PACKAGES="$PACKAGES libz3-dev z3"