Skip to content

Commit

Permalink
bumped Cppcheck to 2.12.1
Browse files Browse the repository at this point in the history
- build Cppcheck with matchcompiler for improved performance
- build Cppcheck with Boost for improved ValueFlow performance
  • Loading branch information
firewave committed Oct 17, 2023
1 parent f687174 commit 8c21428
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
CC: gcc
# This is required to use a version of cppcheck other than that
# supplied with the operating system
CPPCHECK_VER: "2.11"
CPPCHECK_VER: "2.12.1"
CPPCHECK_REPO: https://github.com/danmar/cppcheck.git
steps:
# Set steps.os.outputs.image to the specific OS (e.g. 'ubuntu20')
Expand Down
9 changes: 6 additions & 3 deletions scripts/install_cppcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,20 @@ fi

cd "$workdir"

make_args="MATCHCOMPILER=yes FILESDIR=$FILESDIR PREFIX=$FILESDIR"

case "$CPPCHECK_VER" in
1.*)
# CFGDIR is needed for cppcheck before 1.86
make_args="FILESDIR=$FILESDIR PREFIX=$FILESDIR CFGDIR=$FILESDIR"
make_args="$make_args CFGDIR=$FILESDIR"
;;
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="$make_args CPPFLAGS=-DHAVE_BOOST"
;;
2.*)
make_args="FILESDIR=$FILESDIR PREFIX=$FILESDIR USE_Z3=yes"
make_args="$make_args USE_Z3=yes"
# Check that the Z3 development files appear to be installed
# before trying to create z3_version.h. Otherwise we may
# mislead the user as to what needs to be done.
Expand Down
2 changes: 2 additions & 0 deletions scripts/install_cppcheck_dependencies_with_apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 8c21428

Please sign in to comment.