fix(cmake): Suppress -Wnoexcept-type warning on GCC

There is no way to avoid this error in the code itself, so we must
suppress this warning if we wish to keep -Werror.
This commit is contained in:
Chase Geigle 2017-08-29 23:33:21 -05:00 committed by Michael Carlberg
parent ce05aa36a1
commit 299f1617d3
1 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,11 @@ string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
# there's no way to modify the code to avoid this warning, so we must
# suppress it if we use -Werror
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-noexcept-type")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic-errors")