diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index db517e3a8..f3ac79fce 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 89c88a63a..f1cd3b13e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)