Reputation: 9156
Is there a portable way to add certain include(s) to all C++ modules that are part of a Qt project by modifying the .pro file (like I would do it for GCC using the -include
option)?
Upvotes: 0
Views: 106
Reputation: 15091
There's no portable way to do this, as every compiler should be treated differently.
The best you can do is to write a bunch of conditionals. For example
*-g++:QMAKE_CXXFLAGS += -include myheader.h
else:*-msvc:QMAKE_CXXFLAGS += -Fi myheader.h
# else:...
Upvotes: 1