]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Silence some warnings in OpenCascade.
authorDavid Wells <wellsd2@rpi.edu>
Sat, 11 Feb 2017 12:26:11 +0000 (07:26 -0500)
committerDavid Wells <wellsd2@rpi.edu>
Sat, 11 Feb 2017 12:26:11 +0000 (07:26 -0500)
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
include/deal.II/opencascade/utilities.h
source/base/utilities.cc

index 32e0dda1186596f8b9481e2e4c6d731ae316a6f8..c548f1e24f9782074f64e189dc821e3918eca0f9 100644 (file)
@@ -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                       \
index 31f7cdea1808c74dd80e991f55d0f3451b19ad07..d56e6dfeb6f3b2e642cd8f0e594d44ba25b5d9ad 100644 (file)
@@ -27,6 +27,7 @@
 #include <string>
 
 // opencascade needs "HAVE_CONFIG_H" to be exported...
+DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
 #define HAVE_CONFIG_H
 #include <TopoDS_Shape.hxx>
 #include <TopoDS_Face.hxx>
@@ -40,6 +41,7 @@
 #include <IFSelect_ReturnStatus.hxx>
 #include <gp_Pnt.hxx>
 #undef HAVE_CONFIG_H
+DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
 
 
 
index c2b06a349880652b74ac5d454b2d39fe4577a2fd..b7f4a21af8b19bca4389769c4fb9647ff3622970 100644 (file)
@@ -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 <Epetra_MpiComm.h>
@@ -57,6 +58,7 @@ DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
 #  include "Teuchos_RCP.hpp"
 #  include "Epetra_SerialComm.h"
 #endif
+DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
 
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.