Commit f0467f8b authored by Joerg Bornemann's avatar Joerg Bornemann

support Visual Studio 2015

Task-number: QTBUG-46344
Change-Id: I49c3e2776e65cc83d40d1f5ab3be1365d17242d1
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>
parent 483b850a
......@@ -72,7 +72,8 @@ QByteArray GeneratorInfo::generator() const
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2008Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2010Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2012Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor) {
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2015Flavor) {
return "NMake Makefiles";
} else if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {
if (Utils::HostOsInfo::isWindowsHost())
......@@ -105,7 +106,8 @@ QString GeneratorInfo::displayName() const
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2008Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2010Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2012Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor) {
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2015Flavor) {
return tr("NMake Generator (%1)").arg(m_kit->displayName());
} else if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {
if (Utils::HostOsInfo::isWindowsHost())
......@@ -140,7 +142,8 @@ QList<GeneratorInfo> GeneratorInfo::generatorInfosFor(ProjectExplorer::Kit *k, N
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2008Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2010Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2012Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor) {
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2015Flavor) {
if (hasCodeBlocks)
results << GeneratorInfo(k);
} else if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor) {
......
......@@ -761,6 +761,8 @@ static QByteArray msvcRunTime(const Abi::OSFlavor flavour)
return "MSVCR110";
case Abi::WindowsMsvc2013Flavor:
return "MSVCR120";
case Abi::WindowsMsvc2015Flavor:
return "MSVCR140";
default:
break;
}
......
......@@ -168,6 +168,9 @@ static QList<Abi> parseCoffHeader(const QByteArray &data)
case 12:
flavor = Abi::WindowsMsvc2013Flavor;
break;
case 14:
flavor = Abi::WindowsMsvc2015Flavor;
break;
default: // Keep unknown flavor
if (minorLinker != 0)
flavor = Abi::WindowsMSysFlavor; // MSVC seems to avoid using minor numbers
......@@ -414,6 +417,8 @@ Abi::Abi(const QString &abiString) :
m_osFlavor = WindowsMsvc2012Flavor;
else if (abiParts.at(2) == QLatin1String("msvc2013") && m_os == WindowsOS)
m_osFlavor = WindowsMsvc2013Flavor;
else if (abiParts.at(2) == QLatin1String("msvc2015") && m_os == WindowsOS)
m_osFlavor = WindowsMsvc2015Flavor;
else if (abiParts.at(2) == QLatin1String("msys") && m_os == WindowsOS)
m_osFlavor = WindowsMSysFlavor;
else if (abiParts.at(2) == QLatin1String("ce") && m_os == WindowsOS)
......@@ -674,6 +679,8 @@ QString Abi::toString(const OSFlavor &of)
return QLatin1String("msvc2012");
case Abi::WindowsMsvc2013Flavor:
return QLatin1String("msvc2013");
case Abi::WindowsMsvc2015Flavor:
return QLatin1String("msvc2015");
case Abi::WindowsMSysFlavor:
return QLatin1String("msys");
case Abi::WindowsCEFlavor:
......@@ -724,8 +731,8 @@ QList<Abi::OSFlavor> Abi::flavorsForOs(const Abi::OS &o)
return result << GenericUnixFlavor << SolarisUnixFlavor << UnknownFlavor;
case WindowsOS:
return result << WindowsMsvc2005Flavor << WindowsMsvc2008Flavor << WindowsMsvc2010Flavor
<< WindowsMsvc2012Flavor << WindowsMsvc2013Flavor << WindowsMSysFlavor
<< WindowsCEFlavor << UnknownFlavor;
<< WindowsMsvc2012Flavor << WindowsMsvc2013Flavor << WindowsMsvc2015Flavor
<< WindowsMSysFlavor << WindowsCEFlavor << UnknownFlavor;
case VxWorks:
return result << VxWorksFlavor << UnknownFlavor;
case UnknownOS:
......
......@@ -90,6 +90,7 @@ public:
WindowsMsvc2010Flavor,
WindowsMsvc2012Flavor,
WindowsMsvc2013Flavor,
WindowsMsvc2015Flavor,
WindowsMSysFlavor,
WindowsCEFlavor,
......
......@@ -101,7 +101,8 @@ ToolChain::CompilerFlags AbstractMsvcToolChain::compilerFlags(const QStringList
if (m_abi.osFlavor() == Abi::WindowsMsvc2010Flavor
|| m_abi.osFlavor() == Abi::WindowsMsvc2012Flavor
|| m_abi.osFlavor() == Abi::WindowsMsvc2013Flavor)
|| m_abi.osFlavor() == Abi::WindowsMsvc2013Flavor
|| m_abi.osFlavor() == Abi::WindowsMsvc2015Flavor)
flags |= StandardCxx11;
return flags;
......
......@@ -135,7 +135,9 @@ static Abi findAbiOfMsvc(MsvcToolChain::Type type, MsvcToolChain::Platform platf
else if (version == QLatin1String("v7.0A") || version == QLatin1String("v7.1"))
msvcVersionString = QLatin1String("10.0");
}
if (msvcVersionString.startsWith(QLatin1String("12.")))
if (msvcVersionString.startsWith(QLatin1String("14.")))
flavor = Abi::WindowsMsvc2015Flavor;
else if (msvcVersionString.startsWith(QLatin1String("12.")))
flavor = Abi::WindowsMsvc2013Flavor;
else if (msvcVersionString.startsWith(QLatin1String("11.")))
flavor = Abi::WindowsMsvc2012Flavor;
......@@ -404,6 +406,14 @@ QList<Utils::FileName> MsvcToolChain::suggestedMkspecList() const
<< Utils::FileName::fromLatin1("winrt-x64-msvc2013")
<< Utils::FileName::fromLatin1("win32-msvc2012")
<< Utils::FileName::fromLatin1("win32-msvc2010");
case Abi::WindowsMsvc2015Flavor:
return QList<Utils::FileName>()
<< Utils::FileName::fromLatin1("win32-msvc2015")
<< Utils::FileName::fromLatin1("winphone-arm-msvc2015")
<< Utils::FileName::fromLatin1("winphone-x86-msvc2015")
<< Utils::FileName::fromLatin1("winrt-arm-msvc2015")
<< Utils::FileName::fromLatin1("winrt-x86-msvc2015")
<< Utils::FileName::fromLatin1("winrt-x64-msvc2015");
default:
break;
}
......
......@@ -257,7 +257,8 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
if (!m.isEmpty())
data.insert(QLatin1String(CPP_COMPILERPATHBYLANGUAGE), m);
if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor) {
if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2013Flavor
|| targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvc2015Flavor) {
const QLatin1String flags("/FS");
data.insert(QLatin1String(CPP_PLATFORMCFLAGS), flags);
data.insert(QLatin1String(CPP_PLATFORMCXXFLAGS), flags);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment