Commit Graph

10 Commits

Author SHA1 Message Date
Brad King c677838c1a 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".
2013-03-25 14:25:14 -04:00
David Cole 7fa0f4b870 VS11: Allow using folders with the VS11 Express Edition (#13770)
Solution folders are supported as read-only in the VS11 Express
Edition, so do not prohibit their use just because we detect the
express edition (as we did in the VS10 generator).

Inspired-by: Paris
2012-12-03 13:53:43 -05:00
Patrick Gansterer 75ebebc39c VS: Remove platform specific generator files
Move the whole logic into the base class and the factory.
2012-11-19 14:56:29 -05:00
Patrick Gansterer 5170a8800f Make cmGlobalGenerator::GetDocumentation() a static function
Making the function static allows us to call it directly,
without creating and removing an instance of the generator.
2012-11-19 12:54:50 -05:00
Brad King 7ee3cee919 VS11: Add VS 2012 Express support (#13348)
Use the registry entries that vsvars32.bat uses to detect the location of
MSBuild.exe in the framework directory.  Invoke MSBuild with the option

 /p:VisualStudioVersion=$version

so it knows from which VS version to load the system build rules.  Teach
cmGlobalVisualStudio11Generator to set its ExpressEdition member using the
registry.
2012-09-18 14:03:02 -04:00
Brad King 485a940e4c VS: Simplify MSVC version reporting
Teach Windows-cl.cmake to use CMAKE_(C|CXX)_COMPILER_VERSION to set the
"MSVC##" and MSVC_VERSION variables.  It no longer needs the IDE generator
to dictate the version or to detect the version by running the
command-line tool for NMake and Ninja generators.  Drop configuration of
CMakeCPlatform.cmake and CMakeCXXPlatform.cmake from Windows-cl.cmake.in
because all the results it saved are now cheap to compute every time.
2012-08-30 09:42:40 -04:00
Patrick Gansterer 2c7a451de0 VS: Cleanup AddPlatformDefinitions() of Visual Studio generators
Move adding of definitions into cmGlobalVisualStudioGenerator to
share code and avoid duplicate architecture string literals.
2012-08-22 15:08:40 -04:00
Brad King c92ffece80 Enumerate VS11 version explicitly in local generators
Since the parent commit the local generator Version ivar may be
compared for ordering.  Convert comparisons:

  "==VS10" becomes ">=VS10"
  "!=VS10" becomes "< VS10"

to support an explicit enumeration value for VS11 with no change
in behavior.
2011-11-14 09:50:47 -05:00
David Cole f0d66ab40a VS11: Fix comment generated at the top of *.sln files
With "Visual Studio 2011" the launcher does not recognize the version
of the *.sln files. With "Visual Studio 11" it does.
2011-10-20 18:48:26 -04:00
Brad King 3d5632ed59 Add Visual Studio 11 generator for x86 and x64 tools 2011-09-23 10:10:01 -04:00