From 617ad0b5f8e8d469ec017a0e83754f7401f64d00 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 9 Mar 2014 10:46:39 -0700 Subject: Only enable -Werror in gcc because gcc doesn't let you suppress enum missmatch warnings --- SetFlags.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'SetFlags.cmake') diff --git a/SetFlags.cmake b/SetFlags.cmake index e71bf315d..a9657fff1 100644 --- a/SetFlags.cmake +++ b/SetFlags.cmake @@ -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") -- cgit v1.2.3