clang_warnings.cmake 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. set(WARNINGS
  2. -Wall
  3. -Walloca
  4. -Warray-parameter
  5. -Wbad-function-cast
  6. -Wcast-qual
  7. -Wconditional-uninitialized
  8. -Wconversion
  9. -Wdate-time
  10. -Wdisabled-optimization
  11. -Wdouble-promotion
  12. -Wenum-compare
  13. -Wenum-conversion
  14. -Werror
  15. -Wextra
  16. -Wextra-semi-stmt
  17. -Wfloat-equal
  18. -Wformat=2
  19. -Wframe-larger-than=8388608
  20. -Winfinite-recursion
  21. -Winit-self
  22. -Winvalid-pch
  23. -Wlarger-than=1073741824
  24. -Wmissing-braces
  25. -Wmissing-declarations
  26. -Wmissing-include-dirs
  27. -Wmissing-noreturn
  28. -Wmissing-prototypes
  29. -Wmissing-variable-declarations
  30. -Wmultichar
  31. -Wnarrowing
  32. -Wnested-externs
  33. -Wnull-dereference
  34. -Wold-style-definition
  35. -Woverlength-strings
  36. -Wredundant-decls
  37. -Wshadow
  38. -Wsign-conversion
  39. -Wstack-protector
  40. -Wstrict-overflow=2
  41. -Wstrict-prototypes
  42. -Wundef
  43. -Wunreachable-code
  44. -Wvla
  45. -Wwrite-strings
  46. -pedantic
  47. -pedantic-errors
  48. )
  49. if(0)
  50. set(WARNINGS ${WARNINGS}
  51. -Weverything
  52. -Wno-unsafe-buffer-usage
  53. -Wno-c++98-compat
  54. -Wno-declaration-after-statement
  55. -Wno-pre-c2x-compat
  56. -Wno-padded
  57. )
  58. endif()