I’d like to have some variables set to different values depending if I’m compiling in Debug or in Release mode: is that possible?
Including different files or something like a #DEFINE would be fine either way.
edit
In case it wasn’t clear, this have to happen automatically: if I have to change something by hand every time I compile, it’s completely pointless. The whole point of this question is exactly NOT having to do it.
- I compile
DEBUG–> I have [x] set - I compile
RELEASE–> I have [y] set
Another way to see it is: from the program itself, can I detect if it has been compiled in debug or release mode?
Here’s some code which you can use to check the compile mode at runtime: