Установка флагов в зависимости от типа цели
This commit is contained in:
		@@ -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:")
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,6 @@
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
//-V::801
 | 
			
		||||
//-V813_MINSIZE=33
 | 
			
		||||
 | 
			
		||||
#endif // PVS_STUDIO_HPP_
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user