|
| 1 | + |
| 2 | +if("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC") |
| 3 | + # TODO: someone needs to provide the msvc equivalent warning flags |
| 4 | + macro(dispatch_common_warnings) |
| 5 | + endmacro() |
| 6 | +else() |
| 7 | + macro(dispatch_common_warnings) |
| 8 | + add_compile_options(-Werror) |
| 9 | + add_compile_options(-Wall) |
| 10 | + add_compile_options(-Wextra) |
| 11 | + add_compile_options(-Wno-unknown-warning-option) |
| 12 | + add_compile_options(-Wno-trigraphs) |
| 13 | + add_compile_options(-Wmissing-field-initializers) |
| 14 | + add_compile_options(-Wmissing-prototypes) |
| 15 | + add_compile_options(-Wdocumentation) |
| 16 | + add_compile_options(-Wunreachable-code) |
| 17 | + add_compile_options(-Wmissing-braces) |
| 18 | + add_compile_options(-Wparentheses) |
| 19 | + add_compile_options(-Wswitch) |
| 20 | + add_compile_options(-Wunused-function) |
| 21 | + add_compile_options(-Wunused-label) |
| 22 | + add_compile_options(-Wunused-parameter) |
| 23 | + add_compile_options(-Wunused-variable) |
| 24 | + add_compile_options(-Wunused-value) |
| 25 | + add_compile_options(-Wempty-body) |
| 26 | + add_compile_options(-Wuninitialized) |
| 27 | + add_compile_options(-Wunknown-pragmas) |
| 28 | + add_compile_options(-Wshadow) |
| 29 | + add_compile_options(-Wno-four-char-constants) |
| 30 | + add_compile_options(-Wconversion) |
| 31 | + add_compile_options(-Wconstant-conversion) |
| 32 | + add_compile_options(-Wint-conversion) |
| 33 | + add_compile_options(-Wbool-conversion) |
| 34 | + add_compile_options(-Wenum-conversion) |
| 35 | + add_compile_options(-Wassign-enum) |
| 36 | + add_compile_options(-Wsign-compare) |
| 37 | + add_compile_options(-Wshorten-64-to-32) |
| 38 | + add_compile_options(-Wpointer-sign) |
| 39 | + add_compile_options(-Wnewline-eof) |
| 40 | + add_compile_options(-Wdeprecated-declarations) |
| 41 | + add_compile_options(-Wsign-conversion) |
| 42 | + add_compile_options(-Winfinite-recursion) |
| 43 | + add_compile_options(-Warray-bounds-pointer-arithmetic) |
| 44 | + add_compile_options(-Watomic-properties) |
| 45 | + add_compile_options(-Wcomma) |
| 46 | + add_compile_options(-Wconditional-uninitialized) |
| 47 | + add_compile_options(-Wcovered-switch-default) |
| 48 | + add_compile_options(-Wdate-time) |
| 49 | + add_compile_options(-Wdeprecated) |
| 50 | + add_compile_options(-Wdouble-promotion) |
| 51 | + add_compile_options(-Wduplicate-enum) |
| 52 | + add_compile_options(-Wexpansion-to-defined) |
| 53 | + add_compile_options(-Wfloat-equal) |
| 54 | + add_compile_options(-Widiomatic-parentheses) |
| 55 | + add_compile_options(-Wignored-qualifiers) |
| 56 | + add_compile_options(-Wimplicit-fallthrough) |
| 57 | + add_compile_options(-Wnullable-to-nonnull-conversion) |
| 58 | + add_compile_options(-Wobjc-interface-ivars) |
| 59 | + add_compile_options(-Wover-aligned) |
| 60 | + add_compile_options(-Wpacked) |
| 61 | + add_compile_options(-Wpointer-arith) |
| 62 | + add_compile_options(-Wselector) |
| 63 | + add_compile_options(-Wstatic-in-inline) |
| 64 | + add_compile_options(-Wsuper-class-method-mismatch) |
| 65 | + add_compile_options(-Wswitch-enum) |
| 66 | + add_compile_options(-Wtautological-compare) |
| 67 | + add_compile_options(-Wunguarded-availability) |
| 68 | + add_compile_options(-Wunused) |
| 69 | + add_compile_options(-Wno-disabled-macro-expansion) |
| 70 | + add_compile_options(-Wno-pedantic) |
| 71 | + add_compile_options(-Wno-bad-function-cast) |
| 72 | + add_compile_options(-Wno-c++-compat) |
| 73 | + add_compile_options(-Wno-c++98-compat) |
| 74 | + add_compile_options(-Wno-c++98-compat-pedantic) |
| 75 | + add_compile_options(-Wno-cast-align) |
| 76 | + add_compile_options(-Wno-cast-qual) |
| 77 | + add_compile_options(-Wno-documentation-unknown-command) |
| 78 | + add_compile_options(-Wno-format-nonliteral) |
| 79 | + add_compile_options(-Wno-missing-variable-declarations) |
| 80 | + add_compile_options(-Wno-old-style-cast) |
| 81 | + add_compile_options(-Wno-padded) |
| 82 | + add_compile_options(-Wno-reserved-id-macro) |
| 83 | + add_compile_options(-Wno-shift-sign-overflow) |
| 84 | + add_compile_options(-Wno-undef) |
| 85 | + add_compile_options(-Wno-unreachable-code-aggressive) |
| 86 | + add_compile_options(-Wno-unused-macros) |
| 87 | + add_compile_options(-Wno-used-but-marked-unused) |
| 88 | + add_compile_options(-Wno-vla) |
| 89 | + endmacro() |
| 90 | +endif() |
0 commit comments