X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/716316f298a4ca2fbbfaa38e138d9f03cd31d061..7415b33104fb8d0ff748b4f43a3a7d0ac98c2893:/buildtools/Cmake/Flags.cmake diff --git a/buildtools/Cmake/Flags.cmake b/buildtools/Cmake/Flags.cmake index f42cc80752..a11db3dbf2 100644 --- a/buildtools/Cmake/Flags.cmake +++ b/buildtools/Cmake/Flags.cmake @@ -26,8 +26,7 @@ if(enable_compile_warnings) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-mismatched-tags") endif() - set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wall") # FIXME: Q&D hack - + set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wall") set(CMAKE_JAVA_COMPILE_FLAGS "-Xlint") endif() @@ -36,9 +35,12 @@ if(enable_compile_optimizations) 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") + if (COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.8") # On windows, we need 4.8 or higher to enable lto because of http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50293 - set(optCFLAGS "${optCFLAGS} -flto ") + # + # We are experiencing assertion failures even with 4.8 on MinGW. + # Push the support forward: will see if 4.9 works when we test it. + set(optCFLAGS "${optCFLAGS} -flto ") endif() else() # On non-windows, 4.6 is enough for that @@ -85,11 +87,6 @@ if(enable_model-checking AND enable_compile_optimizations) endforeach() endif() -if(APPLE AND COMPILER_C_VERSION_MAJOR_MINOR MATCHES "4.6") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations") - set(optCFLAGS "-O0 ") -endif() - if(NOT enable_debug) set(CMAKE_C_FLAGS "-DNDEBUG ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "-DNDEBUG ${CMAKE_CXX_FLAGS}")