add option to quell dune(-istl) warnings
This commit is contained in:
1 parent
a18a6c4148
commit
50b2c9e56a
2 files changed
+18
No files matched your search
@@ -12,3 +12,17 @@ if (CXX_COMPAT_GCC)
|
||||
add_options (ALL_LANGUAGES ALL_BUILDS "${_warn_flag}")
|
||||
endif (_warn_flag)
|
||||
endif ()
|
||||
|
||||
option(SILENCE_DUNE_WARNINGS "Disable warnings from DUNE?" OFF)
|
||||
if(SILENCE_DUNE_WARNINGS AND CXX_COMPAT_GCC)
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/dune_disable_pragmas.h "
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored \"-Wshadow\"
|
||||
#pragma GCC diagnostic ignored \"-Wunused-parameter\"
|
||||
#pragma GCC diagnostic ignored \"-Wignored-qualifiers\"
|
||||
#pragma GCC diagnostic ignored \"-Wmismatched-tags\"")
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/dune_reenable_pragmas.h "#pragma GCC diagnostic pop")
|
||||
else()
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/dune_disable_pragmas.h "")
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/dune_reenable_pragmas.h "")
|
||||
endif()
|
||||
@@ -28,6 +28,8 @@
|
||||
// the deprecated member anyway (in this compilation unit)
|
||||
#define DUNE_COMMON_FIELDVECTOR_SIZE_IS_METHOD 1
|
||||
|
||||
#include "dune_disable_pragmas.h"
|
||||
|
||||
// TODO: clean up includes.
|
||||
#include <dune/common/deprecated.hh>
|
||||
#include <dune/istl/bvector.hh>
|
||||
@@ -39,6 +41,8 @@
|
||||
#include <dune/istl/paamg/amg.hh>
|
||||
#include <dune/istl/paamg/kamg.hh>
|
||||
|
||||
#include "dune_reenable_pragmas.h"
|
||||
|
||||
#include <stdexcept>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
Reference in new issue
Block a user