summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-09-23 13:07:40 (GMT)
committerBrad King <brad.king@kitware.com>2011-09-23 14:10:01 (GMT)
commit3d5632ed59d3d46298304d20d3f11f9d1da02f93 (patch)
tree808deb3a6b06fd4ea925218cb54f5c1d9b138b9a /Source
parent8c280435dfd746a897f6ce6696ba27571f195424 (diff)
downloadCMake-3d5632ed59d3d46298304d20d3f11f9d1da02f93.zip
CMake-3d5632ed59d3d46298304d20d3f11f9d1da02f93.tar.gz
CMake-3d5632ed59d3d46298304d20d3f11f9d1da02f93.tar.bz2
Add Visual Studio 11 generator for x86 and x64 tools
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt4
-rw-r--r--Source/cmGlobalVisualStudio10Generator.h1
-rw-r--r--Source/cmGlobalVisualStudio11Generator.cxx45
-rw-r--r--Source/cmGlobalVisualStudio11Generator.h43
-rw-r--r--Source/cmGlobalVisualStudio11Win64Generator.cxx33
-rw-r--r--Source/cmGlobalVisualStudio11Win64Generator.h37
-rw-r--r--Source/cmake.cxx6
7 files changed, 168 insertions, 1 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 96b3ea0..ba41d98 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -324,6 +324,10 @@ IF (WIN32)
cmGlobalVisualStudio10Win64Generator.cxx
cmGlobalVisualStudio10IA64Generator.h
cmGlobalVisualStudio10IA64Generator.cxx
+ cmGlobalVisualStudio11Generator.h
+ cmGlobalVisualStudio11Generator.cxx
+ cmGlobalVisualStudio11Win64Generator.h
+ cmGlobalVisualStudio11Win64Generator.cxx
cmGlobalVisualStudioGenerator.cxx
cmGlobalVisualStudioGenerator.h
cmGlobalWatcomWMakeGenerator.cxx
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 8573670..18b483d 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -79,7 +79,6 @@ protected:
virtual const char* GetIDEVersion() { return "10.0"; }
std::string PlatformToolset;
-private:
bool ExpressEdition;
};
#endif
diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx
new file mode 100644
index 0000000..a70427a
--- /dev/null
+++ b/Source/cmGlobalVisualStudio11Generator.cxx
@@ -0,0 +1,45 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#include "cmGlobalVisualStudio11Generator.h"
+#include "cmMakefile.h"
+
+//----------------------------------------------------------------------------
+cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator()
+{
+ this->FindMakeProgramFile = "CMakeVS11FindMake.cmake";
+ this->ExpressEdition = false; // TODO: VS 11 Express support
+ this->PlatformToolset = "v110";
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio11Generator::AddPlatformDefinitions(cmMakefile* mf)
+{
+ mf->AddDefinition("MSVC11", "1");
+ mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "X86");
+ mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "X86");
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio11Generator::WriteSLNHeader(std::ostream& fout)
+{
+ fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n";
+ fout << "# Visual Studio 2011\n";
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio11Generator
+::GetDocumentation(cmDocumentationEntry& entry) const
+{
+ entry.Name = this->GetName();
+ entry.Brief = "Generates Visual Studio 11 project files.";
+ entry.Full = "";
+}
diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h
new file mode 100644
index 0000000..14019a7
--- /dev/null
+++ b/Source/cmGlobalVisualStudio11Generator.h
@@ -0,0 +1,43 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#ifndef cmGlobalVisualStudio11Generator_h
+#define cmGlobalVisualStudio11Generator_h
+
+#include "cmGlobalVisualStudio10Generator.h"
+
+
+/** \class cmGlobalVisualStudio11Generator */
+class cmGlobalVisualStudio11Generator:
+ public cmGlobalVisualStudio10Generator
+{
+public:
+ cmGlobalVisualStudio11Generator();
+ static cmGlobalGenerator* New() {
+ return new cmGlobalVisualStudio11Generator; }
+
+ ///! Get the name for the generator.
+ virtual const char* GetName() const {
+ return cmGlobalVisualStudio11Generator::GetActualName();}
+ static const char* GetActualName() {return "Visual Studio 11";}
+ virtual void AddPlatformDefinitions(cmMakefile* mf);
+
+ virtual void WriteSLNHeader(std::ostream& fout);
+
+ /** Get the documentation entry for this generator. */
+ virtual void GetDocumentation(cmDocumentationEntry& entry) const;
+
+ /** TODO: VS 11 user macro support. */
+ virtual std::string GetUserMacrosDirectory() { return ""; }
+protected:
+ virtual const char* GetIDEVersion() { return "11.0"; }
+};
+#endif
diff --git a/Source/cmGlobalVisualStudio11Win64Generator.cxx b/Source/cmGlobalVisualStudio11Win64Generator.cxx
new file mode 100644
index 0000000..10c9027
--- /dev/null
+++ b/Source/cmGlobalVisualStudio11Win64Generator.cxx
@@ -0,0 +1,33 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#include "cmGlobalVisualStudio11Win64Generator.h"
+#include "cmMakefile.h"
+#include "cmake.h"
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio11Win64Generator
+::GetDocumentation(cmDocumentationEntry& entry) const
+{
+ entry.Name = this->GetName();
+ entry.Brief = "Generates Visual Studio 11 Win64 project files.";
+ entry.Full = "";
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalVisualStudio11Win64Generator
+::AddPlatformDefinitions(cmMakefile* mf)
+{
+ this->cmGlobalVisualStudio11Generator::AddPlatformDefinitions(mf);
+ mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE");
+ mf->AddDefinition("MSVC_C_ARCHITECTURE_ID", "x64");
+ mf->AddDefinition("MSVC_CXX_ARCHITECTURE_ID", "x64");
+}
diff --git a/Source/cmGlobalVisualStudio11Win64Generator.h b/Source/cmGlobalVisualStudio11Win64Generator.h
new file mode 100644
index 0000000..53f1953
--- /dev/null
+++ b/Source/cmGlobalVisualStudio11Win64Generator.h
@@ -0,0 +1,37 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#ifndef cmGlobalVisualStudio11Win64Generator_h
+#define cmGlobalVisualStudio11Win64Generator_h
+
+#include "cmGlobalVisualStudio11Generator.h"
+
+class cmGlobalVisualStudio11Win64Generator :
+ public cmGlobalVisualStudio11Generator
+{
+public:
+ cmGlobalVisualStudio11Win64Generator() {}
+ static cmGlobalGenerator* New() {
+ return new cmGlobalVisualStudio11Win64Generator; }
+
+ ///! Get the name for the generator.
+ virtual const char* GetName() const {
+ return cmGlobalVisualStudio11Win64Generator::GetActualName();}
+ static const char* GetActualName() {return "Visual Studio 11 Win64";}
+
+ virtual const char* GetPlatformName() const {return "x64";}
+
+ /** Get the documentation entry for this generator. */
+ virtual void GetDocumentation(cmDocumentationEntry& entry) const;
+
+ virtual void AddPlatformDefinitions(cmMakefile* mf);
+};
+#endif
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 41c67e2..05699da 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -68,6 +68,8 @@
# include "cmGlobalVisualStudio10Generator.h"
# include "cmGlobalVisualStudio10IA64Generator.h"
# include "cmGlobalVisualStudio10Win64Generator.h"
+# include "cmGlobalVisualStudio11Generator.h"
+# include "cmGlobalVisualStudio11Win64Generator.h"
# include "cmGlobalVisualStudio8Win64Generator.h"
# include "cmGlobalBorlandMakefileGenerator.h"
# include "cmGlobalNMakeMakefileGenerator.h"
@@ -2580,6 +2582,10 @@ void cmake::AddDefaultGenerators()
&cmGlobalVisualStudio10IA64Generator::New;
this->Generators[cmGlobalVisualStudio10Win64Generator::GetActualName()] =
&cmGlobalVisualStudio10Win64Generator::New;
+ this->Generators[cmGlobalVisualStudio11Generator::GetActualName()] =
+ &cmGlobalVisualStudio11Generator::New;
+ this->Generators[cmGlobalVisualStudio11Win64Generator::GetActualName()] =
+ &cmGlobalVisualStudio11Win64Generator::New;
this->Generators[cmGlobalVisualStudio71Generator::GetActualName()] =
&cmGlobalVisualStudio71Generator::New;
this->Generators[cmGlobalVisualStudio8Generator::GetActualName()] =