From: Timo Heister Date: Mon, 6 Jul 2015 09:31:34 +0000 (-0400) Subject: fix pragma warnings warnings X-Git-Tag: v8.3.0-rc1~54^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1089%2Fhead;p=dealii.git fix pragma warnings warnings PR #1076 disabled warnings due to disabling unknown warnings with a pragma. This causes the warning src.cxx:4:3: error: unknown warning group '-Wpragmas', ignored [-Werror,-Wunknown-pragmas] _Pragma("GCC diagnostic ignored \"-Wpragmas\"") with Clang 3.4.0. It seems it supports Wunknown-pragmas which is okay to be used with gcc too. Sigh. --- diff --git a/cmake/checks/check_01_compiler_features.cmake b/cmake/checks/check_01_compiler_features.cmake index 893ae2e6b6..cdc60ca6c8 100644 --- a/cmake/checks/check_01_compiler_features.cmake +++ b/cmake/checks/check_01_compiler_features.cmake @@ -327,6 +327,7 @@ CHECK_CXX_SOURCE_COMPILES( " _Pragma(\"GCC diagnostic push\") _Pragma(\"GCC diagnostic ignored \\\\\\\"-Wextra\\\\\\\"\") + _Pragma(\"GCC diagnostic ignored \\\\\\\"-Wunknown-pragmas\\\\\\\"\") _Pragma(\"GCC diagnostic ignored \\\\\\\"-Wpragmas\\\\\\\"\") int main() { return 0; } _Pragma(\"GCC diagnostic pop\") diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index d3b7a96964..1100215fad 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -290,6 +290,7 @@ # define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS \ _Pragma("GCC diagnostic push") \ +_Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") \ _Pragma("GCC diagnostic ignored \"-Wpragmas\"") \ _Pragma("GCC diagnostic ignored \"-Wextra\"") \ _Pragma("GCC diagnostic ignored \"-Woverloaded-virtual\"") \