mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-08-03 11:23:49 +00:00
build: make clang-tidy checks opt-in
This commit is contained in:
+3
-1
@@ -22,6 +22,8 @@ set(CMAKE_CXX_SCAN_FOR_MODULES OFF)
|
||||
include(utils.cmake)
|
||||
include(CTest)
|
||||
|
||||
option(KYTY_ENABLE_CLANG_TIDY "Run clang-tidy checks during builds" OFF)
|
||||
|
||||
set(KYTY_THIRD_PARTY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../3rdparty")
|
||||
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
@@ -129,7 +131,7 @@ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0.0)
|
||||
common
|
||||
#launcher
|
||||
)
|
||||
list(APPEND KYTY_CLANG_TYDY
|
||||
list(APPEND KYTY_CLANG_TIDY
|
||||
kyty_emulator
|
||||
#common
|
||||
launcher
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ function(include_what_you_use_with_mappings target dirs mappings)
|
||||
endfunction()
|
||||
|
||||
function(clang_tidy_check target config headers dirs)
|
||||
if (CLANG AND ("${target}" IN_LIST KYTY_CLANG_TYDY) AND NOT KYTY_CLANG_CL)
|
||||
if (KYTY_ENABLE_CLANG_TIDY AND CLANG AND ("${target}" IN_LIST KYTY_CLANG_TIDY) AND NOT KYTY_CLANG_CL)
|
||||
find_program (CLANG_TIDY_EXE NAMES "clang-tidy")
|
||||
if (CLANG_TIDY_EXE)
|
||||
set(std_arg "-extra-arg=-std=c++${CMAKE_CXX_STANDARD}")
|
||||
@@ -41,7 +41,7 @@ function(clang_tidy_check target config headers dirs)
|
||||
endfunction()
|
||||
|
||||
function(clang_tidy_fix target config headers dirs)
|
||||
if (CLANG AND ("${target}" IN_LIST KYTY_CLANG_TYDY))
|
||||
if (KYTY_ENABLE_CLANG_TIDY AND CLANG AND ("${target}" IN_LIST KYTY_CLANG_TIDY))
|
||||
find_program (CLANG_TIDY_EXE NAMES "clang-tidy")
|
||||
if (CLANG_TIDY_EXE)
|
||||
set(std_arg "-extra-arg=-std=c++${CMAKE_CXX_STANDARD}")
|
||||
|
||||
Reference in New Issue
Block a user