Skip to content
Snippets Groups Projects
Commit 17f138b1 authored by Lars Bilke's avatar Lars Bilke
Browse files

[Jenkins] Added cppcheck to Docker build.

parent 940ef90b
No related branches found
No related tags found
No related merge requests found
......@@ -64,6 +64,7 @@ include(test/Test)
if(OGS_COVERAGE AND NOT IS_SUBPROJECT)
include(Coverage)
endif()
include(CppCheck)
####################
### More Options ###
......
......@@ -98,6 +98,7 @@ pipeline {
build { target="tests" }
build { target="ctest" }
build { target="doc" }
build { target="cppcheck" }
}
}
post {
......@@ -117,6 +118,7 @@ pipeline {
],
tools: [doxygen(pattern: 'build/DoxygenWarnings.log')],
failedTotalAll: 1
recordIssues tools: [cppCheck(pattern: 'build/cppcheck.log')]
}
success {
publishHTML(target: [allowMissing: false, alwaysLinkToLastBuild: true,
......
if(NOT CPPCHECK_TOOL_PATH)
return()
endif()
if(DEFINED ENV{NUM_THREADS})
set(CPPCHECK_THREADS -j $ENV{NUM_THREADS})
endif()
add_custom_target(cppcheck
COMMAND ${CPPCHECK_TOOL_PATH}
# --force
--enable=all
# --inconclusive
${CPPCHECK_THREADS}
-i ${PROJECT_BINARY_DIR}/CMakeFiles
-i ${PROJECT_SOURCE_DIR}/ThirdParty
-i ${PROJECT_SOURCE_DIR}/Applications/DataExplorer
-i ${PROJECT_SOURCE_DIR}/Tests
--xml --xml-version=2
--output-file=${PROJECT_BINARY_DIR}/cppcheck.log
${PROJECT_SOURCE_DIR}
)
......@@ -18,7 +18,7 @@ endif()
# Find gnu profiler gprof
find_program(GPROF_PATH gprof DOC "GNU profiler gprof" QUIET)
find_package(cppcheck QUIET)
find_program(CPPCHECK_TOOL_PATH cppcheck)
find_package(PythonInterp QUIET)
......
......@@ -43,7 +43,6 @@ USER root
RUN apt-get update && apt-get install -y \
biber \
clang-tidy \
cppcheck \
doxygen \
graphviz \
libxml2-utils \
......@@ -54,6 +53,14 @@ RUN curl https://include-what-you-use.org/downloads/include-what-you-use-0.8-x86
&& tar xf include-what-you-use-0.8-x86_64-linux-gnu-ubuntu-16.04.tar.gz -C /usr/ --strip-components=1 \
&& rm include-what-you-use-0.8-x86_64-linux-gnu-ubuntu-16.04.tar.gz
# cppcheck
RUN curl -L -o 1.86.tar.gz https://github.com/danmar/cppcheck/archive/1.86.tar.gz \
&& tar xf 1.86.tar.gz \
&& cd cppcheck-1.86 \
&& make SRCDIR=build CFGDIR=/usr/share/cppcheck/ CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" \
&& make install CFGDIR=/usr/share/cppcheck/ \
&& cd .. && rm -r cppcheck-1.86 1.86.tar.gz
RUN apt-get install -y mesa-common-dev libgl1-mesa-dev libxt-dev wget
USER jenkins
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