xcode 关闭来自子项目的警告
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11841479/
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
Turn off warnings coming from subprojects
提问by Luca Bartoletti
Can someone help me to turn off warnings in Xcode 4 that I'm getting from subprojects?
有人可以帮助我关闭 Xcode 4 中从子项目中收到的警告吗?
I have three subprojects, with a lot of warnings. The subprojects are provide by my customer's R&D studio. I would like to turn off the warnings there, to put all my efforts and attention on warnings in my own code.
我有三个子项目,有很多警告。子项目由我客户的研发工作室提供。我想关闭那里的警告,把我所有的努力和注意力放在我自己代码中的警告上。
Is this possibile in Xcode 4?
这在 Xcode 4 中是可能的吗?
回答by Johnnywho
If you're using Xcode 4.2 or later, you can use LLVM compiler setting Inhibit All Warnings
in Warning Polices
for every subproject you have:
如果您使用的Xcode 4.2或更高版本,可以使用LLVM编译器设置Inhibit All Warnings
中Warning Polices
你有充分的子项目:
回答by Matthias
A partial solution only:
仅部分解决方案:
If your subprojects build libraries or bundles that do not have to recompile at every run, you can activate the "recent filer" (see figure, blue clock). Then, only warnings and errors from the last compiler run are displayed.
如果您的子项目构建的库或包无需在每次运行时重新编译,您可以激活“最近的文件管理器”(见图,蓝色时钟)。然后,仅显示来自上次编译器运行的警告和错误。
回答by Shai Mishali
If the library isn't too big, You could disable warnings on a per-file basis using
如果库不是太大,您可以使用每个文件禁用警告
#pragma GCC diagnostic ignored "-Wwarning-flag"