From: Augustin Degomme Date: Mon, 29 Sep 2014 08:17:08 +0000 (+0200) Subject: activate this flag only for gcc, as it now generates a warning for clang > 3.4 X-Git-Tag: v3_12~788^2~7 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/33000bf1ab61a3274200762ffb6f96098e0d5bd3 activate this flag only for gcc, as it now generates a warning for clang > 3.4 The flag is not used by clang, which used to just ignore it. --- diff --git a/buildtools/Cmake/Flags.cmake b/buildtools/Cmake/Flags.cmake index b5ea03d277..16aa5b7a42 100644 --- a/buildtools/Cmake/Flags.cmake +++ b/buildtools/Cmake/Flags.cmake @@ -31,8 +31,9 @@ if(enable_compile_warnings) endif() if(enable_compile_optimizations) - set(optCFLAGS "-O3 -finline-functions -funroll-loops -fno-strict-aliasing ") + set(optCFLAGS "-O3 -funroll-loops -fno-strict-aliasing ") if(CMAKE_COMPILER_IS_GNUCC AND (NOT enable_model-checking)) + set(optCFLAGS "${optCFLAGS} -finline-functions ") if(WIN32) if (COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.7") # On windows, we need 4.8 or higher to enable lto because of http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50293