summaryrefslogtreecommitdiff
path: root/cmake/maintainer.cmake
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2012-05-17 21:50:50 +0200
committerVladislav Vaintroub <wlad@montyprogram.com>2012-05-17 21:50:50 +0200
commit31886faef6db069adcb8aa1aa0b32a6f6040acd7 (patch)
tree7eef897cf1724d6d9b2faef5b5e66acaf6a28571 /cmake/maintainer.cmake
parentb1485a4780808cd95cbc37c1f59024b39d542584 (diff)
downloadmariadb-git-31886faef6db069adcb8aa1aa0b32a6f6040acd7.tar.gz
Add -Wno-missing-field-initializers to silence bogus warnings from GCC in maintainer mode.
Diffstat (limited to 'cmake/maintainer.cmake')
-rw-r--r--cmake/maintainer.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/maintainer.cmake b/cmake/maintainer.cmake
index cf9b1882715..9c9ab8cca3b 100644
--- a/cmake/maintainer.cmake
+++ b/cmake/maintainer.cmake
@@ -19,6 +19,15 @@ INCLUDE(CheckCCompilerFlag)
MACRO(SET_MYSQL_MAINTAINER_GNU_C_OPTIONS)
SET(MY_MAINTAINER_WARNINGS
"-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing")
+
+ CHECK_C_COMPILER_FLAG("-Wno-missing-field-initializers"
+ HAVE_NO_MISSING_FIELD_INITIALIZERS)
+
+ IF (HAVE_NO_MISSING_FIELD_INITIALIZERS)
+ SET(MY_MAINTAINER_WARNINGS
+ "${MY_MAINTAINER_WARNINGS} -Wno-missing-field-initializers")
+ ENDIF()
+
CHECK_C_COMPILER_FLAG("-Wdeclaration-after-statement"
HAVE_DECLARATION_AFTER_STATEMENT)
IF(HAVE_DECLARATION_AFTER_STATEMENT)