[CMake] Parallel moc for Qt files

Michael Jackson mike.jackson at bluequartz.net
Fri Jul 7 07:22:30 EDT 2017


Looks like an interesting project. After reading  the blog and reading the GitHub issue pages there seem to be serious issues with MSVC still which is a blocker for us. I will keep an eye on it though.

--
Michael A. Jackson
________________________________
From: Cristian Adam <cristian.adam at gmail.com>
Sent: Thursday, July 6, 2017 6:11:50 PM
To: Michael Jackson
Cc: cmake
Subject: Re: [CMake] Parallel moc for Qt files

On Thu, Jul 6, 2017 at 10:00 PM, Michael Jackson <mike.jackson at bluequartz.net<mailto:mike.jackson at bluequartz.net>> wrote:
I have a large list of files that need to have Qt's 'moc' run on them (107 headers). I use all the normal CMake facilities for Qt based projects. I noticed that the generation of the moc files are done serially. Is there a flag or anything that I can use to run the generation in Parallel? I ask because each file takes about 3 seconds to run through moc. The code is heavily C++ templated which I think causes 'moc' to run more slowly. We have other places in the code where 'moc' must run and it does each file in the "blink of an eye".

Just curious.


Have you tried removing moc altogether using Verdigris<https://woboq.com/blog/verdigris-qt-without-moc.html>? I'm curious how this would speed up your compilation time.

Cheers,
Cristian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170707/34aa961c/attachment-0001.html>


More information about the CMake mailing list