]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Disable noisy warning in gcc7
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 7 Apr 2017 12:07:34 +0000 (13:07 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 7 Apr 2017 12:07:34 +0000 (13:07 +0100)
CMakeLists.txt

index b7790b693519f784c22a2f72554a0dcb6fc02d8f..831c8293b8ac296aec4ef1424b5ff0f2c80a9c38 100644 (file)
@@ -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)