Skip to content

Commit

Permalink
build Cppcheck with matchcompiler for improved performance
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Sep 10, 2023
1 parent 364a55c commit dce3312
Show file tree
Hide file tree
Showing 2 changed files with 6 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 @@ -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 }}-mc
- run: sudo scripts/install_cppcheck_dependencies_with_apt.sh $CPPCHECK_VER
- run: ./bootstrap
- run: ./configure
Expand Down
8 changes: 5 additions & 3 deletions scripts/install_cppcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +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
# Cppcheck 2.8 added optional support for utilizing Boost
make_args="FILESDIR=$FILESDIR PREFIX=$FILESDIR CPPFLAGS=-DHAVE_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

0 comments on commit dce3312

Please sign in to comment.