From: degomme Date: Tue, 21 Jun 2016 14:11:41 +0000 (+0200) Subject: Disable extended warnings when debug is set to false. X-Git-Tag: v3_14~899 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b34a0fc8695b7a1556c9b933400bbe6efb068020?hp=9df50f62d16906ea5863e6de9516958bbcc3791a;ds=sidebyside Disable extended warnings when debug is set to false. This mode is for performance only, and removes xbt_assert and XBT_DEBUG, causing a lot of unused warnings. Let them be, as they are not really annoying. --- diff --git a/tools/cmake/GCCFlags.cmake b/tools/cmake/GCCFlags.cmake index 22ef81faee..f71ff39fe0 100644 --- a/tools/cmake/GCCFlags.cmake +++ b/tools/cmake/GCCFlags.cmake @@ -13,7 +13,7 @@ set(warnCFLAGS "") set(optCFLAGS "") set(warnCXXFLAGS "") -if(enable_compile_warnings) +if(enable_compile_warnings AND enable_debug) set(warnCFLAGS "-fno-common -Wall -Wunused -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror") if(CMAKE_COMPILER_IS_GNUCC) set(warnCFLAGS "${warnCFLAGS} -Wclobbered -Wno-error=clobbered -Wno-unused-local-typedefs -Wno-error=attributes")