TZIVI-254: IVI needs a newer version of cmake
[profile/ivi/cmake.git] / Source / cmGlobalVisualStudio11Generator.cxx
1 /*============================================================================
2   CMake - Cross Platform Makefile Generator
3   Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
4
5   Distributed under the OSI-approved BSD License (the "License");
6   see accompanying file Copyright.txt for details.
7
8   This software is distributed WITHOUT ANY WARRANTY; without even the
9   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10   See the License for more information.
11 ============================================================================*/
12 #include "cmGlobalVisualStudio11Generator.h"
13 #include "cmLocalVisualStudio10Generator.h"
14 #include "cmMakefile.h"
15
16 //----------------------------------------------------------------------------
17 cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator()
18 {
19   this->FindMakeProgramFile = "CMakeVS11FindMake.cmake";
20   this->ExpressEdition = false; // TODO: VS 11 Express support
21   this->PlatformToolset = "v110";
22 }
23
24 //----------------------------------------------------------------------------
25 void cmGlobalVisualStudio11Generator::AddPlatformDefinitions(cmMakefile* mf)
26 {
27   mf->AddDefinition("MSVC11", "1");
28   mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86");
29   mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86");
30 }
31
32 //----------------------------------------------------------------------------
33 void cmGlobalVisualStudio11Generator::WriteSLNHeader(std::ostream& fout)
34 {
35   fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n";
36   fout << "# Visual Studio 11\n";
37 }
38
39 //----------------------------------------------------------------------------
40 cmLocalGenerator *cmGlobalVisualStudio11Generator::CreateLocalGenerator()
41 {
42   cmLocalVisualStudio10Generator* lg =
43     new cmLocalVisualStudio10Generator(cmLocalVisualStudioGenerator::VS11);
44   lg->SetPlatformName(this->GetPlatformName());
45   lg->SetGlobalGenerator(this);
46   return lg;
47 }
48
49 //----------------------------------------------------------------------------
50 void cmGlobalVisualStudio11Generator
51 ::GetDocumentation(cmDocumentationEntry& entry) const
52 {
53   entry.Name = this->GetName();
54   entry.Brief = "Generates Visual Studio 11 project files.";
55   entry.Full = "";
56 }