Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-21860

Language version detection is broken with cotire

XMLWordPrintable

    • Windows
    • d9703158eeb440b34ba6621b1adeaee3f3509844 (qt-creator/qt-creator/4.9)

      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. 

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            yvvan Ivan Donchevskii
            c00ld Vladislav
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes