diff options
author | Brad King <brad.king@kitware.com> | 2013-03-25 17:30:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-03-25 18:25:14 (GMT) |
commit | c677838c1a608dd182b238154050a94ab79d6bc4 (patch) | |
tree | 8bd9b75bef2a76b2feb6b3784ed28306c66a413a /Source | |
parent | 1a60115bf5bcb479b049497f68a76e8bc3370d53 (diff) | |
download | CMake-c677838c1a608dd182b238154050a94ab79d6bc4.zip CMake-c677838c1a608dd182b238154050a94ab79d6bc4.tar.gz CMake-c677838c1a608dd182b238154050a94ab79d6bc4.tar.bz2 |
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')
-rw-r--r-- | Source/cmGlobalVisualStudio10Generator.cxx | 9 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio11Generator.cxx | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index cac72fc..b8c4939 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -102,7 +102,14 @@ void cmGlobalVisualStudio10Generator::AddPlatformDefinitions(cmMakefile* mf) void cmGlobalVisualStudio10Generator::WriteSLNHeader(std::ostream& fout) { fout << "Microsoft Visual Studio Solution File, Format Version 11.00\n"; - fout << "# Visual Studio 2010\n"; + if (this->ExpressEdition) + { + fout << "# Visual C++ Express 2010\n"; + } + else + { + fout << "# Visual Studio 2010\n"; + } } ///! Create a local generator appropriate to this Global Generator diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index b6d7d04..299aaa8 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"; + } } //---------------------------------------------------------------------------- |