[CMake] Parallel moc for Qt files

Michael Jackson mike.jackson at bluequartz.net
Fri Jul 7 07:25:39 EDT 2017


Thank you for the suggestions.

It is almost like a Jom for moc needs to be written.

-Mike Jackson
________________________________
From: Benjamin Ballet <bballet at ivsweb.com>
Sent: Friday, July 7, 2017 5:47:20 AM
To: Michael Jackson
Cc: cmake
Subject: Re: [CMake] Parallel moc for Qt files

I don't know how to parallelize moc with CMake though I previously reduce moc time (sometimes it's very slow) :

- by replacing as much #include as possible by forward-declaration

- wrapping some #include around #ifndef Q_MOC_RUN ... #endif

2017-07-06 22:00 GMT+02:00 Michael Jackson <mike.jackson at bluequartz.net<mailto:mike.jackson at bluequartz.net>>:
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.

--
Michael A. Jackson
BlueQuartz Software, LLC
[e]: mike.jackson at bluequartz.net<mailto:mike.jackson at bluequartz.net>
--

Powered by www.kitware.com<http://www.kitware.com>

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake



--
Benjamin Ballet
Ingénieur R&D

[http://www.activscreen.com/mkg/signature/email_2017/ivs_logo.png]<http://www.activisu.com/>

19 rue Klock - 92110 Clichy - FRANCE
Standard : +33 1 44 69 37 37

www.activisu.com<http://www.activisu.com>

[http://www.activscreen.com/mkg/signature/Signature_IVS_MAI_17.png]<http://www.activisu.com>

[http://www.activscreen.com/mkg/signature/email_2017/linkedin.png]<https://www.linkedin.com/company/ivs>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170707/f6f18367/attachment.html>


More information about the CMake mailing list