From e130c1fbf9587e81675c8e905242aa4d15f26da8 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Wed, 27 Aug 2014 22:55:16 +0100 Subject: [PATCH] Use scan-build when invoking clang --- jenkins-ci-build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jenkins-ci-build.sh b/jenkins-ci-build.sh index 83b46870..f5559de4 100755 --- a/jenkins-ci-build.sh +++ b/jenkins-ci-build.sh @@ -41,9 +41,13 @@ if [ -n "${CPPCHECK}" ]; then cppcheck --enable=all --max-configs=1 --xml --xml-version=2 code 2> ${CPPCHECK} fi - ln -s ${CPPCHECK} cppcheck.xml + ln -sf ${CPPCHECK} cppcheck.xml fi -make -j${CORES} distclean ${BUILD_TYPE} +if [ "${CC}" == "clang" ]; then + MAKE_PREFIX="scan-build" +fi + +${MAKE_PREFIX} make -j${CORES} distclean ${BUILD_TYPE} exit $?