AO2-Client icon indicating copy to clipboard operation
AO2-Client copied to clipboard

Configure CMake to compile with warnings as errors

Open mposs00 opened this issue 3 years ago • 4 comments

Necessary to prevent usage of deprecated APIs and to enforce code quality

Depends on resolution of #798 #799 #800

mposs00 avatar Jun 28 '22 17:06 mposs00

Werror is not helpful because warnings are inconsistent across compilers. They can prevent someone else from building code, but they may be helpful for ci builds since we keep our toolchain versions fixed (or do we). On the other hand, which warnings have actually indicated a bug in the code, versus simply being nudged to use Qt6/C++20?

oldmud0 avatar Jun 28 '22 18:06 oldmud0

q(s)rand() are both deprecated as of Qt5.10, QString::SplitBehavior is definitely deprecated in the Qt 5.15 LTS, idk about any sooner releases, I'm not sure when it was deprecated. I can test the build on clang, but the reported warnings were generated by GCC 11.3.0

mposs00 avatar Jun 28 '22 20:06 mposs00

Defining the spec as C++11/17/whatever might be wise

mposs00 avatar Jun 28 '22 20:06 mposs00

I'm fine with setting the spec to c++17 and enabling -Werror on ci builds once we eliminate the compiler warnings we have.

oldmud0 avatar Jul 14 '22 03:07 oldmud0