mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01:00
Check for GCC7 for implicit-fallthrough support
This commit is contained in:
parent
58e512d001
commit
ac7ee0e959
1 changed files with 14 additions and 1 deletions
|
@ -150,7 +150,20 @@ ELSEIF(CUSTOM_LEVEL_SUPPORT STREQUAL "DISABLED")
|
||||||
ADD_DEFINITIONS(-DNO_CUSTOM_LEVELS -DNO_EDITOR)
|
ADD_DEFINITIONS(-DNO_CUSTOM_LEVELS -DNO_EDITOR)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF (NOT MSVC)
|
IF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
SET(SUPPORTS_IMPLICIT_FALLTHROUGH 1)
|
||||||
|
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
|
IF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||||
|
SET(SUPPORTS_IMPLICIT_FALLTHROUGH 1)
|
||||||
|
ELSE()
|
||||||
|
SET(SUPPORTS_IMPLICIT_FALLTHROUGH 0)
|
||||||
|
ENDIF()
|
||||||
|
ELSE()
|
||||||
|
SET(SUPPORTS_IMPLICIT_FALLTHROUGH 0)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
|
IF(SUPPORTS_IMPLICIT_FALLTHROUGH)
|
||||||
TARGET_COMPILE_OPTIONS(VVVVVV PRIVATE -Werror=implicit-fallthrough)
|
TARGET_COMPILE_OPTIONS(VVVVVV PRIVATE -Werror=implicit-fallthrough)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue