summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-03-13 16:43:55 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-03-13 16:43:55 +0000
commit6cedc4fe941b4db5f4a92735b4792490b26519ff (patch)
tree6439f25e092d479af19c6db62118b3a94a56f4f4 /CMakeLists.txt
parentf7aee39a9dc81ae437e1dcc651a7335a7ae071d3 (diff)
downloadrspamd-6cedc4fe941b4db5f4a92735b4792490b26519ff.tar.gz
rspamd-6cedc4fe941b4db5f4a92735b4792490b26519ff.zip
[Minor] Fix buid with no PVS
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 9 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e5fb9ece..ecd2440ba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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