Commit Graph

28 Commits

Author SHA1 Message Date
Stephen Kelly 7916d7bac6 Include cmAlgorithms where it is used. 2015-03-11 00:17:29 +01:00
Stephen Kelly 931e055d8c Port all cmOStringStream to std::ostringstream.
All compilers hosting CMake support the std class.
2015-01-11 17:06:03 +01:00
Gilles Khouzam b20a32ac73 VS: Improve error messages when compiler is not detected (#15228)
CMake requires both the Desktop SDK and the correct platform SDK
(Windows Phone or Windows Store) to be installed when targeting the
Windows mobile platforms.  Verify that the right platform components are
installed and give a more detailed error message when something is
wrong.
2014-11-14 09:13:27 -05:00
Gilles Khouzam 72395ab23e VS: Add .sln "Deploy" mark for WindowsPhone and WindowsStore binaries 2014-07-31 14:09:01 -04:00
Brad King d7938bff37 VS: Select WindowsPhone and WindowsStore default toolsets
Teach the VS >= 10 generators to recognize these system names and select
the appropriate default toolset for the system version.  Report an error
when the version is not known to be supported by VS.

Inspired-by: Gilles Khouzam <gillesk@microsoft.com>
2014-07-31 14:08:46 -04:00
Brad King 7a526c35f6 VS: Delay getting platform name in local generator
Ask the global generator during generation instead of trying
to store it up front.  Later the global generator may not know
the platform name when it is creating the local generator.
2014-07-17 16:59:53 -04:00
Brad King eeb60102e8 VS: Refactor CMAKE_FORCE_*64 platform definitions
Remove the general infrastructure for these additional platform
definitions and hard-code the only two special cases that used
it.  They are only for historical reasons so no new such cases
should be added.
2014-07-17 16:17:35 -04:00
Brad King eaa9f2f8ee VS: Refactor internal generator factory logic
Consume the space before the platform name as soon as possible
instead of including it in the comparison.
2014-06-09 10:59:55 -04:00
Brad King 98afb4549f VS: Split user- and generator-provided PlatformToolset
Divide the cmGlobalVisualStudio10Generator "PlatformToolset" member into
two members representing the generator-selected default toolset and the
user-specified CMAKE_GENERATOR_TOOLSET value.  Prefer the user-specified
value, if any, and then fall back to the generator-selected default.
2014-06-04 13:16:37 -04:00
Ben Boeckel 1a1b737c99 stringapi: Use strings for generator names 2014-03-08 13:05:38 -05:00
Stephen Kelly 4fe963f656 Use new cmHasLiteralPrefix function 2013-11-21 20:53:15 +01:00
Brad King 558c74d0ab VS: Switch to internal CMAKE_MAKE_PROGRAM lookup by generators
Drop the "Modules/CMakeVS*FindMake.cmake" files.  Override the
cmGlobalGenerator::FindMakeProgram method for VS generators to use their
internal APIs to locate the build tool.  Set the CMAKE_MAKE_PROGRAM as a
normal variable for use by project code, but do not cache it.  This will
allow CMake and CTest to select the proper tool at build time.
2013-11-18 11:30:50 -05:00
Brad King 29071fed2e VS: Add version year to generator names
Rename the Visual Studio >= 10 generators to indicate the version year:

 Visual Studio 10 => Visual Studio 10 2010
 Visual Studio 11 => Visual Studio 11 2012
 Visual Studio 12 => Visual Stduio 12 2013

Report the names with the year to the list of available generators so
that the cmake-gui drop-down shows the years.  When selecting a
generator from the "-G" option or from an existing CMAKE_GENERATOR cache
entry, recognize names without the years for compatibility and map them
to the names with years.

Update the generator names in the cmake-generators.7 manual.
2013-10-28 13:43:14 -04:00
Brad King 0c39a757da Drop the 'Full' field from cmDocumentationEntry
We need only 'Brief' for usage documentation.  We no longer have builtin
'Full' documentation, which is now in Help/*/*.rst files.
2013-10-16 09:22:37 -04:00
Patrick Gansterer 0416a0e6d8 VS11: Add support for Windows CE SDKs
Allow additional generator platforms for the installed WinCE SDKs.
2013-08-07 10:28:30 -04:00
Patrick Gansterer c90151bd82 VS: Unify how the name of the generator is specified
Use the value of the provided argument instead of using a fixed
character buffer. This aligns VS10+VS11+VS12 with VS8+VS9.
2013-08-05 13:38:32 +02:00
Patrick Gansterer b02f09d434 VS: Replace ArchitectureId with PlatformName
Since we do not need the information about the target architecture
we can use the PlatformName only to specify the this information.
This also removes setting of the MSVC_*_ARCHITECTURE_ID variable
which is not required, because this variable gets set by the
compiler detection code in CMAKE_DETERMINE_COMPILER_ID_CHECK().
2013-08-05 13:38:26 +02:00
Robert Maynard 52f146414f VS: Clarify Visual Studio product year for each version
Add to the brief documentation of the Visual Studio 10, 11, and 12
generators the corresponding VS product year.  Clarify that VS11 is for
Visual Studio 2012, and VS12 is for Visual Studio 2013.
2013-07-02 08:24:38 -04:00
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