From a0f2900af26e20ed101731457f0bc76d5730e2ff Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 11 Feb 2017 07:26:11 -0500 Subject: [PATCH] Silence some warnings in OpenCascade. Clang complains that OpenCascade checks whether or not a certain undefined macro evaluates to true. Get around this with diagnostic guards. --- include/deal.II/base/config.h.in | 1 + include/deal.II/opencascade/utilities.h | 2 ++ source/base/utilities.cc | 2 ++ 3 files changed, 5 insertions(+) diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index 32e0dda118..c548f1e24f 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -313,6 +313,7 @@ _Pragma("GCC diagnostic ignored \"-Wunused-but-set-variable\"") \ _Pragma("GCC diagnostic ignored \"-Wexpansion-to-defined\"") \ _Pragma("GCC diagnostic ignored \"-Wignored-attributes\"") \ _Pragma("GCC diagnostic ignored \"-Wmisleading-indentation\"") \ +_Pragma("GCC diagnostic ignored \"-Wundef\"") \ _Pragma("GCC diagnostic warning \"-Wpragmas\"") # define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS \ diff --git a/include/deal.II/opencascade/utilities.h b/include/deal.II/opencascade/utilities.h index 31f7cdea18..d56e6dfeb6 100644 --- a/include/deal.II/opencascade/utilities.h +++ b/include/deal.II/opencascade/utilities.h @@ -27,6 +27,7 @@ #include // opencascade needs "HAVE_CONFIG_H" to be exported... +DEAL_II_DISABLE_EXTRA_DIAGNOSTICS #define HAVE_CONFIG_H #include #include @@ -40,6 +41,7 @@ #include #include #undef HAVE_CONFIG_H +DEAL_II_ENABLE_EXTRA_DIAGNOSTICS diff --git a/source/base/utilities.cc b/source/base/utilities.cc index c2b06a3498..b7f4a21af8 100644 --- a/source/base/utilities.cc +++ b/source/base/utilities.cc @@ -47,6 +47,7 @@ DEAL_II_ENABLE_EXTRA_DIAGNOSTICS #endif +DEAL_II_DISABLE_EXTRA_DIAGNOSTICS #ifdef DEAL_II_WITH_TRILINOS # ifdef DEAL_II_WITH_MPI # include @@ -57,6 +58,7 @@ DEAL_II_ENABLE_EXTRA_DIAGNOSTICS # include "Teuchos_RCP.hpp" # include "Epetra_SerialComm.h" #endif +DEAL_II_ENABLE_EXTRA_DIAGNOSTICS -- 2.39.5