mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 19:41:33 +00:00
Add clang-tidy
This commit is contained in:
parent
e371831086
commit
8056476d64
4 changed files with 28 additions and 0 deletions
|
@ -31,6 +31,23 @@ stages:
|
||||||
paths:
|
paths:
|
||||||
- build/install/
|
- 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:
|
Coverity:
|
||||||
extends: .Debian_Image
|
extends: .Debian_Image
|
||||||
stage: build
|
stage: build
|
||||||
|
@ -430,3 +447,4 @@ Debian_AndroidNDK_arm64-v8a:
|
||||||
- build/install/
|
- 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.
|
# 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
|
timeout: 1h30m
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,13 @@ if [[ $CI_OPENMW_USE_STATIC_DEPS ]]; then
|
||||||
)
|
)
|
||||||
fi
|
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
|
if [[ "${CMAKE_BUILD_TYPE}" ]]; then
|
||||||
CMAKE_CONF_OPTS+=(
|
CMAKE_CONF_OPTS+=(
|
||||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
|
||||||
|
|
|
@ -29,6 +29,7 @@ declare -rA GROUPED_DEPS=(
|
||||||
# These dependencies can alternatively be built and linked statically.
|
# These dependencies can alternatively be built and linked statically.
|
||||||
[openmw-deps-dynamic]="libmygui-dev libopenscenegraph-dev"
|
[openmw-deps-dynamic]="libmygui-dev libopenscenegraph-dev"
|
||||||
[coverity]="curl"
|
[coverity]="curl"
|
||||||
|
[clang-tidy]="clang-tidy"
|
||||||
|
|
||||||
# Pre-requisites for building MyGUI and OSG for static linking.
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
set(CMAKE_CXX_CLANG_TIDY "")
|
||||||
|
|
||||||
# Like `FetchContent_MakeAvailable` but passes EXCLUDE_FROM_ALL to `add_subdirectory`.
|
# Like `FetchContent_MakeAvailable` but passes EXCLUDE_FROM_ALL to `add_subdirectory`.
|
||||||
macro(FetchContent_MakeAvailableExcludeFromAll)
|
macro(FetchContent_MakeAvailableExcludeFromAll)
|
||||||
foreach(contentName IN ITEMS ${ARGV})
|
foreach(contentName IN ITEMS ${ARGV})
|
||||||
|
|
Loading…
Reference in a new issue