From fdeff40225d40163bd4b10d82879d786597316bb Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Mon, 6 Jul 2015 05:31:34 -0400 Subject: [PATCH] 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. --- cmake/checks/check_01_compiler_features.cmake | 1 + include/deal.II/base/config.h.in | 1 + 2 files changed, 2 insertions(+) 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\"") \ -- 2.39.5