Conditionally disable warnings with qmake/gcc?

后端 未结 5 1166
予麋鹿
予麋鹿 2021-01-02 22:20

I am involved with a software project written in Qt and built with qmake and gcc on Linux. We have to link to a third-party library that is of fairly low quality and spews

5条回答
  •  一个人的身影
    2021-01-02 23:05

    Jonathan, I think the problem is where your source files are including header files from 3rd party libraries, and you want to switch off the warnings for the latter.

    Kevin, i think you can use pragmas to control warnings : gcc diagnostic pragmas

    You could add these before and after any #includes for 3rd party libs.

提交回复
热议问题