gcc: suppress gcc warnings in smesh code

This commit is contained in:
wmayer
2020-05-26 12:01:40 +02:00
parent 0dc2fe0806
commit f01cc80fc4
6 changed files with 38 additions and 0 deletions

View File

@@ -20,6 +20,24 @@ if(CMAKE_COMPILER_IS_CLANGXX)
set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wno-deprecated-copy")
endif ()
unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-missing-field-initializers" _flag_found)
if (_flag_found)
set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers")
endif ()
elseif(CMAKE_COMPILER_IS_GNUCXX)
unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-unused-result" _flag_found)
if (_flag_found)
set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wno-unused-result")
endif ()
unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-maybe-uninitialized" _flag_found)
if (_flag_found)
set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized")
endif ()
unset(_flag_found CACHE)
check_cxx_compiler_flag("-Wno-missing-field-initializers" _flag_found)
if (_flag_found)

View File

@@ -87,6 +87,10 @@ namespace nglib {
#undef NETGEN_PYTHON
#endif
#ifndef WIN32
#undef DLL_HEADER
#endif
#include <occgeom.hpp>
#include <meshing.hpp>
//#include <ngexception.hpp>

View File

@@ -55,6 +55,10 @@ namespace nglib {
#undef NETGEN_PYTHON
#endif
#ifndef WIN32
#undef DLL_HEADER
#endif
#include <meshing.hpp>
#if defined(__clang__)

View File

@@ -54,6 +54,10 @@ namespace nglib {
#undef NETGEN_PYTHON
#endif
#ifndef WIN32
#undef DLL_HEADER
#endif
#include <meshing.hpp>
#if defined(__clang__)

View File

@@ -72,6 +72,10 @@ namespace nglib {
#undef NETGEN_PYTHON
#endif
#ifndef WIN32
#undef DLL_HEADER
#endif
#include <occgeom.hpp>
#include <meshing.hpp>
//#include <meshing/meshtype.hpp>

View File

@@ -81,6 +81,10 @@
#undef NETGEN_PYTHON
#endif
#ifndef WIN32
#undef DLL_HEADER
#endif
#include <occgeom.hpp>
#if defined(__clang__)