With qmake, how to use precompiled headers except for one file?
-
Suppose we have a project with 100
.cppfiles. They are compiled with a precompiled header (for speedup reasons), except for one (let's call itspecial.cpp) which is not in our hands and, for reasons beyond this discussion, cannot use the precompiled header.In my
.profile, how can I prevent qmake from compilingspecial.cppwith the precompiled header?Needs to work with Qt 5.12.0, Visual Studio 2017 and g++ 7.3.
-
Suppose we have a project with 100
.cppfiles. They are compiled with a precompiled header (for speedup reasons), except for one (let's call itspecial.cpp) which is not in our hands and, for reasons beyond this discussion, cannot use the precompiled header.In my
.profile, how can I prevent qmake from compilingspecial.cppwith the precompiled header?Needs to work with Qt 5.12.0, Visual Studio 2017 and g++ 7.3.
@dave2
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
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@raven-worx Thanks!