开发者

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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜