mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-23 04:45:43 +03:00
disable by default the use of clang-tidy
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
e409779233
commit
94c1c02a11
1 changed files with 11 additions and 0 deletions
|
@ -176,6 +176,17 @@ option(BUILD_GUI "BUILD_GUI" ON)
|
|||
# build the tests
|
||||
option(BUILD_TESTING "BUILD_TESTING" ON)
|
||||
|
||||
option(ENABLE_CLANG_TIDY "ENABLE_CLANG_TIDY" OFF)
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
find_program(CLANG_TIDY_EXE NAMES "clang-tidy")
|
||||
if (CLANG_TIDY_EXE)
|
||||
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_EXE} -checks=-*,modernize-use-auto,modernize-use-using,modernize-use-nodiscard,modernize-use-nullptr,modernize-use-override,cppcoreguidelines-pro-type-static-cast-downcast,modernize-use-default-member-init,cppcoreguidelines-pro-type-member-init,cppcoreguidelines-init-variables)
|
||||
endif()
|
||||
else()
|
||||
unset(CLANG_TIDY_EXE)
|
||||
unset(CMAKE_CXX_CLANG_TIDY)
|
||||
endif()
|
||||
|
||||
# When this option is enabled, 5xx errors are not added to the blacklist
|
||||
# Normally you don't want to enable this option because if a particular file
|
||||
# triggers a bug on the server, you want the file to be blacklisted.
|
||||
|
|
Loading…
Reference in a new issue