MantisBT - CMake
View Issue Details
0014038CMake(No Category)public2013-03-22 16:352013-10-07 10:04
szx 
Brad King 
normalminorhave not tried
closedfixed 
CMake 2.8.10.2 
CMake 2.8.11CMake 2.8.11 
0014038: Generate different .sln header for Express edition of Visual Studio
When you open a CMake-generated .sln file in Visual Studio 2012 Express and you have another version of Visual Studio installed (like VC++ 2010 Express), a selection dialog will show up offering you to choose which version of Visual Studio to use to open the solution file.

However if you create a solution from within Visual Studio 2012 Express itself, there will be no dialog when you open the solution but it will open immediately in VS 2012 Express.
I've done a bit of research on the subject and found that the second line of .sln files created by VS 2012 Express is different from that of generated by CMake:

This is how Visual Studio does it:
# Visual Studio 2012 Express for Windows Desktop

This is how CMake does it:
# Visual Studio 11

This isn't specific to VS 2012 only. For instance, Visual C++ 2010 Express seems to use the same scheme too.

I managed to extract all possible identification strings from one of the VS executables (namely WDExpress.exe), and here they are:

# Visual Studio 2010\r\n
# Visual Basic Express 2010\r\n
# Visual C# Express 2010\r\n
# Visual C++ Express 2010\r\n
# Visual Web Developer Express 2010\r\n
# Visual Studio 2010 Tools for Applications\r\n
# Rascal (2010 Version)\r\n
# Visual Studio 10\r\n
# Visual Basic Express 10\r\n
# Visual C# Express 10\r\n
# Visual C++ Express 10\r\n
# Visual Web Developer Express 10\r\n
# Visual Studio 10 Tools for Applications\r\n
# Rascal (Version 10)\r\n
# Visual Studio 2010 Express for Windows Phone\r\n
# Visual Studio 11\r\n
# Visual Web Developer Express 11\r\n
# Rascal (Version 11)\r\n
# Visual Studio 11 Express for Windows Phone\r\n
# Visual Studio 11 Express for Windows 8\r\n
# Visual Studio 2012\r\n
# Visual Studio Express 2012 for Web\r\n
# Rascal (2012 Version)\r\n
# Visual Studio Express 2012 for Windows Phone\r\n
# Visual Studio Express 2012 for Windows 8\r\n
# Visual Studio Express 2012 for Windows Desktop\r\n

Some of them have nothing to do with C++ though but I listed them for completeness.
No tags attached.
related to 0009758closed Brad King Can't open (double-clicking in Explorer) generated .SLN files for Visual Studio 2010 
patch vs-express-sln.patch (1,664) 2013-03-23 05:34
https://public.kitware.com/Bug/file/4692/vs-express-sln.patch
Issue History
2013-03-22 16:35szxNew Issue
2013-03-23 05:34szxFile Added: vs-express-sln.patch
2013-03-25 13:33Brad KingRelationship addedrelated to 0009758
2013-03-25 14:28Brad KingNote Added: 0032696
2013-03-25 14:28Brad KingAssigned To => Brad King
2013-03-25 14:28Brad KingStatusnew => resolved
2013-03-25 14:28Brad KingResolutionopen => fixed
2013-03-25 14:28Brad KingFixed in Version => CMake 2.8.11
2013-03-25 14:28Brad KingTarget Version => CMake 2.8.11
2013-10-07 10:04Robert MaynardNote Added: 0034014
2013-10-07 10:04Robert MaynardStatusresolved => closed

Notes
(0032696)
Brad King   
2013-03-25 14:28   
Thanks for the patch. Applied with explanation in commit message:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c677838c [^]
(0034014)
Robert Maynard   
2013-10-07 10:04   
Closing resolved issues that have not been updated in more than 4 months.