summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Teach --build to honor CMAKE_VERBOSE_MAKEFILE for NinjaGregor Jasny2015-02-261-2/+2
| | | | | | | | | The Ninja build system does not support a in-file verbositiy switch. Instead teach 'cmake --build' to extract the CMAKE_VERBOSE_MAKEFILE setting and pass it as an optional '-v' argument to Ninja. This can serve as a reasonable fallback. Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-8/+8
| | | | All compilers hosting CMake support the std class.
* VS: Improve error messages when compiler is not detected (#15228)Gilles Khouzam2014-11-141-0/+18
| | | | | | | | 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.
* VS: Generate Nsight Tegra project revision numberBrad King2014-09-301-0/+6
| | | | | | Nsight Tegra 2.0 will be revision '8'. Generate this revision number and add a NsightTegraUpgradeOnceWithoutPrompt element to tell newer versions not to prompt when upgrading the generated project file.
* VS: Teach VS >= 10 to recognize CMAKE_SYSTEM_NAME 'Android'Brad King2014-09-291-0/+41
| | | | | | | When CMAKE_SYSTEM_NAME is 'Android', check for an installation of 'NVIDIA Nsight Tegra Visual Studio Edition' and generate .vcxproj files for the "Tegra-Android" platform. Also make the installed version available in a CMAKE_VS_NsightTegra_VERSION variable.
* VS: Teach VS >= 10 generator about Windows CEPascal Bach2014-09-151-1/+47
| | | | | | | | When CMAKE_SYSTEM_NAME is 'WindowsCE': * Set the Subsystem and EntryPointSymbol accordingly. * When CMAKE_SYSTEM_VERSION is 8.0 (Windows CE 2013), select the CE800 toolset by default.
* VS: Implement CMAKE_GENERATOR_PLATFORM for VS >= 8Brad King2014-09-051-1/+13
| | | | | | | | | For VS generator names that do not specify the platform name, read CMAKE_GENERATOR_PLATFORM to get it. Extend the RunCMake.GeneratorPlatform test with a case covering use of the x64 platform when the test generator is a Visual Studio generator whose name does not specify a platform.
* VS: Refactor internal default platform name selectionBrad King2014-09-051-1/+1
| | | | | | Rename the 'PlatformName' member to 'DefaultPlatformName' and make sure it is only read through a 'GetPlatformName()' call. This will allow non-default names to be chosen later.
* cmGlobalVisualStudio10Generator: Re-order some methodsBrad King2014-09-051-13/+13
| | | | | Order SetSystemName and SetGeneratorToolset method declarations and definitions as they are called.
* cmGlobalGenerator: Call SetGeneratorToolset even for empty toolsetBrad King2014-09-051-12/+4
| | | | | | Move handling of an empty toolset name into the implementation of the method. This simplifies the VS 10 implementation of default toolset selection because it has one code path that is always called.
* VS: Move internal MasmEnabled member up to VS 7 generatorBrad King2014-08-201-10/+0
| | | | | | | | Move the member from cmGlobalVisualStudio10Generator to cmGlobalVisualStudio7Generator to make it useful for earlier versions of VS. Set the member to true only starting with cmGlobalVisualStudio8Generator since we will not implement MASM support for versions less than VS 8.
* VS: Select WindowsPhone and WindowsStore default toolsetsBrad King2014-07-311-1/+27
| | | | | | | | 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>
* VS: Save WindowsPhone and WindowsStore system internallyBrad King2014-07-311-0/+10
| | | | | | | | Add boolean members to the VS >= 10 global generator to save whether CMAKE_SYSTEM_NAME is WindowsPhone or WindowsStore without having to repeat a string comparison. Inspired-by: Gilles Khouzam <gillesk@microsoft.com>
* Merge topic 'vs10-system-hook'Brad King2014-07-291-0/+12
|\ | | | | | | | | | | e58f9753 VS: Add a hook to adapt to SystemName and SystemVersion d0dd28fa VS: Save system name and version in global generator members
| * VS: Add a hook to adapt to SystemName and SystemVersionBrad King2014-07-281-0/+10
| | | | | | | | | | | | | | Add a virtual cmGlobalVisualStudio10Generator::InitializeSystem method called from SetSystemName once the SystemName and SystemVersion members have been populated. This will give VS version-specific generators a chance to recognize and adapt to the target system.
| * VS: Save system name and version in global generator membersBrad King2014-07-281-0/+2
| | | | | | | | | | Add to cmGlobalVisualStudio10Generator members for SystemName and SystemVersion and populate them in SetSystemName.
* | cmGlobalVisualStudio10Generator: Fix typo KHLM => HKLMGilles Khouzam2014-07-281-1/+1
|/
* VS: Delay getting platform name in local generatorBrad King2014-07-171-1/+0
| | | | | | 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.
* VS: Delay detection of VS 10 Express 64-bit toolsBrad King2014-07-171-8/+7
| | | | | Wait until SetSystemName when the CMAKE_SYSTEM_NAME is known. Later the decision to use 64-bit tools may depend on it.
* VS: Delay platform definitions until system name is knownBrad King2014-07-171-2/+3
| | | | | | | Move the definition of CMAKE_VS_PLATFORM_NAME and other variables that are not needed by CMakeDetermineSystem out of the AddPlatformDefinitions method and into a SetSystemName method. The latter may later use CMAKE_SYSTEM_NAME to decide what platform-specific definitions to add.
* VS: Refactor CMAKE_FORCE_*64 platform definitionsBrad King2014-07-171-7/+5
| | | | | | | 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.
* VS: Refactor internal generator factory logicBrad King2014-06-091-3/+5
| | | | | Consume the space before the platform name as soon as possible instead of including it in the comparison.
* Allow a toolchain file to specify a generator toolsetBrad King2014-06-041-1/+3
| | | | | | | | | | | | | | | | | | | | Delay use of CMAKE_GENERATOR_TOOLSET until the CMakeSystem.cmake file has been configured and loaded during the first project() or enable_language() command. This gives the toolchain file named by CMAKE_TOOLCHAIN_FILE a chance to set CMAKE_GENERATOR_TOOLSET. This point is still early enough to set the generator toolset prior to the initialization of any languages that might use the toolset. The cmake::GeneratorToolset member variable remains an indication of what was specified by the -T option or loaded from the cache. It does not need to be updated based on the toolchain file setting. The cmMakefile::TryCompile can still pass cmake::GeneratorToolset into the inner instance because the try-compiled project will do platform and language initialization using the CMakeSystem module configured for the outer project. Extend the RunCMake.GeneratorToolset test with cases that use a toolchain file to set CMAKE_GENERATOR_TOOLSET.
* VS: Split user- and generator-provided PlatformToolsetBrad King2014-06-041-9/+19
| | | | | | | 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.
* Constify some APIs in generators.Stephen Kelly2014-03-131-1/+1
|
* stringapi: Use strings for program pathsBen Boeckel2014-03-081-1/+1
|
* stringapi: Use strings for generator namesBen Boeckel2014-03-081-11/+13
|
* stringapi: Use strings for directoriesBen Boeckel2014-03-081-2/+2
|
* stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-2/+2
|
* stringapi: Use strings for VS project namesBen Boeckel2014-03-081-1/+1
|
* stringapi: Use strings in target nameBen Boeckel2014-03-081-6/+7
|
* Merge topic 'cleanup-build-commands'Brad King2013-12-051-0/+8
|\ | | | | | | | | | | e420124 CMakeDetermineCompilerId: Use CMAKE_VS_(DEVENV|MSBUILD|MSDEV)_COMMAND 0c55729 VS: Add CMAKE_VS_(DEVENV|MSBUILD|MSDEV)_COMMAND variables
| * VS: Add CMAKE_VS_(DEVENV|MSBUILD|MSDEV)_COMMAND variablesBrad King2013-12-041-0/+8
| | | | | | | | | | | | | | | | Since commit 5f5c92b9 (VS: Add internal APIs to find MSBuild, devenv/VCExpress, and msdev, 2013-11-13) the VS generators have known how to lookup the locations of their build tools directly. Expose this information to CMake language code by defining new variables to hold the paths to these tools.
* | Use new cmHasLiteralPrefix functionStephen Kelly2013-11-211-1/+1
|/
* VS: Switch to internal CMAKE_MAKE_PROGRAM lookup by generatorsBrad King2013-11-181-1/+0
| | | | | | | | 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.
* Teach GenerateBuildCommand to find its own make programBrad King2013-11-181-31/+47
| | | | | | | | Add a cmGlobalGenerator::SelectMakeProgram method to select a caller-provided make program, the CMAKE_MAKE_PROGRAM cache entry, or a generator-provided default. Call it from all implementations of the GenerateBuildCommand method with the corresponding generator's default, if any.
* VS: Add internal APIs to find MSBuild, devenv/VCExpress, and msdevBrad King2013-11-181-0/+45
| | | | | Teach the VS generators to compute the locations of these tools directly from registry entries. Add internal APIs to get the locations on demand.
* cmGlobalGenerator: Cleanup GenerateBuildCommand APIBrad King2013-11-181-38/+27
| | | | | | | | | All cmGlobalGenerator::GenerateBuildCommand call sites that need to produce a string now generate "cmake --build" commands. The remaining call sites immediately pass the result to cmSystemTools::RunSingleCommand. Avoid the intermediate string and argument parsing by directly producing a vector of strings. Also drop the ignoreErrors argument because no call sites remain that use it.
* VS: Add version year to generator namesBrad King2013-10-281-16/+51
| | | | | | | | | | | | | | | | 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.
* Drop the 'Full' field from cmDocumentationEntryBrad King2013-10-161-5/+0
| | | | | We need only 'Brief' for usage documentation. We no longer have builtin 'Full' documentation, which is now in Help/*/*.rst files.
* Merge topic 'vs-masm'Brad King2013-08-061-0/+11
|\ | | | | | | | | 28e770c VS10: Add support for assembler code (#11536)
| * VS10: Add support for assembler code (#11536)Patrick Gansterer2013-08-051-0/+11
| | | | | | | | | | Use the masm BuildCustomizations, which are part of the Visual Studio installation to allow compilation of asm files.
* | VS: Unify how the name of the generator is specifiedPatrick Gansterer2013-08-051-3/+3
| | | | | | | | | | Use the value of the provided argument instead of using a fixed character buffer. This aligns VS10+VS11+VS12 with VS8+VS9.
* | VS: Replace ArchitectureId with PlatformNamePatrick Gansterer2013-08-051-3/+3
|/ | | | | | | | 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().
* Merge topic 'vs-generator-brief-doc-update'Brad King2013-07-021-1/+1
|\ | | | | | | | | 52f1464 VS: Clarify Visual Studio product year for each version
| * VS: Clarify Visual Studio product year for each versionRobert Maynard2013-07-021-1/+1
| | | | | | | | | | | | 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.
* | VS: Use .sln parser to build targets in subdirs with msbuild (#13623)Petr Kmoch2013-04-121-2/+33
| | | | | | | | | | | | Use cmVisualStudioSlnParser in GenerateBuildCommand() to provide correct command line for MSBuild even when target project is stored in a subdirectory.
* | Add projectDir parameter to GenerateBuildCommandPetr Kmoch2013-04-121-2/+3
|/ | | | | | | | Extend the cmGlobalGenerator::GenerateBuildCommand virtual method signature with a "projectDir" parameter specifying the top of the project build tree for which the build command will be generated. Populate it from call sites in cmGlobalGenerator::Build where a fully-generated build tree should be available.
* VS: Fix VS 10/11 .sln headers (#14038)Brad King2013-03-251-1/+8
| | | | | | | | | | | | | | | | | 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".
* VS: Implement generator toolset selection (#10722, #13774)Brad King2013-02-071-0/+8
| | | | | | | | | | | | Implement generator toolset selection (cmake -T) for VS >= 10 by setting the PlatformToolset. Extend the RunCMake.GeneratorToolset test case to verify CMAKE_GENERATOR_TOOLSET when the generator supports -T. Since commit 485a940e (VS: Simplify MSVC version reporting, 2012-08-23) all MSVC version information is detected during the compiler id step from the actual compiler invoked by generated build systems rather than hard-coded in VS generators. Therefore we can set the PlatformToolset in VS >= 10 project files and support toolsets from other VS versions.