Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
With qmake, how to use precompiled headers except for one file?
dave2 last edited by dave2
Suppose we have a project with 100
.cppfiles. They are compiled with a precompiled header (for speedup reasons), except for one (let's call it
special.cpp) which is not in our hands and, for reasons beyond this discussion, cannot use the precompiled header.
.profile, how can I prevent qmake from compiling
special.cppwith the precompiled header?
Needs to work with Qt 5.12.0, Visual Studio 2017 and g++ 7.3.
i think it might be doable by enabling the precompiled headers by default for the whole project and add a custom compiler to qmake and assign the files which shouldn't be compiled with the precompiled header to it.
Use QMAKE_CXX and QMAKE_CXX_FLAGS variables
dave2 last edited by