Compare commits

...

2 Commits

2 changed files with 22 additions and 14 deletions

View File

@ -11,9 +11,13 @@ if(BUILD_BREATHE_DOC STREQUAL AUTO)
include(FindPythonModule)
find_python_module(breathe)
find_python_module(recommonmark)
if(DOXYGEN_FOUND AND PERL_FOUND AND PYTHONINTERP_FOUND AND SPHINX_FOUND AND breathe AND recommonmark)
if(DOXYGEN_FOUND AND PERL_FOUND AND PYTHONINTERP_FOUND AND SPHINX_FOUND AND breathe_FOUND AND recommonmark_FOUND)
set(BUILD_BREATHE_DOC ON CACHE STRING "Enable documntation in Breathe format" FORCE)
else()
set(BUILD_BREATHE_DOC OFF CACHE STRING "Disable documentation in Breathe format" FORCE)
endif()
else()
set(BUILD_BREATHE_DOC OFF CACHE STRING "Disable documentation in Breathe format" FORCE)
endif()
elseif(BUILD_BREATHE_DOC)
find_package(Doxygen REQUIRED)
@ -24,9 +28,9 @@ elseif(BUILD_BREATHE_DOC)
include(FindPythonModule)
find_python_module(breathe REQUIRED)
find_python_module(recommonmark REQUIRED)
set(BUILD_BREATHE_DOC ON CACHE STRING "Enable documntation in Breathe format" FORCE)
set(BUILD_BREATHE_DOC ON CACHE STRING "Enable documentation in Breathe format" FORCE)
else()
set(BUILD_BREATHE_DOC OFF CACHE STRING "Enable documntation in Breathe format" FORCE)
set(BUILD_BREATHE_DOC OFF CACHE STRING "Disable documentation in Breathe format" FORCE)
endif()
function(add_breathe_doc)

View File

@ -1,18 +1,22 @@
function(add_pvs_check)
list(GET ARGN 0 _target)
include(PVS-Studio)
find_program(PVS_STUDIO_ANALYZER_EXE NAMES pvs-studio-analyzer)
if(PVS_STUDIO_ANALYZER_EXE)
pvs_studio_add_target(TARGET pvs-check-${_target}
DEPENDS ${_target}
COMPILE_COMMANDS
HIDE_HELP
OUTPUT FORMAT errorfile
CFG_TEXT "analysis-mode=29"
MODE GA:1,2,3;64:1;OP:1,2;CS:1,2)
if (CMAKE_EXPORT_COMPILE_COMMANDS)
include(PVS-Studio)
find_program(PVS_STUDIO_ANALYZER_EXE NAMES pvs-studio-analyzer)
if(PVS_STUDIO_ANALYZER_EXE)
pvs_studio_add_target(TARGET pvs-check-${_target}
DEPENDS ${_target}
COMPILE_COMMANDS
HIDE_HELP
OUTPUT FORMAT errorfile
CFG_TEXT "analysis-mode=29"
MODE GA:1,2,3;64:1;OP:1,2;CS:1,2)
else()
message(WARNING "PVS-Studio is not found")
endif()
else()
message(WARNING "PVS-Studio is not found")
message(WARNING "Option CMAKE_EXPORT_COMPILE_COMMANDS is not set. PVS checks will be disabled.")
endif()
endfunction()