Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
activate this flag only for gcc, as it now generates a warning for clang > 3.4
authorAugustin Degomme <augustin.degomme@imag.fr>
Mon, 29 Sep 2014 08:17:08 +0000 (10:17 +0200)
committerAugustin Degomme <augustin.degomme@imag.fr>
Mon, 29 Sep 2014 09:24:03 +0000 (11:24 +0200)
The flag is not used by clang, which used to just ignore it.

buildtools/Cmake/Flags.cmake

index b5ea03d..16aa5b7 100644 (file)
@@ -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