Unsolved Is it possible to run multiple instances of moc.exe in parallel?
-
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.
-
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?
-
@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.
-
@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