forked from qt-creator/qt-creator
Clang: Use -fms-compatibility-version with clang-cl toolchain
It's used while building so let's also do that in Clang Code Model. Change-Id: I4e5e3ccc71d14c8d44049672e37380af2592390f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -472,8 +472,10 @@ static QByteArray msCompatibilityVersionFromDefines(const ProjectExplorer::Macro
|
|||||||
|
|
||||||
void CompilerOptionsBuilder::addMsvcCompatibilityVersion()
|
void CompilerOptionsBuilder::addMsvcCompatibilityVersion()
|
||||||
{
|
{
|
||||||
if (m_projectPart.toolchainType == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID) {
|
if (m_projectPart.toolchainType == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID
|
||||||
const ProjectExplorer::Macros macros = m_projectPart.toolChainMacros + m_projectPart.projectMacros;
|
|| m_projectPart.toolchainType == ProjectExplorer::Constants::CLANG_CL_TOOLCHAIN_TYPEID) {
|
||||||
|
const ProjectExplorer::Macros macros = m_projectPart.toolChainMacros
|
||||||
|
+ m_projectPart.projectMacros;
|
||||||
const QByteArray msvcVersion = msCompatibilityVersionFromDefines(macros);
|
const QByteArray msvcVersion = msCompatibilityVersionFromDefines(macros);
|
||||||
|
|
||||||
if (!msvcVersion.isEmpty()) {
|
if (!msvcVersion.isEmpty()) {
|
||||||
|
Reference in New Issue
Block a user