MantisBT - CMake
View Issue Details
0013774CMakeCMakepublic2012-12-04 10:512013-07-01 09:38
Filip Konvicka (LOGIS) 
Brad King 
CMake 2.8.11CMake 2.8.11 
0013774: Support v110_xp target with MSVC 2012 Update 1
Microsoft has released an important update to MSVC (MSVC 2012 Update 1) that allows us to build applications that target Windows 2003 and Windows XP. This requires that a new non-default toolset is used for the build: v110_xp (the default is called v110). There is no way I know of in CMake to do this properly, as the generator is fixed on v110. This is blocking us from using MSVC 2012 with CMake.

Perhaps adding a clone of the current generator with a different name and a different target toolset is sufficient...?
Interesting links on the subject: [^] [^]
No tags attached.
related to 0010722closed Brad King Add PlatformToolset support to Visual Studio 2010 generator 
zip (3,407) 2012-12-06 05:15
gz 7ecaa404+vs-platform-toolset-1.tar.gz (5,898) 2012-12-17 09:11
Issue History
2012-12-04 10:51Filip Konvicka (LOGIS)New Issue
2012-12-04 13:10Brad KingRelationship addedrelated to 0010722
2012-12-04 13:16Brad KingNote Added: 0031828
2012-12-05 10:41Brad KingNote Added: 0031834
2012-12-05 10:59Filip Konvicka (LOGIS)Note Added: 0031836
2012-12-06 05:15Filip Konvicka (LOGIS)File Added:
2012-12-06 05:19Filip Konvicka (LOGIS)Note Added: 0031840
2012-12-06 06:04Filip Konvicka (LOGIS)Note Added: 0031841
2012-12-06 07:59Brad KingNote Added: 0031842
2012-12-06 08:04Filip Konvicka (LOGIS)Note Added: 0031843
2012-12-08 22:55David ManuraNote Added: 0031859
2012-12-17 09:11Brad KingFile Added: 7ecaa404+vs-platform-toolset-1.tar.gz
2012-12-17 09:11Brad KingNote Added: 0031905
2013-02-08 13:46Brad KingNote Added: 0032228
2013-02-08 13:46Brad KingAssigned To => Brad King
2013-02-08 13:46Brad KingStatusnew => resolved
2013-02-08 13:46Brad KingResolutionopen => fixed
2013-02-08 13:46Brad KingFixed in Version => CMake 2.8.11
2013-02-08 13:46Brad KingTarget Version => CMake 2.8.11
2013-07-01 09:38Robert MaynardNote Added: 0033430
2013-07-01 09:38Robert MaynardStatusresolved => closed

Brad King   
2012-12-04 13:16   
Issue 0010722 discusses general PlatformToolset selection, though that is harder than this because it wants to mix VS versions.

Since that issue was last discussed there is now this variable: [^]

added here:;a=commitdiff;h=89595d6b [^]

Currently it is only meant for the VS generators to provide information. Setting it has no effects.

When we added CMAKE_VS_PLATFORM_TOOLSET the name was chosen so that it could make sense to allow it to be set in the future, as in something like

 cmake -G"Visual Studio 2011" -DCMAKE_VS_PLATFORM_TOOLSET=v110_xp

However, additional changes will be needed to make that work.
Brad King   
2012-12-05 10:41   
We could also consider complementing the "-G" (Generator) option with a new "-GT" (Generator Toolset) option to set CMAKE_VS_PLATFORM_TOOLSET automatically. An equivalent option would also be needed in cmake-gui.

The -GT option could be generalized for use with the Xcode generator in the future.
Filip Konvicka (LOGIS)   
2012-12-05 10:59   
The -G option sounds nice (in fact, I proposed the same in the original post).
Filip Konvicka (LOGIS)   
2012-12-06 05:19   
I attached a patch that adds new generators (that inherit from existing ones). It seems to be working fine.
Filip Konvicka (LOGIS)   
2012-12-06 06:04   
I now realize that I misunderstood your previous comment. Adding -GT would be nice, but I understand it is a bit more complicated than what I did. Obviously, my approach does not scale as well.
Brad King   
2012-12-06 07:59   
Re 0013774:0031841: FYI, there is also a pull request using the generator name for this: [^]

but as I commented there I don't want to add another dimension of information to the generator name. The target platform shouldn't have been there either but is for historical reasons.
Filip Konvicka (LOGIS)   
2012-12-06 08:04   
I completely agree. Hopefully my patch can help someone before an official solution is available.
David Manura   
2012-12-08 22:55   
My current workaround is to just change "v110" to "v110_xp" in Source/cmGlobalVisualStudio11Generator.cxx and recompile cmake. There should be a way to do this without recompiling though.
Brad King   
2012-12-17 09:11   
Attachment "7ecaa404+vs-platform-toolset-1.tar.gz" contains a work-in-progress patch series to address this issue by adding support for a cmake "-T" option to specify a generator-specific toolset. Additional work is in progress to update cmake-gui to set this too.
Brad King   
2013-02-08 13:46   
The work mentioned in 0013774:0031905 has matured and been merged to 'master' here:;a=commitdiff;h=7dab9977 [^]

It addresses the more general issue 0010722 and as a result subsumes this issue.
Robert Maynard   
2013-07-01 09:38   
Closing resolved issues that have not been updated in more than 4 months.