PVS Studio требует для работы CMAKE_EXPORT_COMPILE_COMMANDS
This commit is contained in:
parent
d9fde68239
commit
bee451685f
@ -1,6 +1,7 @@
|
||||
function(add_pvs_check)
|
||||
list(GET ARGN 0 _target)
|
||||
|
||||
if (CMAKE_EXPORT_COMPILE_COMMANDS)
|
||||
include(PVS-Studio)
|
||||
find_program(PVS_STUDIO_ANALYZER_EXE NAMES pvs-studio-analyzer)
|
||||
if(PVS_STUDIO_ANALYZER_EXE)
|
||||
@ -14,5 +15,8 @@ function(add_pvs_check)
|
||||
else()
|
||||
message(WARNING "PVS-Studio is not found")
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "Option CMAKE_EXPORT_COMPILE_COMMANDS is not set. PVS checks will be disabled.")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user