VS_PLATFORM_TOOLSET does not work
Setting VS_PLATFORM_TOOLSET has no effect on the generated output.
For example, the following:
project(MyProject)
file(GLOB MYFILE "${CMAKE_CURRENT_SOURCE_DIR}/main.c")
add_executable(MyProject ${MYFILE})
set_target_properties(MyProject PROPERTIES VS_PLATFORM_TOOLSET "WindowsKernelModeDriver10.0")
You would expect a target called MyProject to be created with a Platform Toolset specified as "WindowsKernelModeDriver10.0", but instead what happens is that it gets generated with the most recent platform toolset, as if set_target_properties
is not getting called at all.
It is fine for my purposes, since I am creating a driver project, but I can imagine this being problematic with multi-project CMakeLists.txt which contain a mixture of drivers and userspace applications.