CMakeLists.txt 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. -fdiagnostics-color=always
  11. -Wall
  12. -Walloc-zero
  13. -Walloca
  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. -Wfloat-equal
  34. -Wformat-overflow=2
  35. -Wformat-signedness
  36. -Wformat-truncation=2
  37. -Wformat=2
  38. -Wframe-larger-than=8388608
  39. -Wimplicit-fallthrough=5
  40. -Winfinite-recursion
  41. -Winit-self
  42. -Winvalid-pch
  43. -Wjump-misses-init
  44. -Wlarger-than=1073741824
  45. -Wlogical-op
  46. -Wmissing-braces
  47. -Wmissing-declarations
  48. -Wmissing-include-dirs
  49. -Wmissing-prototypes
  50. -Wmultichar
  51. -Wnarrowing
  52. -Wnested-externs
  53. -Wnormalized=nfkc
  54. -Wnull-dereference
  55. -Wold-style-definition
  56. -Woverlength-strings
  57. -Wredundant-decls
  58. -Wshadow
  59. -Wshift-overflow=2
  60. -Wsign-conversion
  61. -Wstack-protector
  62. -Wstack-usage=8388608
  63. -Wstrict-overflow=2
  64. -Wstrict-prototypes
  65. -Wstringop-overflow=4
  66. -Wswitch-enum
  67. -Wtrampolines
  68. -Wtrivial-auto-var-init
  69. -Wundef
  70. -Wunreachable-code
  71. -Wunused-const-variable=2
  72. -Wuse-after-free=3
  73. -Wvla
  74. -Wwrite-strings
  75. -pedantic
  76. -pedantic-errors
  77. )