Commit Graph

8 Commits

Author SHA1 Message Date
Peter Keresztes Schmidt c8f2a813e3 Build: Enable VLA warnings
VLAs (variable-length arrays) are a C99 feature and were never standardised for C++.
There are better alternatives in C++ (mainly std::vector). Enable the warnings
so no new ones can be introduced.
2021-05-17 22:12:04 +02:00
Peter Keresztes Schmidt bf08502b9c Build: Add CMake option to enable Werror
With -DENABLE_WERROR the -Werror flag will be passed to the compiler failing the build if a warning is emitted.
2021-05-01 00:07:12 +02:00
Peter Keresztes Schmidt e8565b0704 Build: Enable implicit fallthrough warnings on clang 2021-04-11 23:39:35 +02:00
Peter Keresztes Schmidt 6e2f8bfedb build: Enable Wextra with some exceptions
-Wno-cast-function-type:
Signal handler code relies on this.

-Wno-type-limits:
Some of the color space conversion code in zm_image throws this warning. To not break anything let's ignore this warning for the time being.

Note that clang enables -Woverloaded-virtual with -Wextra. To not flood the GCC build log with warnings let's not enable this at the moment.
This will be done in a second step, when the currently throwing code will be cleaned up.
2021-02-27 02:08:14 +01:00
Peter Keresztes Schmidt 4c07bf5aae Build: Add ThreadSanitizer (TSan) support
Enable it by setting -DTSAN=1
This setting is mutually exclusive with -DASAN
2021-02-11 00:38:31 +01:00
Peter Keresztes Schmidt 424e6e14f6 Build: Add -DASAN option to build with AddressSanitizer support
Use this option only for debugging purposes.
2021-02-08 23:13:31 +01:00
Peter Keresztes Schmidt 825ca07561 Build: Use zm-* interfaces to set cxx standard and warning flags 2021-02-08 23:08:22 +01:00
Peter Keresztes Schmidt 407ea70991 Build: Add support for compiler detection
Using this system we can separate settings for different compilers nicely.
2021-02-08 23:08:22 +01:00