From: Vsevolod Stakhov Date: Fri, 7 Apr 2017 12:07:34 +0000 (+0100) Subject: [Minor] Disable noisy warning in gcc7 X-Git-Tag: 1.5.5~26 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=486bf47d71e06debcdc0c7de5c5f0c4854c64fbd;p=rspamd.git [Minor] Disable noisy warning in gcc7 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b7790b693..831c8293b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -762,6 +762,8 @@ CHECK_C_COMPILER_FLAG(-Wno-unused-const-variable SUPPORT_WNO_UNUSED_CONST) # GCC 6 specific CHECK_C_COMPILER_FLAG(-Wnull-dereference SUPPORT_WNULL_DEREFERENCE) CHECK_C_COMPILER_FLAG(-Wduplicated-cond SUPPORT_WDUPLICATED_COND) +# GCC 7 specific +CHECK_C_COMPILER_FLAG(-Wimplicit-fallthrough SUPPORT_WIMPLICIT_FALLTHROUGH) IF(NOT "${CMAKE_C_COMPILER_ID}" MATCHES SunPro) CHECK_C_COMPILER_FLAG("-std=c11" SUPPORT_STD11_FLAG) @@ -816,6 +818,9 @@ ELSE(SUPPORT_STD11_FLAG) SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -std=c99") ENDIF(SUPPORT_STD99_FLAG) ENDIF(SUPPORT_STD11_FLAG) +IF(SUPPORT_WIMPLICIT_FALLTHROUGH) + SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -Wno-implicit-fallthrough") +ENDIF(SUPPORT_WIMPLICIT_FALLTHROUGH) CHECK_C_COMPILER_FLAG(-fPIC SUPPORT_FPIC) IF(SUPPORT_FPIC)