mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
ci: fix cppcheck job
This commit is contained in:
parent
c7c513a5f6
commit
9b594d3185
2 changed files with 5 additions and 41 deletions
|
@ -168,47 +168,21 @@ test:flake8:
|
|||
tags:
|
||||
- docker
|
||||
|
||||
test:cppcheck 1/2:
|
||||
test:cppcheck:
|
||||
stage: test
|
||||
needs: ["build:fedora:x86_64"]
|
||||
script:
|
||||
- cppcheck -j $(nproc)
|
||||
--max-configs=32
|
||||
--error-exitcode=1
|
||||
--quiet
|
||||
--std=c++11
|
||||
-I include
|
||||
-I common/include
|
||||
src/
|
||||
lib/
|
||||
tests/unit/ | tee cppcheck-error.log
|
||||
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
|
||||
dependencies:
|
||||
- build:fedora:x86_64
|
||||
tags:
|
||||
- docker
|
||||
artifacts:
|
||||
when: on_failure
|
||||
paths:
|
||||
- cppcheck-error.log
|
||||
expose_as: 'cppcheck-error'
|
||||
|
||||
test:cppcheck 2/2:
|
||||
stage: test
|
||||
needs: ["build:fedora:x86_64"]
|
||||
allow_failure: true
|
||||
script:
|
||||
- cppcheck -j $(nproc)
|
||||
--max-configs=32
|
||||
--error-exitcode=1
|
||||
--quiet
|
||||
--inline-suppr
|
||||
--enable=warning,performance,portability,information,missingInclude
|
||||
--std=c++11
|
||||
-I include
|
||||
-I common/include
|
||||
src/
|
||||
lib/
|
||||
tests/unit/ | tee cppcheck-warn.log
|
||||
tests/unit/ | tee cppcheck.log
|
||||
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
|
||||
dependencies:
|
||||
- build:fedora:x86_64
|
||||
|
@ -217,8 +191,8 @@ test:cppcheck 2/2:
|
|||
artifacts:
|
||||
when: on_failure
|
||||
paths:
|
||||
- cppcheck-warn.log
|
||||
expose_as: 'cppcheck-warn'
|
||||
- cppcheck.log
|
||||
expose_as: cppcheck
|
||||
|
||||
test:unit:
|
||||
stage: test
|
||||
|
|
|
@ -133,7 +133,6 @@ cmake_dependent_option(WITH_SRC "Build executables"
|
|||
cmake_dependent_option(WITH_FPGA "Build with support for VILLASfpga" ON "XIL_FOUND" OFF)
|
||||
cmake_dependent_option(WITH_TOOLS "Build auxilary tools" ON "TOPLEVEL_PROJECT" OFF)
|
||||
cmake_dependent_option(WITH_TESTS "Run tests" ON "TOPLEVEL_PROJECT" OFF)
|
||||
cmake_dependent_option(WITH_CPPCHECK "Run cppcheck" OFF "TOPLEVEL_PROJECT" OFF)
|
||||
cmake_dependent_option(WITH_PLUGINS "Build plugins" ON "TOPLEVEL_PROJECT" OFF)
|
||||
cmake_dependent_option(WITH_CLIENTS "Build client applications" ON "TOPLEVEL_PROJECT" OFF)
|
||||
cmake_dependent_option(WITH_DOC "Build documentation" ON "TOPLEVEL_PROJECT" OFF)
|
||||
|
@ -174,15 +173,6 @@ include(cmake/config/Profiling.cmake)
|
|||
# Get version info and buildid from Git
|
||||
GetVersion(${PROJECT_SOURCE_DIR} "CMAKE_PROJECT")
|
||||
|
||||
if(WITH_CPPCHECK)
|
||||
find_program(CMAKE_CXX_CPPCHECK NAMES cppcheck)
|
||||
if (CMAKE_CXX_CPPCHECK)
|
||||
list(APPEND CMAKE_CXX_CPPCHECK
|
||||
"-D__x86_64__"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(etc)
|
||||
add_subdirectory(lib)
|
||||
|
|
Loading…
Add table
Reference in a new issue