]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/date_time/ci/cppcheck.sh
3 # Copyright 2018 James E. King III
4 # Distributed under the Boost Software License, Version 1.0.
5 # (See accompanying file LICENSE_1_0.txt or copy at
6 # http://www.boost.org/LICENSE_1_0.txt)
8 # Bash script to run in travis to perform a cppcheck
9 # cwd should be $BOOST_ROOT before running
14 # default language level: c++03
15 if [[ -z "$CXXSTD" ]]; then
19 # Travis' ubuntu-trusty comes with cppcheck 1.62 which is pretty old
20 # default cppcheck version: 1.82
21 if [[ -z "$CPPCHKVER" ]]; then
26 wget https
://github.com
/danmar
/cppcheck
/archive
/$CPPCHKVER.
tar.gz
27 tar xzf
$CPPCHKVER.
tar.gz
30 cmake ..
/cppcheck-
$CPPCHKVER -DCMAKE_BUILD_TYPE=Release
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_INSTALL_PREFIX=~
/cppcheck
34 ~
/cppcheck
/bin
/cppcheck
-I.
--std=c
++$CXXSTD --enable=all
--error-exitcode=1 \
35 --force --check-config --suppress=*:boost
/preprocessor
/tuple
/size.hpp \
36 -UBOOST_USER_CONFIG -UBOOST_COMPILER_CONFIG -UBOOST_STDLIB_CONFIG -UBOOST_PLATFORM_CONFIG \
37 libs
/$SELF 2>&1 |
grep -v 'Cppcheck does not need standard library headers'