Make Xcode ignore LLVM build warnings in 3rd party project

前端 未结 4 1061
深忆病人
深忆病人 2021-01-18 05:13

I have a third party project in my Xcode workspace (it\'s a dependency for my main project) and I want Xcode to ignore all build warnings from that third party project.

4条回答
  •  一个人的身影
    2021-01-18 05:51

    if you are worried only about warning via inclusion, then you can wrap your include statements in this:

    #pragma clang diagnostic push
     // in reality, you will likely need to disable *more* than Wmultichar
    #pragma clang diagnostic ignored "-Wmultichar"
    #include 
    #pragma clang diagnostic pop
    

    if you also want to disable the build warnings it generates, then you can use -w or GCC_WARN_INHIBIT_ALL_WARNINGS = YES for the third party target which you link to or bundle.

    ideally, you will file reports with the vendor if it is closed. if it is open, then maybe you should just patch it yourself.

提交回复
热议问题