summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmDocumentVariables.cxx10
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx11
-rw-r--r--Source/cmGlobalVisualStudio10Generator.h1
3 files changed, 22 insertions, 0 deletions
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index 05ef8fc..376b947 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -283,6 +283,16 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
"see CMAKE_BUILD_TOOL.",false,
"Variables that Provide Information");
cm->DefineProperty
+ ("CMAKE_VS_PLATFORM_TOOLSET", cmProperty::VARIABLE,
+ "Visual Studio Platform Toolset name.",
+ "VS 10 and above use MSBuild under the hood and support multiple "
+ "compiler toolchains. "
+ "CMake may specify a toolset explicitly, such as \"v110\" for "
+ "VS 11 or \"Windows7.1SDK\" for 64-bit support in VS 10 Express. "
+ "CMake provides the name of the chosen toolset in this variable."
+ ,false,
+ "Variables that Provide Information");
+ cm->DefineProperty
("CMAKE_MINOR_VERSION", cmProperty::VARIABLE,
"The Minor version of cmake (i.e. the 4 in X.4.X).",
"This specifies the minor version of the CMake"
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index b44b780..39c9ae1 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -28,6 +28,17 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator()
}
//----------------------------------------------------------------------------
+void cmGlobalVisualStudio10Generator::AddPlatformDefinitions(cmMakefile* mf)
+{
+ cmGlobalVisualStudio8Generator::AddPlatformDefinitions(mf);
+ if(!this->PlatformToolset.empty())
+ {
+ mf->AddDefinition("CMAKE_VS_PLATFORM_TOOLSET",
+ this->PlatformToolset.c_str());
+ }
+}
+
+//----------------------------------------------------------------------------
void cmGlobalVisualStudio10Generator::WriteSLNHeader(std::ostream& fout)
{
fout << "Microsoft Visual Studio Solution File, Format Version 11.00\n";
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index a4a9d40..47ce790 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -38,6 +38,7 @@ public:
virtual const char* GetName() const {
return cmGlobalVisualStudio10Generator::GetActualName();}
static const char* GetActualName() {return "Visual Studio 10";}
+ virtual void AddPlatformDefinitions(cmMakefile* mf);
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;