开发者

Xcode: Compile Under Certain Build Configurations

开发者 https://www.devze.com 2023-03-04 08:18 出处:网络
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.C

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

精彩评论

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

关注公众号