mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-07-29 18:47:55 -05:00
add option to quell dune(-istl) warnings
This commit is contained in:
committed by
Bård Skaflestad
parent
81394512b4
commit
cd95b9da9d
@@ -12,3 +12,17 @@ if (CXX_COMPAT_GCC)
|
|||||||
add_options (ALL_LANGUAGES ALL_BUILDS "${_warn_flag}")
|
add_options (ALL_LANGUAGES ALL_BUILDS "${_warn_flag}")
|
||||||
endif (_warn_flag)
|
endif (_warn_flag)
|
||||||
endif ()
|
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()
|
||||||
|
|||||||
Reference in New Issue
Block a user