I have several build targets that reference the same code and I would like certain build targets to not compile a section of the shared code. (The server target should compile everything and the client target should not compile a specific section of code.) Under the build options for the server target, I've gone to compiler settings > #defines and entered the following:
"SERVERTOPOLOGY=1"
My code looks like this:
general code
#if SERVERTOPOLOGY==1
code for the server
#endif
more general code
Unfortunately, I can't seem to get this to work. The server target does not compile the code inside of the #if statement. I've also tried single quotes, and leaving the quotes away for the define. I've also tried replacing the #if SERVERTOPOLOGY==1 part with #ifdef SERVERTOPOLOGY to no avail.
Perhaps someone can give me a little insight into my problem?