mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 22:30:07 -05:00
Merge topic 'vs2019-v142' into release-4.2
8c332a3c7f VS: Restore support for VS 2019 with toolset v142 versions before 14.29
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11480
This commit is contained in:
@@ -170,11 +170,17 @@ public:
|
||||
std::string const cond =
|
||||
this->TargetGenerator->CalcCondition(this->GetConfiguration());
|
||||
this->Parent->WritePlatformConfigTag(tag, cond, content);
|
||||
} else if (!this->SuppressStartupBannerCondition.empty() &&
|
||||
tag == "SuppressStartupBanner"_s) {
|
||||
this->Parent->WritePlatformConfigTag(
|
||||
tag, this->SuppressStartupBannerCondition, content);
|
||||
} else {
|
||||
this->Parent->Element(tag, content);
|
||||
}
|
||||
}
|
||||
|
||||
std::string SuppressStartupBannerCondition;
|
||||
|
||||
private:
|
||||
cmVisualStudio10TargetGenerator* const TargetGenerator;
|
||||
Elem* Parent = nullptr;
|
||||
@@ -3704,6 +3710,13 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
|
||||
}
|
||||
if (!clOptions.HasFlag("RemoveUnreferencedCodeData")) {
|
||||
clOptions.AddFlag("RemoveUnreferencedCodeData", "");
|
||||
// Visual Studio 2019 with toolset v142 versions 14.20 to 14.28.16.9
|
||||
// fails if both RemoveUnreferencedCodeData and SuppressStartupBanner
|
||||
// are empty. Since the latter is incidental, make it conditional.
|
||||
if (this->GlobalGenerator->GetPlatformToolsetString() == "v142"_s) {
|
||||
clOptions.SuppressStartupBannerCondition =
|
||||
"'$(VCToolsVersion)' >= '14.29'";
|
||||
}
|
||||
}
|
||||
if (!clOptions.HasFlag("RuntimeLibrary")) {
|
||||
clOptions.AddFlag("RuntimeLibrary", "");
|
||||
|
||||
Reference in New Issue
Block a user