[CMake] Qt5 + cmake = SLOW moc.exe

Petar Petrov pip010 at gmail.com
Mon Feb 8 05:48:26 EST 2016


hello cmake community, just re-pasting what I've already posted on Qt
forums:



I'am experiencing some abysmal compilation time when it comes to building a
relatively small Qt5 app in windows.

The problem resembles alot the reported here issue :
http://lists.qt-project.org/pipermail/interest/2015-January/014812.html

In case one uses cmake+qt5 to build on windows and have additional projects
(in my case VTK/ITK/Boost)
moc.exe will go first over all visible to cmake paths, some windows ones,
then finally in C:/Qt to find its headers.
So for generating one cpp file from moc.exe I end up with a few million IO
operations! ine can use procmon.exe to inspect moc.exe on windows.
Rebuilding from scratch takes ages compared to what takes <5min before
switching to Qt :((((

MOC cannot go in parallel (pre-processor!!!)

at that point I'm faced with a few options to explore, however I expect
something of official HOW-TO on cmake+qt integration.

It might be a Qt5 or/and Cmake issue, hard to tell, since I'm not expert in
either.

Can someone with more inside take a look please !?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160208/aad0afb4/attachment.html>


More information about the CMake mailing list