Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 4.8.0, Qt Creator 4.8.1
-
None
-
-
d9703158eeb440b34ba6621b1adeaee3f3509844 (qt-creator/qt-creator/4.9)
Description
Hi everyone,
I've noticed there is a regression in language version detection in 4.8.0 and 4.8.1, while it works fine in 4.7.2: in CMake-based project that use cotire module(https://github.com/sakra/cotire) language version is always CXX98 even if different version was specified in CMakeLists.txt.
After some analysis I found exact reason why it fails. In abstractmsvctoolchain.cpp there is a function
bool static hasFlagEffectOnMacros(const QString &flag)
that performs compiler flags filtering, throwing out flags useless for language version detection(currently only /I and /W). It works fine without cotire, but with cotire PCH generation we have /FI flag so sample compilation in MsvcToolChain::msvcPredefinedMacros fails with "Unable to find include bla-blah" error.
Thanks,
Vlad.
UPD: attached minimal CMake project that illustrates the problem and error message screenshot.
Attachments
Issue Links
- relates to
-
QTCREATORBUG-21619 Code model can't parse visual studio headers when using PCH
- Closed
For Gerrit Dashboard: QTCREATORBUG-21860 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
254881,3 | Clang: Fix language version detection with PCH-s in CMake enabled | 4.9 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |