aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/CompilerWarnings.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/CompilerWarnings.cmake')
-rw-r--r--cmake/CompilerWarnings.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/CompilerWarnings.cmake b/cmake/CompilerWarnings.cmake
index 2dcad92ef..fe6735c35 100644
--- a/cmake/CompilerWarnings.cmake
+++ b/cmake/CompilerWarnings.cmake
@@ -11,6 +11,7 @@ CHECK_C_COMPILER_FLAG(-Wstrict-prototypes SUPPORT_WSTRICT_PROTOTYPES)
CHECK_C_COMPILER_FLAG(-pedantic SUPPORT_PEDANTIC_FLAG)
CHECK_C_COMPILER_FLAG(-Wno-unused-const-variable SUPPORT_WNO_UNUSED_CONST)
CHECK_C_COMPILER_FLAG(-Wmissing-noreturn SUPPORT_WMISSING_NORETURN)
+CHECK_C_COMPILER_FLAG(-Wmissing-format-attribute SUPPORT_WMISSING_FORMAT_ATTRIBUTE)
# GCC 6 specific
CHECK_C_COMPILER_FLAG(-Wnull-dereference SUPPORT_WNULL_DEREFERENCE)
CHECK_C_COMPILER_FLAG(-Wduplicated-cond SUPPORT_WDUPLICATED_COND)
@@ -71,6 +72,9 @@ ENDIF(SUPPORT_WIMPLICIT_FALLTHROUGH)
IF(SUPPORT_WMISSING_NORETURN)
ADD_COMPILE_OPTIONS("-Wmissing-noreturn")
ENDIF(SUPPORT_WMISSING_NORETURN)
+IF(SUPPORT_WMISSING_FORMAT_ATTRIBUTE)
+ ADD_COMPILE_OPTIONS("-Wmissing-format-attribute")
+ENDIF(SUPPORT_WMISSING_FORMAT_ATTRIBUTE)
CHECK_C_COMPILER_FLAG(-fPIC SUPPORT_FPIC)
IF(SUPPORT_FPIC)