Merge topic 'vs2019'
626c51f47b
VS: Update for Visual Studio 2019 Preview 2fd45cbf40e
VS: Fix `/MANIFESTUAC:` link flag mapping for v142db35e3cfd6
VS: Fix support for '/guard:cf' linker flag for v142533f95c847
VS: Map the link `/debug` flag for v142d2fcc6748a
VS: Fix `/MANIFESTUAC:NO` link flag mapping for v142a7973ccb53
VS: Populate `/permissive` flag table entry for v142049410c0b6
VS: Populate `/JMC-` flag table entry for v14243aa632f57
VS: Populate `-Qspectre-` flag table entry for v142 ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2856
This commit is contained in:
commit
ce57bc8e04
@ -2,7 +2,7 @@ vs2019
|
||||
------
|
||||
|
||||
* The :generator:`Visual Studio 16 2019` generator was added. This is
|
||||
experimental and based on "Visual Studio 2019 Preview 1.1" because this
|
||||
experimental and based on "Visual Studio 2019 Preview 2" because this
|
||||
version of VS has not been released.
|
||||
|
||||
The VS 2019 generator differs from generators for earlier versions
|
||||
|
@ -72,8 +72,7 @@ static const char* VSVersionToToolset(
|
||||
case cmGlobalVisualStudioGenerator::VS15:
|
||||
return "v141";
|
||||
case cmGlobalVisualStudioGenerator::VS16:
|
||||
// FIXME: VS 2019 Preview 1.1 uses v141 but preview 2 will use v142.
|
||||
return "v141";
|
||||
return "v142";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
@ -188,8 +188,16 @@ bool cmVSSetupAPIHelper::GetVSInstanceInfo(
|
||||
// Check if a compiler is installed with this instance.
|
||||
{
|
||||
std::string const vcRoot = vsInstanceInfo.GetInstallLocation();
|
||||
std::string const vcToolsVersionFile =
|
||||
std::string vcToolsVersionFile =
|
||||
vcRoot + "/VC/Auxiliary/Build/Microsoft.VCToolsVersion.default.txt";
|
||||
if (!cmSystemTools::PathExists(vcToolsVersionFile)) {
|
||||
// FIXME: VS 2019 Preview 2 installs the v142 toolset and does not
|
||||
// provide the plain `Microsoft.VCToolsVersion.default.txt` that v141
|
||||
// does. This should be fixed in preview 3 and this workaround can
|
||||
// be dropped. Otherwise, we may need to switch to globbing.
|
||||
vcToolsVersionFile = vcRoot +
|
||||
"/VC/Auxiliary/Build/Microsoft.VCToolsVersion.v142.default.txt";
|
||||
}
|
||||
std::string vcToolsVersion;
|
||||
cmsys::ifstream fin(vcToolsVersionFile.c_str());
|
||||
if (!fin || !cmSystemTools::GetLineFromStream(fin, vcToolsVersion)) {
|
||||
|
@ -11,7 +11,9 @@ std::string cmVisualStudio10ToolsetOptions::GetClFlagTableName(
|
||||
{
|
||||
std::string const useToolset = this->GetToolsetName(name, toolset);
|
||||
|
||||
if (toolset == "v141") {
|
||||
if (toolset == "v142") {
|
||||
return "v142";
|
||||
} else if (toolset == "v141") {
|
||||
return "v141";
|
||||
} else if (useToolset == "v140") {
|
||||
return "v140";
|
||||
@ -31,7 +33,10 @@ std::string cmVisualStudio10ToolsetOptions::GetCSharpFlagTableName(
|
||||
{
|
||||
std::string const useToolset = this->GetToolsetName(name, toolset);
|
||||
|
||||
if ((useToolset == "v141")) {
|
||||
if (useToolset == "v142") {
|
||||
// FIXME: Add CSharp flag table for v142.
|
||||
return "v141";
|
||||
} else if (useToolset == "v141") {
|
||||
return "v141";
|
||||
} else if (useToolset == "v140") {
|
||||
return "v140";
|
||||
@ -51,7 +56,8 @@ std::string cmVisualStudio10ToolsetOptions::GetRcFlagTableName(
|
||||
{
|
||||
std::string const useToolset = this->GetToolsetName(name, toolset);
|
||||
|
||||
if ((useToolset == "v140") || (useToolset == "v141")) {
|
||||
if ((useToolset == "v140") || (useToolset == "v141") ||
|
||||
(useToolset == "v142")) {
|
||||
return "v14";
|
||||
} else if (useToolset == "v120") {
|
||||
return "v12";
|
||||
@ -69,7 +75,8 @@ std::string cmVisualStudio10ToolsetOptions::GetLibFlagTableName(
|
||||
{
|
||||
std::string const useToolset = this->GetToolsetName(name, toolset);
|
||||
|
||||
if ((useToolset == "v140") || (useToolset == "v141")) {
|
||||
if ((useToolset == "v140") || (useToolset == "v141") ||
|
||||
(useToolset == "v142")) {
|
||||
return "v14";
|
||||
} else if (useToolset == "v120") {
|
||||
return "v12";
|
||||
@ -87,7 +94,9 @@ std::string cmVisualStudio10ToolsetOptions::GetLinkFlagTableName(
|
||||
{
|
||||
std::string const useToolset = this->GetToolsetName(name, toolset);
|
||||
|
||||
if (useToolset == "v141") {
|
||||
if (useToolset == "v142") {
|
||||
return "v142";
|
||||
} else if (useToolset == "v141") {
|
||||
return "v141";
|
||||
} else if (useToolset == "v140") {
|
||||
return "v140";
|
||||
@ -107,7 +116,8 @@ std::string cmVisualStudio10ToolsetOptions::GetMasmFlagTableName(
|
||||
{
|
||||
std::string const useToolset = this->GetToolsetName(name, toolset);
|
||||
|
||||
if ((useToolset == "v140") || (useToolset == "v141")) {
|
||||
if ((useToolset == "v140") || (useToolset == "v141") ||
|
||||
(useToolset == "v142")) {
|
||||
return "v14";
|
||||
} else if (useToolset == "v120") {
|
||||
return "v12";
|
||||
|
1212
Templates/MSBuild/FlagTables/v142_CL.json
Normal file
1212
Templates/MSBuild/FlagTables/v142_CL.json
Normal file
File diff suppressed because it is too large
Load Diff
1323
Templates/MSBuild/FlagTables/v142_Link.json
Normal file
1323
Templates/MSBuild/FlagTables/v142_Link.json
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user