[CMake] Parallel moc for Qt files

Michael Jackson mike.jackson at bluequartz.net
Thu Jul 6 16:00:04 EDT 2017


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


More information about the CMake mailing list