summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-06-24 12:37:14 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-06-24 12:37:14 (GMT)
commit64d14d3ddd83f4a368e3540717aa1c5268ab8525 (patch)
tree65ea135e0d690b29f906224211953b28adc0e142 /Source
parent299f50de00528991fd3fd00b64b346035e7a9bb3 (diff)
parentcfe6300a41392b79d95774c2778d33a55deaed48 (diff)
downloadCMake-64d14d3ddd83f4a368e3540717aa1c5268ab8525.zip
CMake-64d14d3ddd83f4a368e3540717aa1c5268ab8525.tar.gz
CMake-64d14d3ddd83f4a368e3540717aa1c5268ab8525.tar.bz2
Merge topic 'vs-TargetFrameworkVersion'
cfe6300 VS: Add support for .NET target framework version
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTarget.cxx5
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx7
2 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 7d25b91..b14db43 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1403,6 +1403,11 @@ void cmTarget::DefineProperties(cmake *cm)
"Sets the \"RootNamespace\" attribute for a generated Visual Studio "
"project. The attribute will be generated only if this is set.");
cm->DefineProperty
+ ("VS_DOTNET_TARGET_FRAMEWORK_VERSION", cmProperty::TARGET,
+ "Specify the .NET target framework version.",
+ "Used to specify the .NET target framework version for C++/CLI. "
+ "For example, \"v4.5\".");
+ cm->DefineProperty
("VS_DOTNET_REFERENCES", cmProperty::TARGET,
"Visual Studio managed project .NET references",
"Adds one or more semicolon-delimited .NET references to a "
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index f8de3a8..2c9ec8e 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -280,6 +280,13 @@ void cmVisualStudio10TargetGenerator::Generate()
}
this->WriteString("<ProjectName>", 2);
(*this->BuildFileStream) << projLabel << "</ProjectName>\n";
+ if(const char* targetFrameworkVersion = this->Target->GetProperty(
+ "VS_DOTNET_TARGET_FRAMEWORK_VERSION"))
+ {
+ this->WriteString("<TargetFrameworkVersion>", 2);
+ (*this->BuildFileStream) << targetFrameworkVersion
+ << "</TargetFrameworkVersion>\n";
+ }
this->WriteString("</PropertyGroup>\n", 1);
this->WriteString("<Import Project="
"\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n",