1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-23 00:04:06 +00:00

build: skip clang-tidy on lgtm (#1792)

* build: skip clang-tidy on lgtm

* build: skip clang-tidy on appveyor

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
This commit is contained in:
Charles Kerr 2021-09-12 14:36:51 -05:00 committed by GitHub
parent 4c1b627647
commit 90605d4bd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,6 +30,7 @@ tr_auto_option(ENABLE_MAC "Build Mac client" AUTO)
option(ENABLE_NLS "Enable native language support" ON)
option(INSTALL_DOC "Build/install documentation" ON)
option(INSTALL_LIB "Install the library" OFF)
tr_auto_option(RUN_CLANG_TIDY "Run clang-tidy on the code" AUTO)
tr_auto_option(USE_SYSTEM_EVENT2 "Use system event2 library" AUTO)
tr_auto_option(USE_SYSTEM_DHT "Use system dht library" AUTO)
tr_auto_option(USE_SYSTEM_MINIUPNPC "Use system miniupnpc library" AUTO)
@ -613,7 +614,17 @@ else()
endif()
endif()
if(NOT CMAKE_VERSION VERSION_LESS "3.7.2")
if(RUN_CLANG_TIDY STREQUAL "AUTO")
if (DEFINED ENV{LGTM_SRC} OR DEFINED ENV{APPVEYOR}) # skip clang-tidy on LGTM/appveyor
set(RUN_CLANG_TIDY OFF)
elseif(CMAKE_VERSION VERSION_LESS "3.7.2")
set(RUN_CLANG_TIDY OFF)
else()
set(RUN_CLANG_TIDY ON)
endif()
endif()
if(RUN_CLANG_TIDY)
message(STATUS "Looking for clang-tidy")
find_program(CLANG_TIDY clang-tidy)
if (CLANG_TIDY STREQUAL "CLANG_TIDY-NOTFOUND")