View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015945CMake(No Category)public2016-01-29 13:512016-06-10 14:21
ReporterGehua Yang 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformWindowsOSWindows OS Version10
Product VersionCMake 3.4.3 
Target VersionFixed in Version 
Summary0015945: "Target Platform Version" Option in Visual Sutio 2015
DescriptionI am trying to compile code and generate binaries that's compatible with Windows 7/8/8.1. Following MSDN's suggestion, I can set "Target Platform Version" under the General tag to use SDK 8.1, which works fine for me (see screenshot). The real problem is this change is not preserved after a CMake run.

This issue is very similar to Issue 0015686 and Issue 0015670. I read through the report under both and learned that one can use CMAKE_SYSTEM_VERSION to change the "Target Platform Version" value across all projects in a VS solution.

Perhaps it is not a bug and simply caused by not doing things right. But I cannot find any more documentation related to this on web. My apology in advance!
However, I tried to do that with CMake 3.4.3 (latest release from cmake.org), but the projects generated does not contain this TargetPlatformVersion tag and hence its value is still defaulted to 10.0.10240.0.
Steps To Reproduce1. In CMake GUI, set CMAKE_SYSTEM_VERSION to "8.1". Finish Cmake.
2. Open Visual Studio 2015 and open the property page of any project.
3. Go to "General" tab.

Additional InformationRelated to Issue 0015686 and Issue 0015670
TagsNo tags attached.
Attached Filespng file icon t.png [^] (51,982 bytes) 2016-01-29 13:51

 Relationships

  Notes
(0040370)
Brad King (manager)
2016-01-29 14:03

CMAKE_SYSTEM_VERSION must be defined from the beginning in a fresh build tree.
(0040373)
Brad King (manager)
2016-01-29 14:06

Documentation is here:

 https://cmake.org/cmake/help/v3.4/variable/CMAKE_SYSTEM_VERSION.html [^]
 https://cmake.org/cmake/help/v3.4/manual/cmake-toolchains.7.html#cross-compiling-for-windows-10-universal-applications [^]
(0040376)
Gehua Yang (reporter)
2016-01-29 14:24

Thanks, Brad!

It worked as you described! I missed the keyword **fresh** build tree.
(0040377)
Brad King (manager)
2016-01-29 14:30

The documentation uses the phrase "when first configuring a new build tree".

FYI, the reason is that all this information is stored persistently in CMakeFiles/$v/CMakeSystem.cmake which is only configured on the first run.
(0041271)
Kitware Robot (administrator)
2016-06-10 14:21

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2016-01-29 13:51 Gehua Yang New Issue
2016-01-29 13:51 Gehua Yang File Added: t.png
2016-01-29 14:03 Brad King Note Added: 0040370
2016-01-29 14:06 Brad King Note Added: 0040373
2016-01-29 14:24 Gehua Yang Note Added: 0040376
2016-01-29 14:30 Brad King Note Added: 0040377
2016-01-29 14:30 Brad King Status new => resolved
2016-01-29 14:30 Brad King Resolution open => no change required
2016-06-10 14:21 Kitware Robot Note Added: 0041271
2016-06-10 14:21 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team