Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1796

Qt's MOC fails if there are 2+ files with the same name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • 2.3.1
    • Libraries: Qt
    • None

      I have the following structure:

      .
      ├── GlobalKeysImpl.cpp
      ├── GlobalKeysImpl.hpp
      ├── fake
      │   ├── Keys.cpp
      │   └── Keys.hpp
      └── macos
          ├── Keys.hpp
          └── Keys.mm
      

      The build fails with the error

      ERROR: ~/project/build/release/genmodules/Qt/ebbf654a33ba1444/modules/Qt/core/core.qbs:326:18 Conflicting instances of rule '[cpp,hpp,moc_cpp,qt.core.metatypes.in,unmocable][hpp]':
      Output artifact '~/project/build/release/lib-globalkeys.2b19d184/qt.headers/moc_Keys.cpp' is to be produced from input artifacts '~/project/libs/globalkeys/src/macos/Keys.hpp' and '~/project/libs/globalkeys/src/fake/Keys.hpp', but the rule is not a multiplex rule.
      

      because the Rule for moc does not respect the fact that the files are in different subfolders.

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

            Unassigned Unassigned
            gooroo Serhii Olendarenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes