Общие цели для проверок кода и работы с переводами
This commit is contained in:
parent
d8541fc081
commit
22afe7b94c
@ -10,10 +10,14 @@ function(add_clang_tidy_check)
|
||||
if(CLANG_TIDY_FIX)
|
||||
list(APPEND _args "-fix")
|
||||
endif()
|
||||
if(NOT TARGET clang-tidy-check)
|
||||
add_custom_target(clang-tidy-check)
|
||||
endif()
|
||||
add_custom_target(clang-tidy-check-${_target}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND ${CLANG_TIDY_EXE} -extra-arg="-Wno-unknown-warning-option" -p ${CMAKE_BINARY_DIR} ${_sources})
|
||||
add_dependencies(clang-tidy-check-${_target} ${_target})
|
||||
add_dependencies(clang-tidy-check clang-tidy-check-${_target})
|
||||
else()
|
||||
message(WARNING "ClangTidy is not found")
|
||||
endif()
|
||||
|
@ -6,10 +6,14 @@ function(add_clazy_check)
|
||||
find_program(CLAZY_EXE
|
||||
NAMES clazy-standalone)
|
||||
if(CLAZY_EXE)
|
||||
if(NOT TARGET clazy-check)
|
||||
add_custom_target(clazy-check)
|
||||
endif()
|
||||
add_custom_target(clazy-check-${_target}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND ${CLAZY_EXE} -checks=level2 -extra-arg="-Wno-unknown-warning-option" -p ${CMAKE_BINARY_DIR} ${_sources})
|
||||
add_dependencies(clazy-check-${_target} ${_target})
|
||||
add_dependencies(clazy-check clazy-check-${_target})
|
||||
else()
|
||||
message(WARNING "Clazy is not found")
|
||||
endif()
|
||||
|
@ -5,6 +5,9 @@ function(add_pvs_check)
|
||||
include(PVS-Studio)
|
||||
find_program(PVS_STUDIO_ANALYZER_EXE NAMES pvs-studio-analyzer)
|
||||
if(PVS_STUDIO_ANALYZER_EXE)
|
||||
if(NOT TARGET pvs-check)
|
||||
add_custom_target(pvs-check)
|
||||
endif()
|
||||
pvs_studio_add_target(TARGET pvs-check-${_target}
|
||||
DEPENDS ${_target}
|
||||
COMPILE_COMMANDS
|
||||
@ -13,6 +16,7 @@ function(add_pvs_check)
|
||||
CONFIG "${CMAKE_BINARY_DIR}/PVS-Studio-${_target}.cfg"
|
||||
CFG_TEXT "analysis-mode=29"
|
||||
MODE GA:1,2,3;64:1;OP:1,2;CS:1,2)
|
||||
add_dependencies(pvs-check pvs-check-${_target})
|
||||
else()
|
||||
message(WARNING "PVS-Studio is not found")
|
||||
endif()
|
||||
|
@ -48,6 +48,10 @@ function(qt_translation)
|
||||
qt5_add_resources(_qrc ${CMAKE_BINARY_DIR}/${_target}_l10n.qrc)
|
||||
add_custom_target(${_target}_qrc DEPENDS ${_qrc})
|
||||
add_custom_target(${_target}_l10n DEPENDS ${_l10n_targets})
|
||||
if(NOT TARGET l10n)
|
||||
add_custom_target(l10n)
|
||||
endif()
|
||||
add_dependencies(l10n ${_target}_l10n)
|
||||
|
||||
add_dependencies(${_target} ${_target}_qrc)
|
||||
target_sources(${_target} PUBLIC ${_qrc})
|
||||
|
Loading…
Reference in New Issue
Block a user