From: Augustin Degomme Date: Mon, 28 Jul 2014 17:02:23 +0000 (+0200) Subject: Some old compilers seem to emit bogus warnings on ci X-Git-Tag: v3_12~881 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4a7fc7630e541959768d7a1a565909510136811e Some old compilers seem to emit bogus warnings on ci See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45978 . Avoid failing the build in this case --- diff --git a/buildtools/Cmake/Flags.cmake b/buildtools/Cmake/Flags.cmake index 0b368692dc..3c6c4ad4cd 100644 --- a/buildtools/Cmake/Flags.cmake +++ b/buildtools/Cmake/Flags.cmake @@ -17,6 +17,10 @@ if(enable_compile_warnings) if(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.5") set(warnCFLAGS "${warnCFLAGS}-Wno-error=unused-but-set-variable ") endif() + if(COMPILER_C_VERSION_MAJOR_MINOR STREQUAL "4.6") + #some old compilers emit bogus warnings here, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45978 . Avoid failing the build in this case + set(warnCFLAGS "${warnCFLAGS}-Wno-error=array-bounds") + endif() endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wunused -Wpointer-arith -Wchar-subscripts -Wcomment -Wno-unknown-warning-option -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wclobbered -Wno-error=clobbered -Wno-format-nonliteral -Werror")