mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Remove header generation, add define for warning suppression.
Thanks to @akva2 for original patch.
This commit is contained in:
@@ -15,17 +15,5 @@ endif ()
|
|||||||
|
|
||||||
option(SILENCE_EXTERNAL_WARNINGS "Disable some warnings from external packages (requires GCC 4.6 or newer)" OFF)
|
option(SILENCE_EXTERNAL_WARNINGS "Disable some warnings from external packages (requires GCC 4.6 or newer)" OFF)
|
||||||
if(SILENCE_EXTERNAL_WARNINGS AND CXX_COMPAT_GCC)
|
if(SILENCE_EXTERNAL_WARNINGS AND CXX_COMPAT_GCC)
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/disable_warning_pragmas.h "
|
add_definitions(-DSILENCE_EXTERNAL_WARNINGS)
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#pragma GCC diagnostic ignored \"-Wdeprecated-declarations\"
|
|
||||||
#pragma GCC diagnostic ignored \"-Wdeprecated-register\"
|
|
||||||
#pragma GCC diagnostic ignored \"-Wignored-qualifiers\"
|
|
||||||
#pragma GCC diagnostic ignored \"-Wmismatched-tags\"
|
|
||||||
#pragma GCC diagnostic ignored \"-Wshadow\"
|
|
||||||
#pragma GCC diagnostic ignored \"-Wsign-compare\"
|
|
||||||
#pragma GCC diagnostic ignored \"-Wunused-parameter\"")
|
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/reenable_warning_pragmas.h "#pragma GCC diagnostic pop")
|
|
||||||
else()
|
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/disable_warning_pragmas.h "")
|
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/reenable_warning_pragmas.h "")
|
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user