Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-111872

Fail to compile application if file named VERSION is within the application sources

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.4.2
    • Core: Other
    • None

      In include/QtCore/qcompilerdetection.h there is following part of the code:

      # if __has_include(<version>) /* remove this check once Integrity, QNX have caught up */.
      # include <version>.
      # endif.
      

      This leads to problems with compiler if there is a file named VERSION in application sources (to indicate the version number of application). That check seems to be QNX and Integrity specific so it should not enter there when compiling for other platforms. Therefore that preprocessor code path should be protected.

      Way to reproduce:

      Compile the attached example (tested on Windows) against Qt 6.4.2
      Compilation will fail with different compiler errors.

      As a workaround, splitting the include paths and non-include files in source hierarchy fixes the issue.

        1. qtbug111872.zip
          1 kB
          Tuukka Kettunen
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            thiago Thiago Macieira
            foxxx Tuukka Kettunen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes