- prevented GME compilation warning spam with Clang

This commit is contained in:
alexey.lysiuk 2018-11-01 13:15:22 +02:00
parent 504a7f00b6
commit b5853b4d8e

View file

@ -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