summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-07 13:07:34 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-07 13:07:34 +0100
commit486bf47d71e06debcdc0c7de5c5f0c4854c64fbd (patch)
tree87124660a8cd2a57f77d83676e05f221f2dd501c /CMakeLists.txt
parenteb29d37be71039bffaaf3b443c6756d2d69d8715 (diff)
downloadrspamd-486bf47d71e06debcdc0c7de5c5f0c4854c64fbd.tar.gz
rspamd-486bf47d71e06debcdc0c7de5c5f0c4854c64fbd.zip
[Minor] Disable noisy warning in gcc7
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
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)