mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2024-12-29 12:20:41 +00:00
Add clang-tidy
This commit is contained in:
parent
e371831086
commit
8056476d64
@ -31,6 +31,23 @@ stages:
|
||||
paths:
|
||||
- build/install/
|
||||
|
||||
Clang_Tidy:
|
||||
extends: .Debian_Image
|
||||
stage: build
|
||||
rules:
|
||||
- if: '$CI_PIPELINE_SOURCE == "schedule"'
|
||||
before_script:
|
||||
- CI/install_debian_deps.sh gcc openmw-deps openmw-deps-dynamic clang-tidy clang
|
||||
script:
|
||||
- CI/before_script.linux.sh
|
||||
- cd build
|
||||
- cmake --build . -- -j $(nproc)
|
||||
variables:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
CI_CLANG_TIDY: 1
|
||||
timeout: 8h
|
||||
|
||||
Coverity:
|
||||
extends: .Debian_Image
|
||||
stage: build
|
||||
@ -430,3 +447,4 @@ Debian_AndroidNDK_arm64-v8a:
|
||||
- build/install/
|
||||
# When CCache doesn't exist (e.g. first build on a fork), build takes more than 1h, which is the default for forks.
|
||||
timeout: 1h30m
|
||||
|
||||
|
@ -34,6 +34,13 @@ if [[ $CI_OPENMW_USE_STATIC_DEPS ]]; then
|
||||
)
|
||||
fi
|
||||
|
||||
if [[ $CI_CLANG_TIDY ]]; then
|
||||
CMAKE_CONF_OPTS+=(
|
||||
-DCMAKE_CXX_CLANG_TIDY='clang-tidy;-checks=-*,boost-*,clang-analyzer-*,concurrency-*,performance-*,-header-filter=.*,bugprone-*,misc-definitions-in-headers,misc-misplaced-const,misc-redundant-expression'
|
||||
)
|
||||
fi
|
||||
|
||||
|
||||
if [[ "${CMAKE_BUILD_TYPE}" ]]; then
|
||||
CMAKE_CONF_OPTS+=(
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||
|
@ -29,6 +29,7 @@ declare -rA GROUPED_DEPS=(
|
||||
# These dependencies can alternatively be built and linked statically.
|
||||
[openmw-deps-dynamic]="libmygui-dev libopenscenegraph-dev"
|
||||
[coverity]="curl"
|
||||
[clang-tidy]="clang-tidy"
|
||||
|
||||
# Pre-requisites for building MyGUI and OSG for static linking.
|
||||
#
|
||||
|
2
extern/CMakeLists.txt
vendored
2
extern/CMakeLists.txt
vendored
@ -1,5 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
set(CMAKE_CXX_CLANG_TIDY "")
|
||||
|
||||
# Like `FetchContent_MakeAvailable` but passes EXCLUDE_FROM_ALL to `add_subdirectory`.
|
||||
macro(FetchContent_MakeAvailableExcludeFromAll)
|
||||
foreach(contentName IN ITEMS ${ARGV})
|
||||
|
Loading…
Reference in New Issue
Block a user