Setting CMAKE_SYSTEM_VERSION is confusing (for Windows 10 SDK selection)
In #15670 (closed) support was added for setting the "Windows target platform version" in the VS2015 generator.
The first thing I tried was
set( CMAKE_SYSTEM_VERSION 10.0.10586.0) within the CMakeLists file, which didn't have any effect. I then tried it on the command line via
-DCMAKE... which worked. Since command line arguments are cache variables I thought I'd try
set( CMAKE_SYSTEM_VERSION 10.0.10586.0 CACHE INTERNAL "") within CMakeLists but that didn't work. Now, this whole process took quite long and it was hard to debug, especially since there was only sparse documentation related to choosing the "Windows target platform version" in cmake.
I still don't know if my approach with the command line argument is the right one. I would be happy about advice but also to use this issue for tracking any improvements to documentation regarding this feature.