diff options
author | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-11-30 15:12:33 +0100 |
---|---|---|
committer | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2018-12-03 08:51:57 +0000 |
commit | 8920d78bb298d96674d31ab6af7d22b904f9e69e (patch) | |
tree | 2097a2f165536f92f4c226e88c9d2ef846b8f658 | |
parent | 6e75e7f4e41d0cd130ef07e03030c74bb73c9d6e (diff) | |
download | qt-creator-8920d78bb298d96674d31ab6af7d22b904f9e69e.tar.gz |
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>
-rw-r--r-- | src/plugins/cpptools/compileroptionsbuilder.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp index 085e6fe132..9ae36b7551 100644 --- a/src/plugins/cpptools/compileroptionsbuilder.cpp +++ b/src/plugins/cpptools/compileroptionsbuilder.cpp @@ -472,13 +472,15 @@ static QByteArray msCompatibilityVersionFromDefines(const ProjectExplorer::Macro void CompilerOptionsBuilder::addMsvcCompatibilityVersion() { - if (m_projectPart.toolchainType == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID) { - const ProjectExplorer::Macros macros = m_projectPart.toolChainMacros + m_projectPart.projectMacros; + if (m_projectPart.toolchainType == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID + || m_projectPart.toolchainType == ProjectExplorer::Constants::CLANG_CL_TOOLCHAIN_TYPEID) { + const ProjectExplorer::Macros macros = m_projectPart.toolChainMacros + + m_projectPart.projectMacros; const QByteArray msvcVersion = msCompatibilityVersionFromDefines(macros); if (!msvcVersion.isEmpty()) { const QString option = QLatin1String("-fms-compatibility-version=") - + QLatin1String(msvcVersion); + + QLatin1String(msvcVersion); m_options.append(option); } } |