From 67cbb07e511990633130d3b8029394a22e902c7e Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Fri, 2 Oct 2020 11:31:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0=20=D1=84=D0=BB=D0=B0=D0=B3=D0=BE=D0=B2=20=D0=B2=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B2=D0=B8=D1=81=D0=B8=D0=BC=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=B8=20=D0=BE=D1=82=20=D1=82=D0=B8=D0=BF=D0=B0=20=D1=86=D0=B5?= =?UTF-8?q?=D0=BB=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMLibCodeAnalysisPvsStudio.cmake | 10 ++++++++-- hpp/pvs_studio.hpp.in | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMLibCodeAnalysisPvsStudio.cmake b/CMLibCodeAnalysisPvsStudio.cmake index c1b927a..78d719e 100644 --- a/CMLibCodeAnalysisPvsStudio.cmake +++ b/CMLibCodeAnalysisPvsStudio.cmake @@ -16,10 +16,16 @@ function(add_pvs_check target) MODE GA:1,2,3;64:1;OP:1,2;CS:1,2) add_dependencies(pvs-check pvs-check-${target}) configure_file("${CMLIB_MODULE_DIR}/hpp/pvs_studio.hpp.in" "${CMAKE_BINARY_DIR}/include/pvs_studio.hpp") + get_target_property(target_type ${target} TYPE) + if (${target_type} STREQUAL "INTERFACE_LIBRARY") + set(target_type INTERFACE) + else() + set(target_type PRIVATE) + endif() if(MSVC) - target_compile_options(${target} PUBLIC /FI "${CMAKE_BINARY_DIR}/include/pvs_studio.hpp") + target_compile_options(${target} ${target_type} /FI "${CMAKE_BINARY_DIR}/include/pvs_studio.hpp") else() # GCC/Clang - target_compile_options(${target} PUBLIC -include "${CMAKE_BINARY_DIR}/include/pvs_studio.hpp") + target_compile_options(${target} ${target_type} -include "${CMAKE_BINARY_DIR}/include/pvs_studio.hpp") endif() else() message(STATUS "CMLIB warning:") diff --git a/hpp/pvs_studio.hpp.in b/hpp/pvs_studio.hpp.in index 5535008..2b75d74 100644 --- a/hpp/pvs_studio.hpp.in +++ b/hpp/pvs_studio.hpp.in @@ -3,7 +3,6 @@ #pragma once -//-V::801 //-V813_MINSIZE=33 #endif // PVS_STUDIO_HPP_