summaryrefslogtreecommitdiff
path: root/Source/cmGlobalVisualStudio11Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-03-25 13:30:46 -0400
committerBrad King <brad.king@kitware.com>2013-03-25 14:25:14 -0400
commitc677838c1a608dd182b238154050a94ab79d6bc4 (patch)
tree8bd9b75bef2a76b2feb6b3784ed28306c66a413a /Source/cmGlobalVisualStudio11Generator.cxx
parent1a60115bf5bcb479b049497f68a76e8bc3370d53 (diff)
downloadcmake-c677838c1a608dd182b238154050a94ab79d6bc4.tar.gz
VS: Fix VS 10/11 .sln headers (#14038)
The VS version we generate in the .sln header is used by VS when opening the file through Windows Explorer and possibly elsewhere. Fix our generators to use version strings known to VS to avoid a drop-down box. For VS 10, since commit 4f96af44 (Fix VS 10 .sln files for Windows Explorer, 2009-10-22) we use "Visual Studio 2010" instead of just "Visual Studio 10". This is correct except that for the Express edition we need "Visual C++ Express 2010". For VS 11, since commit f0d66ab4 (VS11: Fix comment generated at the top of *.sln files, 2011-10-20) we use "Visual Studio 11" in the .sln header but the preferred value is "Visual Studio 2012" (just as the first commit mentioned above fixed for VS 10). Also for the Express edition we need "Visual Studio Express 2012 for Windows Desktop".
Diffstat (limited to 'Source/cmGlobalVisualStudio11Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio11Generator.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx
index b6d7d04528..299aaa8b9d 100644
--- a/Source/cmGlobalVisualStudio11Generator.cxx
+++ b/Source/cmGlobalVisualStudio11Generator.cxx
@@ -81,7 +81,14 @@ cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator(
void cmGlobalVisualStudio11Generator::WriteSLNHeader(std::ostream& fout)
{
fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n";
- fout << "# Visual Studio 11\n";
+ if (this->ExpressEdition)
+ {
+ fout << "# Visual Studio Express 2012 for Windows Desktop\n";
+ }
+ else
+ {
+ fout << "# Visual Studio 2012\n";
+ }
}
//----------------------------------------------------------------------------