summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-12-22 13:56:04 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-12-22 13:56:22 (GMT)
commit138aabfa9dfda15cabbc21a240aeacfa9bdcdec2 (patch)
tree9164c86e10d3d4570d1a333c898e0b808918b930 /Source/cmTarget.cxx
parent7a07d089b9bbb8336eebf1c54fe6e2a8aaff4533 (diff)
parent0eea32a376fc54b198fa4690ca57b829a2d14baa (diff)
downloadCMake-138aabfa9dfda15cabbc21a240aeacfa9bdcdec2.zip
CMake-138aabfa9dfda15cabbc21a240aeacfa9bdcdec2.tar.gz
CMake-138aabfa9dfda15cabbc21a240aeacfa9bdcdec2.tar.bz2
Merge topic 'vs-csharp-dotnet-sdk'
0eea32a376 VS: Add DOTNET_SDK property to generate SDK-style C# projects a450cc9533 VS: Set ResolveNugetPackages to false for ALL_BUILD and ZERO_CHECK fa76e5d194 cmVisualStudio10TargetGenerator: Factor out helper for classic MSBuild project Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6634
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index c03a252..c5703a1 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -529,6 +529,10 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
this->impl->PolicyMap.Set(cmPolicies::CMP0022, cmPolicies::NEW);
}
+ if (!this->IsImported()) {
+ initProp("DOTNET_SDK");
+ }
+
if (this->impl->TargetType <= cmStateEnums::GLOBAL_TARGET) {
initProp("DOTNET_TARGET_FRAMEWORK");
initProp("DOTNET_TARGET_FRAMEWORK_VERSION");