In a C++ file, I have a code like this:
#if ACTIVATE # pragma message( \"Activated\" ) #else # pragma message( \"Not Activated\") #endif
I
For VS2010 and up, see my answer here for a solution that requires no modification of the original project file.