mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- prevented GME compilation warning spam with Clang
This commit is contained in:
parent
504a7f00b6
commit
b5853b4d8e
1 changed files with 9 additions and 5 deletions
|
@ -108,12 +108,16 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
|
|||
# potential uses; see https://bitbucket.org/mpyne/game-music-emu/issues/18/
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fwrapv")
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
if (NOT DEFINED LIBGME_SWITCH_FALLTHROUGH)
|
||||
check_cxx_compiler_flag (-Wimplicit-fallthrough __LIBGME_SWITCH_FALLTHROUGH_WARNINGS)
|
||||
set (LIBGME_SWITCH_FALLTHROUGH ${__LIBGME_SWITCH_FALLTHROUGH_WARNINGS}
|
||||
CACHE BOOL "Set if the compiler will complain about implicit switch fallthrough"
|
||||
)
|
||||
endif()
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-unused-const-variable")
|
||||
endif()
|
||||
|
||||
if (ENABLE_UBSAN)
|
||||
# GCC needs -static-libubsan
|
||||
|
|
Loading…
Reference in a new issue