Skip to content
Snippets Groups Projects
Commit 865d16c9 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Improved cppcheck on travis

Now in the cppcheck plumed is not built or tested.
Only cppcheck is performed
parent 7cfde71f
No related branches found
No related tags found
No related merge requests found
...@@ -16,11 +16,10 @@ env: ...@@ -16,11 +16,10 @@ env:
- PLUMED_CC=gcc PLUMED_CXX=g++ PLUMED_CXXFLAGS=-O3 LAPACK=yes - PLUMED_CC=gcc PLUMED_CXX=g++ PLUMED_CXXFLAGS=-O3 LAPACK=yes
- PLUMED_CC=mpicc PLUMED_CXX=mpic++ PLUMED_CXXFLAGS=-O3 LAPACK=yes - PLUMED_CC=mpicc PLUMED_CXX=mpic++ PLUMED_CXXFLAGS=-O3 LAPACK=yes
# cppcheck # cppcheck
# in principle we should make only "cppcheck" here - CPPCHECK=yes
- PLUMED_CC=gcc PLUMED_CXX=g++ CPPCHECK=yes
matrix: matrix:
allow_failures: allow_failures:
- env: PLUMED_CC=gcc PLUMED_CXX=g++ CPPCHECK=yes - env: CPPCHECK=yes
# Possible additional variables: # Possible additional variables:
# VALGRIND=yes to make valgrind tests, only when log contains string [valgrind] # VALGRIND=yes to make valgrind tests, only when log contains string [valgrind]
install: install:
...@@ -62,17 +61,27 @@ install: ...@@ -62,17 +61,27 @@ install:
script: script:
# we set all the optional modules on # we set all the optional modules on
- touch src/crystallization.on src/manyrestraints.on - touch src/crystallization.on src/manyrestraints.on
# BUILD:
# this is done only if PLUMED_CXX is defined
# we have to pass the full path since on travis machines sudo does not have compilers in the path # we have to pass the full path since on travis machines sudo does not have compilers in the path
- ./configure CXX=$(which $PLUMED_CXX) CC=$(which $PLUMED_CC) CXXFLAGS="$PLUMED_CXXFLAGS" LDFLAGS="$PLUMED_LDFLAGS" CPPFLAGS="$PLUMED_CPPFLAGS" $ENALMOST $CONFIG_FLAGS - if test "$PLUMED_CXX" ; then ./configure CXX=$(which $PLUMED_CXX) CC=$(which $PLUMED_CC) CXXFLAGS="$PLUMED_CXXFLAGS" LDFLAGS="$PLUMED_LDFLAGS" CPPFLAGS="$PLUMED_CPPFLAGS" $ENALMOST $CONFIG_FLAGS ; fi
- make -j 2 - if test "$PLUMED_CXX" ; then make -j 2 ; fi
# we install plumed so that it is in the path # we install plumed so that it is in the path
- make install prefix="$HOME/opt" - if test "$PLUMED_CXX" ; then make install prefix="$HOME/opt" ; fi
# run static analyzer
# TEST:
- if test "$VALGRIND" == yes ; then OPT=valgrind ; else OPT="" ; fi - if test "$VALGRIND" == yes ; then OPT=valgrind ; else OPT="" ; fi
- make -C regtest $OPT - if test "$PLUMED_CXX" ; then make -C regtest $OPT ; fi
- if test "$MAKEDOC" == yes ; then make -C regtest copytodoc ; fi - if test "$MAKEDOC" == yes ; then make -C regtest copytodoc ; fi
- if test "$MAKEDOC" == yes ; then make doc >/dev/null ; fi - if test "$MAKEDOC" == yes ; then make doc >/dev/null ; fi
- make -C regtest checkfail - if test "$MAKEDOC" == yes ; then make -C regtest checkfail ; fi
# CPPCHECK:
# this is required so as to have all the include files inplace:
# notice that this is done automatically in build
- if test "$CPPCHECK" == yes ; then make -C src/lib/ dirslinks ; fi
# then we do cppcheck
- if test "$CPPCHECK" == yes ; then make cppcheck ; fi - if test "$CPPCHECK" == yes ; then make cppcheck ; fi
after_success: after_success:
- if test "$MAKEDOC" == yes ; then ./.travis.pushdoc - if test "$MAKEDOC" == yes ; then ./.travis.pushdoc
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment