From: Christian Heinrich Date: Tue, 28 Apr 2015 08:01:08 +0000 (+0200) Subject: Replaced check for GNU compiler with CMAKE variable. ... X-Git-Tag: v3_12~732^2~38 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/fb63e0dbde2bbf7fa0d2a42266a9fb3a627e7e35 Replaced check for GNU compiler with CMAKE variable. -- INSERT -- 9:59:23 - The CMAKE_COMPILER_IS_GNUCC variable can be used for that. See the docs: http://www.cmake.org/Wiki/CMake_Useful_Variables#Compilers_and_Tools --- diff --git a/buildtools/Cmake/Flags.cmake b/buildtools/Cmake/Flags.cmake index ec05853d50..db93f1be94 100644 --- a/buildtools/Cmake/Flags.cmake +++ b/buildtools/Cmake/Flags.cmake @@ -26,7 +26,7 @@ endif() if(enable_compile_warnings) set(warnCFLAGS "-fno-common -Wall -Wunused -Wmissing-prototypes -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_C_COMPILER_ID STREQUAL "GNU") + if(CMAKE_COMPILER_IS_GNUCC) set(warnCFLAGS "${warnCFLAGS}-Wclobbered -Wno-error=clobbered ") if(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.5") set(warnCFLAGS "${warnCFLAGS}-Wno-error=unused-but-set-variable ")