clang_warnings.cmake 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. -Wswitch-enum
  43. -Wundef
  44. -Wunreachable-code
  45. -Wvla
  46. -Wwrite-strings
  47. -pedantic
  48. -pedantic-errors
  49. )
  50. if(0)
  51. set(WARNINGS ${WARNINGS}
  52. -Weverything
  53. -Wno-unsafe-buffer-usage
  54. -Wno-c++98-compat
  55. -Wno-declaration-after-statement
  56. -Wno-pre-c2x-compat
  57. -Wno-padded
  58. )
  59. endif()