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

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

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes