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
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.
UPD: attached minimal CMake project that illustrates the problem and error message screenshot.
|For Gerrit Dashboard: QTCREATORBUG-21860
|Clang: Fix language version detection with PCH-s in CMake enabled