Xcode 项目范围的编译器标志
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7932834/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode Project-Wide compiler flag
提问by Riley Testut
With Xcode 4.2 and the LLVM compiler, when compiling for ARMv6 there are some very weird bugs in the generated application (such as "width" property of CGSize returning the "height" instead). To fix this, I found I must set the compiler flag -mno-thumb. I know how to set compiler flags on a file-by-file basis, but is there a way to set a compiler flag for the entire project?
使用 Xcode 4.2 和 LLVM 编译器,在为 ARMv6 编译时,生成的应用程序中存在一些非常奇怪的错误(例如 CGSize 的“宽度”属性返回“高度”)。为了解决这个问题,我发现我必须设置编译器标志 -mno-thumb。我知道如何逐个文件地设置编译器标志,但是有没有办法为整个项目设置编译器标志?
回答by chown
You can set project wide compiler flags in the project settings under the "Language" section of the "Build Settings" tab.
您可以在“构建设置”选项卡的“语言”部分下的项目设置中设置项目范围的编译器标志。