VS: Add option for per-target PlatformToolset
VS_PLATFORM_TOOLSET target property to set
.vcxproj file for specific targets. Document that this is safe
only when the named toolset uses the same underlying compiler as the
Proposing the feature discussed in #17429 (closed)
VS_PLATFORM_TOOLSET target property that allows the developer to override the
<PlatformToolset> element of the generated Visual Studio project.
This is only supported when the compiler used by the specified toolset is the same as the compiler used to build the rest of the source tree.
As @zambamingi explained in the bug description
[...] there are platform toolsets used which don't necessarily change the compiler, for example 'WindowsUserModeDriver10.0' or 'WindowsKernelModeDriver10.0'. It's common in driver build environments to have a project using the 'WindowsUserModeDriver10.0' platform toolset and another projects using the 'WindowsKernelModeDriver10.0' platform toolset. Doing this in one cmake generation allows building the whole driver at once. This patch allows such overriding at the target level.
Fixes: #17429 (closed)