mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03: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:
@@ -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})
|
||||||
|
|||||||
Reference in New Issue
Block a user