From: David Wells Date: Sat, 11 Feb 2017 12:26:11 +0000 (-0500) Subject: Silence some warnings in OpenCascade. X-Git-Tag: v8.5.0-rc1~121^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0f2900af26e20ed101731457f0bc76d5730e2ff;p=dealii.git 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. --- 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