Проверка с помощью clazy
This commit is contained in:
parent
e49aead06f
commit
6afe94efaf
17
CMLibClazy.cmake
Normal file
17
CMLibClazy.cmake
Normal file
@ -0,0 +1,17 @@
|
||||
function(add_clazy_check)
|
||||
list(GET ARGN 0 _target)
|
||||
set(_sources ${ARGN})
|
||||
list(REMOVE_AT _sources 0)
|
||||
|
||||
find_program(CLAZY_EXE
|
||||
NAMES clazy-standalone)
|
||||
if(CLAZY_EXE)
|
||||
add_custom_target(clazy-check
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND ${CLAZY_EXE} -extra-arg="-Wno-unknown-warning-option" -p ${CMAKE_BINARY_DIR} ${_sources})
|
||||
add_dependencies(clazy-check ${_target})
|
||||
else()
|
||||
message(WARNING "Clazy is not found")
|
||||
endif()
|
||||
endfunction()
|
||||
|
@ -32,6 +32,7 @@ include(CMLibCommonLibraryTarget)
|
||||
include(CMLibBuildTypes)
|
||||
include(CMLibCodeAnalysisPvsStudio)
|
||||
include(CMLibClangTidy)
|
||||
include(CMLibClazy)
|
||||
include(cotire)
|
||||
|
||||
include(CMLibBreathe)
|
||||
|
Loading…
Reference in New Issue
Block a user