Visual Studio Generators: Compiler Warnings from imported targets
As discussed on slack:
According to the discussion on slack linking an imported target should add the INTERFACE_INCLUDE_DIRECTORIES of it as SYSTEM headers to the build target. Despite that using eigen3 generates a lot of warnings from the eigen headers in my project.
Moving the include dirs from C/C++->General->Additional Includes
to VC++-Directories->Include Directories
removes the warnings. (Names could be different due to translation from german)
The change in the vcxproj is: (I only changed the Release configuration)
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>$(IncludePath);$(VC_IncludePath);$(WindowsSDK_IncludePath);C:\Sources\Extern\vcpkg\installed\x64-windows-static\include\eigen3;C:\Sources\Extern\vcpkg\installed\x64-windows-static\include</IncludePath>
</PropertyGroup>
while cmake uses:
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories><*snip*>;C:\Sources\Extern\vcpkg\installed\x64-windows-static\include;C:\Sources\Extern\vcpkg\installed\x64-windows-static\include\eigen3;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
(Side Note: I use clang-cl via llvm toolset in VS 2019)