Xcode: Compile Under Certain Build Configurations
Is there a way to configure a given target to only compile under certain build configurations?
For example, let's say I have a simple shell tool that compiles alongside a larger library to test it. Can I set it to compile under the "Debug" build configur开发者_如何学编程ation, but not "Release?"
I believe what you need to do is something like
#ifdef RELEASE
// if we get here it won't compile
#error
#endif
I know that's quite dirty, I do apologize - hopefully someone more experience in Xcode/Objective-C will have an answer!
精彩评论