Adding custom defines when on debug build
Hello,
I would like to pass custom #define's to the compiler when i make a debug build of my program
In my qmake file I have defined CONFIG var to be able of generating release and debug builds
CONFIG += debug_and_release
so when in command line i write
$>make debug
the builded application will have debug features, but I also need to define my custom defines to control the display my own debug messages when on debug or release.
For example:
#ifdef DEBUG_VAR
// the code of the debug message
#else
// do nothing
#endif
I would like to know also if qmake adds some useful defines for this case to the compiler
Thanks in advance!
Re: Adding custom defines when on debug build
No, but you can add:
Code:
debug:DEFINES += DEBUG_VAR
to your project file.
Re: Adding custom defines when on debug build