1
0

Only enable -Werror in gcc because gcc doesn't let you suppress enum missmatch warnings

This commit is contained in:
Tycho 2014-03-09 10:46:39 -07:00
parent 713c59b60b
commit 617ad0b5f8

View File

@ -182,7 +182,7 @@ macro(set_exe_flags)
string(REPLACE "-w" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
string(REPLACE "-w" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
string(REPLACE "-w" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
add_flags_cxx("-Wall -Wextra -Werror -Wno-unused-parameter -Wno-error=switch -Wno-error=enum-compare")
add_flags_cxx("-Wall -Wextra -Wno-unused-parameter -Wno-error=switch")
# we support non-IEEE 754 fpus so can make no guarentees about error
add_flags_cxx("-ffast-math")
@ -190,7 +190,7 @@ macro(set_exe_flags)
# clang does not provide the __extern_always_inline macro and a part of libm depends on this when using fast-math
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_flags_cxx("-D__extern_always_inline=inline")
add_flags_cxx("-Weverything -Wno-c++98-compat-pedantic -Wno-string-conversion")
add_flags_cxx("-Werror -Weverything -Wno-c++98-compat-pedantic -Wno-string-conversion")
add_flags_cxx("-Wno-extra-semi -Wno-error=switch-enum -Wno-documentation")
add_flags_cxx("-Wno-error=sign-conversion -Wno-error=conversion -Wno-padded")
add_flags_cxx("-Wno-error=deprecated -Wno-error=weak-vtables -Wno-error=float-equal")