Precompiled headers to speed up builds

Hi,

I would like to precompile Qt, Vtk and Itk headers to speed up the build in the Slicer-build directory.

I created some empty libraries in Libs directory to precompile the most common headers (QString, QObject, VtkObject.h…)
PrecompileItkHeaders
PrecompileVtkHeaders
PrecompileQtCoreHeaders
PrecompileQtWidgetsHeaders

I tried to add some target_precompile_headers cmake commands in slicer CMakeLists.txt but most of the time it does not work: this gcc warning appears:
cmake_pch.hxx.gch: not used because `PrecompileVtkHeaders_EXPORTS’ not defined [-Winvalid-pch]

If I use add_executable rather than add_library in my Precompile*** projects then these warnings disappear… But I still have similar warnings if I try to use precompiled headers in loadable modules.

Do you have any experience / guidelines with precompiled headers ?
Is it in the 3D Slicer roadmap ?

The results are very interesting (Libs/MRML/Widgets build in 20 seconds rather than 2 minutes if I use QtCore and QtWidgets precompiled headers)

Regards