Reputation: 20257
I have a 3rd party framework that I have imported into my project, and it is causing compiler warnings to show up from issues in its header files. I do not want to have to change the 3rd party code, as it will likely change in the near future. I found this post:
Disable warnings in Xcode from frameworks
Which talks about how to turn off warnings on a per-file or per-project basis, but I am not certain how to do this for a framework. This is because the files are technically there but Xcode does not show them in the compiled sources section.
Does anyone know of a way to ignore compiler warnings for an included framework?
Upvotes: 8
Views: 2052
Reputation: 291
We've fixed same problem with a 3rd party framework warnings in header files by including problematic files in our pre-compiled header (.pch) with a proper pragma mark.
i.e.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmismatched-tags"
#pragma GCC diagnostic ignored "-Wreorder"
#import <ComponentKit/CKComponentViewConfiguration.h>
#import <ComponentKit/CKArrayControllerChangeset.h>
#import <ComponentKit/CKComponentDataSource.h>
#import <ComponentKit/CKComponentBoundsAnimation.h>
#pragma GCC diagnostic pop
Upvotes: 5