diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-05-17 21:50:50 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-05-17 21:50:50 +0200 |
commit | 31886faef6db069adcb8aa1aa0b32a6f6040acd7 (patch) | |
tree | 7eef897cf1724d6d9b2faef5b5e66acaf6a28571 /cmake/maintainer.cmake | |
parent | b1485a4780808cd95cbc37c1f59024b39d542584 (diff) | |
download | mariadb-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.cmake | 9 |
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) |