summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-29 14:50:26 +0000
committerKitware Robot <kwrobot@kitware.com>2020-04-29 10:50:42 -0400
commitd63c442a6bcec287afb32a88c80b68cb141f49f4 (patch)
tree0434fc1cd2e3251e14a21287afba01563e52a0e3 /Source
parent959acdc9e6af291b7f8c3ac530496322745385a2 (diff)
parent197b4cbe186cd31a490fc3cfcaace55bd7123829 (diff)
downloadcmake-d63c442a6bcec287afb32a88c80b68cb141f49f4.tar.gz
Merge topic 'vs_platform_toolset'
197b4cbe18 VS: Add option for per-target PlatformToolset Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4682
Diffstat (limited to 'Source')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 930db41e66..5f79eb0fd5 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1236,7 +1236,10 @@ void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValues(
} else {
e1.Element("CharacterSet", "MultiByte");
}
- if (const char* toolset = gg->GetPlatformToolset()) {
+ if (const char* projectToolsetOverride =
+ this->GeneratorTarget->GetProperty("VS_PLATFORM_TOOLSET")) {
+ e1.Element("PlatformToolset", projectToolsetOverride);
+ } else if (const char* toolset = gg->GetPlatformToolset()) {
e1.Element("PlatformToolset", toolset);
}
if (this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_COMPONENT") ||
@@ -1279,7 +1282,10 @@ void cmVisualStudio10TargetGenerator::WriteMSToolConfigurationValuesManaged(
o.RemoveFlag("Platform");
}
- if (const char* toolset = gg->GetPlatformToolset()) {
+ if (const char* projectToolsetOverride =
+ this->GeneratorTarget->GetProperty("VS_PLATFORM_TOOLSET")) {
+ e1.Element("PlatformToolset", projectToolsetOverride);
+ } else if (const char* toolset = gg->GetPlatformToolset()) {
e1.Element("PlatformToolset", toolset);
}