suppress -Wmacro-redefined warnings caused by netgen headers

This commit is contained in:
wmayer
2019-09-08 18:00:52 +02:00
parent 6d9d94f118
commit 5e9891dcb7
5 changed files with 56 additions and 0 deletions

View File

@@ -77,9 +77,20 @@ namespace nglib {
#define OCCGEOMETRY
#endif
// DLL_HEADER is re-defined in netgen headers
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wmacro-redefined"
#endif
#include <occgeom.hpp>
#include <meshing.hpp>
//#include <ngexception.hpp>
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
namespace netgen {
#if NETGEN_VERSION >= NETGEN_VERSION_STRING(6,2)
DLL_HEADER extern int OCCGenerateMesh (OCCGeometry&, shared_ptr<Mesh>&, MeshingParameters&);

View File

@@ -44,8 +44,19 @@
namespace nglib {
#include <nglib.h>
}
// DLL_HEADER is re-defined in netgen headers
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wmacro-redefined"
#endif
#include <meshing.hpp>
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
using namespace std;
//=============================================================================

View File

@@ -43,8 +43,19 @@
namespace nglib {
#include <nglib.h>
}
// DLL_HEADER is re-defined in netgen headers
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wmacro-redefined"
#endif
#include <meshing.hpp>
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
using namespace std;
//=============================================================================

View File

@@ -62,9 +62,20 @@ namespace nglib {
# define OCCGEOMETRY
#endif
// DLL_HEADER is re-defined in netgen headers
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wmacro-redefined"
#endif
#include <occgeom.hpp>
#include <meshing.hpp>
//#include <meshing/meshtype.hpp>
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
namespace netgen {
#if NETGEN_VERSION >= NETGEN_VERSION_STRING(6,2)
DLL_HEADER extern int OCCGenerateMesh (OCCGeometry&, shared_ptr<Mesh>&, MeshingParameters&);

View File

@@ -70,7 +70,19 @@
#ifndef OCCGEOMETRY
#define OCCGEOMETRY
#endif
// DLL_HEADER is re-defined in netgen headers
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wmacro-redefined"
#endif
#include <occgeom.hpp>
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
namespace nglib {
#include <nglib.h>
}