[cmake-developers] [CMake 0016014]: Cannot change "Target Platform Version" in MSVC2015

Mantis Bug Tracker mantis at public.kitware.com
Sat Mar 12 11:47:14 EST 2016


The following issue has been SUBMITTED. 
====================================================================== 
https://cmake.org/Bug/view.php?id=16014 
====================================================================== 
Reported By:                Nikolai
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   16014
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   urgent
Status:                     new
====================================================================== 
Date Submitted:             2016-03-12 11:47 EST
Last Modified:              2016-03-12 11:47 EST
====================================================================== 
Summary:                    Cannot change "Target Platform Version" in MSVC2015
Description: 
Based on source code for CMake 3.5. Now WindowsTargetPlatformVersion is set
using cmGlobalVisualStudio14Generator::GetWindows10SDKVersion() function and
there is no way to set it manualy. So it's impossible to build projects using
SDK versions other than the latest one.

This feature was added in
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f077996 It's said that "The
:variable:`CMAKE_SYSTEM_VERSION` variable may be set to specify a
 version." But it obviously doesn't work it that case.

I propose to add checking for property CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION
already set before trying to get it using GetWindows10SDKVersion(). Example
solution is given in patch file attachment. Though I suppose it's not the best
way to do it.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-03-12 11:47 Nikolai        New Issue                                    
2016-03-12 11:47 Nikolai        File Added:
0001-Try-to-get-CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION-.patch                 
  
======================================================================



More information about the cmake-developers mailing list