mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01:00
Add -Werror=implicit-fallthrough to CMakeLists.txt
This turns the implicit-fallthrough warning into a full compile-time error. Implicit fallthrough is when you forget a break statement in a case-switch, thus letting one case fall through into the next case and causing debugging headaches. This is different from the good type of fallthrough that you use to have one case with multiple different names, like so: case 0: case 1: case 2: In that case, it's obvious that you want to have fallthrough there.
This commit is contained in:
parent
8796f2c9e0
commit
57f027e478
1 changed files with 2 additions and 0 deletions
|
@ -150,6 +150,8 @@ ELSEIF(CUSTOM_LEVEL_SUPPORT STREQUAL "DISABLED")
|
||||||
ADD_DEFINITIONS(-DNO_CUSTOM_LEVELS -DNO_EDITOR)
|
ADD_DEFINITIONS(-DNO_CUSTOM_LEVELS -DNO_EDITOR)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
TARGET_COMPILE_OPTIONS(VVVVVV PRIVATE -Werror=implicit-fallthrough)
|
||||||
|
|
||||||
# Library information
|
# Library information
|
||||||
ADD_LIBRARY(tinyxml-static STATIC ${XML_SRC})
|
ADD_LIBRARY(tinyxml-static STATIC ${XML_SRC})
|
||||||
ADD_LIBRARY(physfs-static STATIC ${PFS_SRC} ${PFSP_SRC})
|
ADD_LIBRARY(physfs-static STATIC ${PFS_SRC} ${PFSP_SRC})
|
||||||
|
|
Loading…
Reference in a new issue