Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Is it possible to run multiple instances of moc.exe in parallel?
Forum Update on Monday, May 27th 2025

Is it possible to run multiple instances of moc.exe in parallel?

Scheduled Pinned Locked Moved Unsolved General and Desktop
moc.exeqt5.6cmake
4 Posts 2 Posters 2.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jakob
    wrote on last edited by Jakob
    #1

    If I recall correctly some time ago I saw someone remarking in some (long) thread that moc.exe can not be run in parallel.

    • Is this indeed the case?
    • And if this is not possible, why not?

    There is a nice documentation page about moc at http://doc.qt.io/qt-5/moc.html. I think that page should mention such details.

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      I'm pretty sure you can run multiple versions of moc in parallel, if you run them in different processes and make sure you don't try to "compile" the same files.

      What's your use case?

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      J 1 Reply Last reply
      0
      • JKSHJ JKSH

        I'm pretty sure you can run multiple versions of moc in parallel, if you run them in different processes and make sure you don't try to "compile" the same files.

        What's your use case?

        J Offline
        J Offline
        Jakob
        wrote on last edited by
        #3

        @JKSH Thank you for replying. The use case is exactly what you're explaining, except that we're generating our complete (Visual Studio 2013) build-environment through CMake. What we're noticing is that during the stage that moc.exe is ran, it doesn't use the cores on the machine, but only one moc.exe process is created in sequence.

        JKSHJ 1 Reply Last reply
        0
        • J Jakob

          @JKSH Thank you for replying. The use case is exactly what you're explaining, except that we're generating our complete (Visual Studio 2013) build-environment through CMake. What we're noticing is that during the stage that moc.exe is ran, it doesn't use the cores on the machine, but only one moc.exe process is created in sequence.

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @Jakob said:

          @JKSH Thank you for replying. The use case is exactly what you're explaining, except that we're generating our complete (Visual Studio 2013) build-environment through CMake. What we're noticing is that during the stage that moc.exe is ran, it doesn't use the cores on the machine, but only one moc.exe process is created in sequence.

          Hmm... I guess what you want is to make your build tools launch multiple instances of moc.exe to process multiple files simultaneously. I'm afraid I don't have any experience with CMake... try looking in places like https://cmake.org/pipermail/cmake-developers/2012-June/016112.html

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved