Turn off warnings coming from subprojects

2019-03-14 11:38发布

问题:

Can someone help me to turn off warnings in Xcode 4 that I'm getting from subprojects?

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?

回答1:

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:



回答2:

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.



回答3:

If the library isn't too big, You could disable warnings on a per-file basis using

#pragma GCC diagnostic ignored "-Wwarning-flag"