Skip to content
Snippets Groups Projects
Commit 0a12a293 authored by kongr45gpen's avatar kongr45gpen
Browse files

Merge branch 'build-fix'

parents 1f391e11 24721fb9
No related branches found
No related tags found
No related merge requests found
image: rikorose/gcc-cmake
before_script:
- apt-get update -qq && apt-get install -y -qq cppcheck vera++ clang-tidy
- apt-get update -qq && apt-get install -y -qq cppcheck vera++ clang-tidy-4.0
- g++ --version
- cppcheck --version
- vera++ --version
- clang-tidy-4.0 --version
- cp ci/vera.profile /usr/lib/vera++/profiles/custom
build:
......
cmake_minimum_required(VERSION 3.9)
cmake_minimum_required(VERSION 3.7)
project(ecss_services)
# Set C++ version to c++17
......@@ -7,5 +7,11 @@ set(CMAKE_CXX_STANDARD 17)
# Specify the directories for #includes
include_directories("${PROJECT_SOURCE_DIR}/inc")
add_custom_target(check
COMMAND ./cppcheck.sh
COMMAND ./vera.sh
COMMAND ./clang-tidy.sh
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/ci")
# Specify the .cpp files for the executables
add_executable(ecss_services src/main.cpp src/Message.cpp src/Service.cpp src/Services/TestService.cpp)
......@@ -17,7 +17,7 @@ Checks: >
-misc-non-private-member-variables-in-classes,
performance-*,
readability-*,
WarningsAsErrors: '*,-misc-unused-parameters,-llvm-header-guard,-cppcoreguidelines-pro-type-member-init, -google-runtime-references'
WarningsAsErrors: '*,-misc-unused-parameters,-llvm-header-guard,-cppcoreguidelines-pro-type-member-init,-google-runtime-references'
HeaderFilterRegex: '.*'
AnalyzeTemporaryDtors: false
...
......
......@@ -7,5 +7,8 @@
# $ ci/clang-tidy.sh
#
echo -e "\033[0;34mRunning clang-tidy...\033[0m"
cd "$(dirname "$0")"
clang-tidy `find ../src/ -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'` -- -std=c++11 -I../inc
clang-tidy-4.0 `find ../src/ -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'` \
-- -std=c++14 -I../inc
......@@ -7,5 +7,7 @@
# $ ci/cppcheck.sh
#
echo -e "\033[0;34mRunning cppcheck...\033[0m"
cd "$(dirname "$0")/.."
cppcheck --enable=all --error-exitcode=1 -I inc src
......@@ -7,5 +7,7 @@
# $ ci/vera.sh
#
echo -e "\033[0;34mRunning vera++...\033[0m"
cd "$(dirname "$0")/.."
vera++ --error --profile custom `find src inc -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'`
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