[Qt-interest] qmake and per-file QMAKE_CXXFLAGS?
Dave Thorup
lists at kuwan.net
Mon Feb 23 21:54:09 CET 2009
I'm wondering if it's possible to define QMAKE_CXXFLAGS flags on a per-
file basis instead of defining it for the entire project?
For example, say we've got a bunch of .cpp files: foo.cpp, bar.cpp and
baz.cpp. Then a few of these files contain SSE2-optimized code:
fooSSE.cpp & barSSE.cpp. Now the problem is that I want all the
normal files in the project - the ones without SSE2 - to be compiled
with "QMAKE_CXXFLAGS += -msse". But, for all the SSE2 files I want
them to be compiled with "QMAKE_CXXFLAGS += -msse2".
If the entire project is built with "-msse2" then the generated code
cannot run on machines that do not have SSE2. Is it possible to have
QMAKE_CXXFLAGS defined differently for different files in a project?
Does anyone have any other suggestions?
Thanks!
Qt 4.4 Linux
Dave
More information about the Qt-interest-old
mailing list