[Qt-interest] passing in compile flags from qmake
Aaron Lewis
aaron.lewis1989 at gmail.com
Sat Mar 27 01:57:33 CET 2010
DEFINES
qmake adds the values of this variable as compiler C preprocessor macros
(-D option).
For example:
DEFINES += USE_MY_STUFF QT_DLL
Hope it helps ;-)
David Boosalis wrote:
> On one platform I have a mysql password set as "passwordA", on the
> other platform I have set to "passwordB". I just comment out one line
> or the other. Both platforms share the same CVS source code, and
> although it is much to vi the source and comment out the wrong password as
>
> //QString password = "passwordA";
> QString password = "passwordB";
>
> I'd like to add it as a QMake or Make option, so I do not have to edit
> the file. What I am asking is how do I pass a #define to the compiler
> I invision the source code to look something like this.
>
> #ifdef platfromA
> QString password = "passwordA";
> #else
> QString password = "passwordB";
> #endif
>
> How does one set such a flag in project file ?
>
> Thanks in advance for any help
> -David
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
--
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100327/197777aa/attachment.html
More information about the Qt-interest-old
mailing list