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

[Windows] moc does not create moc_predefs.h in certain cases

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.7, 6.8.0 FF
    • None
    • Windows

    Description

      I hit it when trying to build https://codereview.qt-project.org/c/qt/qtbase/+/560619/4 (note that the later revisions of this patch will try to work around this issue).

      In this patch, in tst_qfloat16format.cpp, there are two different implementations of tst_QFloat16Format, depending on whether QT_SUPPORTS_STD_FORMAT is defined or not. That define is dependant on the available standard library features.

      On Linux and macOS, moc correctly creates the deps file with the stdlib headers, and also the moc_predefs.h file, where all the stdlib definitions (and some Qt definitions) are extracted.

      On Windows the deps file contains only the dependencies to other Qt headers, but not to the stdlib headers, and the mod_predefs.h file is not created at all.
      As a result, moc does not see the definition when creating tst_qfloat16format.moc, but the compiler does see it, and so tries to compile a different test class.

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            ivan.solovev Ivan Solovev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes