Add target property to set CAExcludePath in Visual Studio projects
Visual studio generates a lot of code analysis warnings from standard and third party headers.
To avoid this you have to set the CAExcludePath property in the projects
My suggestion is to automatically set all default headers and all target include directories marked as SYSTEM to be excluded.
Another solution could be to set an explicit target property:
set_target_properties(tgt PROPERTIES VS_CA_EXCLUDE_PATH "${Boost_INCLUDE_DIRS}")
The generated project should include this:
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<PropertyGroup Condition="'$(Language)'=='C++'">
<CAExcludePath>C:/dev/boost/1_68_0/include;$(CAExcludePath)</CAExcludePath>
</PropertyGroup>
Edited by Peter Gerell