summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-05-16 14:02:42 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-05-16 14:02:48 (GMT)
commitc8c07c24dd6692f5a5d6bfa604e25a8e2275588c (patch)
tree41ab144526596f7ce7949619d833311ccc45e858 /Source
parentd32ceffb1ea28d78780fd2f4d34842fcb81331cb (diff)
parent71a033616a748d1bb4286ca0667cedf6b57df217 (diff)
downloadCMake-c8c07c24dd6692f5a5d6bfa604e25a8e2275588c.zip
CMake-c8c07c24dd6692f5a5d6bfa604e25a8e2275588c.tar.gz
CMake-c8c07c24dd6692f5a5d6bfa604e25a8e2275588c.tar.bz2
Merge topic 'dotnet_target_fw_init'
71a033616a added CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION variable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2032
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTarget.cxx4
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx15
2 files changed, 15 insertions, 4 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index d17a85a..7dcba74 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -399,6 +399,10 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
this->SetPropertyDefault("JOB_POOL_COMPILE", nullptr);
this->SetPropertyDefault("JOB_POOL_LINK", nullptr);
}
+
+ if (this->TargetTypeValue <= cmStateEnums::UTILITY) {
+ this->SetPropertyDefault("DOTNET_TARGET_FRAMEWORK_VERSION", nullptr);
+ }
}
cmGlobalGenerator* cmTarget::GetGlobalGenerator() const
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 05f00da..f613de9 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -482,10 +482,17 @@ void cmVisualStudio10TargetGenerator::Generate()
projLabel = this->Name.c_str();
}
e1.Element("ProjectName", projLabel);
- if (const char* targetFrameworkVersion =
- this->GeneratorTarget->GetProperty(
- "VS_DOTNET_TARGET_FRAMEWORK_VERSION")) {
- e1.Element("TargetFrameworkVersion", targetFrameworkVersion);
+ {
+ // TODO: add deprecation warning for VS_* property?
+ const char* targetFrameworkVersion = this->GeneratorTarget->GetProperty(
+ "VS_DOTNET_TARGET_FRAMEWORK_VERSION");
+ if (!targetFrameworkVersion) {
+ targetFrameworkVersion = this->GeneratorTarget->GetProperty(
+ "DOTNET_TARGET_FRAMEWORK_VERSION");
+ }
+ if (targetFrameworkVersion) {
+ e1.Element("TargetFrameworkVersion", targetFrameworkVersion);
+ }
}
// Disable the project upgrade prompt that is displayed the first time a