In C/C++/Objective C you can define a macro using compiler preprocessors. Moreover, you can include/exclude some parts of code using compiler preprocessors.
Moignans answer here works fine. Here is another peace of info in case it helps,
#if DEBUG let a = 2 #else let a = 3 #endif
You can negate the macros like below,
#if !RELEASE let a = 2 #else let a = 3 #endif