]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix buid with no PVS
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 13 Mar 2019 16:43:55 +0000 (16:43 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 13 Mar 2019 16:43:55 +0000 (16:43 +0000)
CMakeLists.txt

index 9e5fb9ecec8745997ccc139a41511f4a735db61a..ecd2440baf8b2613aab8b9454f117f33d62cb958 100644 (file)
@@ -1414,8 +1414,12 @@ ENDIF(NOT DEBIAN_BUILD)
 
 
 # PVS Studio
-include(${CMAKE_SOURCE_DIR}/PVS-Studio.cmake)
-pvs_studio_add_target(TARGET ${PROJECT_NAME}.analyze
-               ANALYZE ${PROJECT_NAME} rspamd-server rspamadm rspamc
-               OUTPUT FORMAT errorfile
-               LOG target_${PROJECT_NAME}.err)
\ No newline at end of file
+find_program(_PVS_STUDIO "pvs-studio-analyzer")
+
+if(_PVS_STUDIO)
+       include(${CMAKE_SOURCE_DIR}/PVS-Studio.cmake)
+       pvs_studio_add_target(TARGET ${PROJECT_NAME}.analyze
+                       ANALYZE ${PROJECT_NAME} rspamd-server rspamadm rspamc
+                       OUTPUT FORMAT errorfile
+                       LOG target_${PROJECT_NAME}.err)
+endif()
\ No newline at end of file