CMakeLists.txt 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. cmake_minimum_required(VERSION 3.25)
  2. project(tetris C)
  3. set(CMAKE_C_STANDARD 23)
  4. set(SRC
  5. "Main.c"
  6. )
  7. add_executable(${PROJECT_NAME} ${SRC})
  8. target_link_libraries(${PROJECT_NAME} PRIVATE ncursesw)
  9. target_compile_options(${PROJECT_NAME} PRIVATE
  10. -Wall
  11. -Walloc-zero
  12. -Walloca
  13. -Wanalyzer-symbol-too-complex
  14. -Wanalyzer-too-complex
  15. -Warith-conversion
  16. -Warray-bounds=2
  17. -Warray-parameter
  18. -Wattribute-alias=2
  19. -Wbad-function-cast
  20. -Wbidi-chars=any
  21. -Wcast-align=strict
  22. -Wcast-qual
  23. -Wconversion
  24. -Wdate-time
  25. -Wdisabled-optimization
  26. -Wdouble-promotion
  27. -Wduplicated-branches
  28. -Wduplicated-cond
  29. -Wenum-compare
  30. -Wenum-conversion
  31. -Werror
  32. -Wextra
  33. -Wflex-array-member-not-at-end
  34. -Wfloat-equal
  35. -Wformat-overflow=2
  36. -Wformat-signedness
  37. -Wformat-truncation=2
  38. -Wformat=2
  39. -Wframe-larger-than=8388608
  40. -Wimplicit-fallthrough=5
  41. -Winfinite-recursion
  42. -Winit-self
  43. -Winvalid-pch
  44. -Winvalid-utf8
  45. -Wjump-misses-init
  46. -Wlarger-than=1073741824
  47. -Wlogical-op
  48. -Wmissing-braces
  49. -Wmissing-declarations
  50. -Wmissing-include-dirs
  51. -Wmissing-prototypes
  52. -Wmissing-variable-declarations
  53. -Wmultichar
  54. -Wnarrowing
  55. -Wnested-externs
  56. -Wnormalized=nfkc
  57. -Wnull-dereference
  58. -Wold-style-definition
  59. -Woverlength-strings
  60. -Wredundant-decls
  61. -Wshadow
  62. -Wshift-overflow=2
  63. -Wsign-conversion
  64. -Wstack-protector
  65. -Wstack-usage=8388608
  66. -Wstrict-flex-arrays
  67. -Wstrict-overflow=2
  68. -Wstrict-prototypes
  69. -Wstringop-overflow=4
  70. -Wswitch-enum
  71. -Wtrampolines
  72. -Wtrivial-auto-var-init
  73. -Wundef
  74. -Wunreachable-code
  75. -Wunused-const-variable=2
  76. -Wuse-after-free=3
  77. -Wvla
  78. -Wwrite-strings
  79. -fdiagnostics-color=always
  80. -fstrict-flex-arrays=3
  81. -pedantic
  82. -pedantic-errors
  83. )