Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
try to get the win build working despite gcc bugs
[simgrid.git] / buildtools / Cmake / Flags.cmake
index 2a2a96f..be0a919 100644 (file)
@@ -37,6 +37,12 @@ if(APPLE AND COMPILER_C_VERSION_MAJOR_MINOR MATCHES "4.6")
   set(optCFLAGS "-O0 ")
 endif()
 
+if(WIN32) # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50293
+  if (COMPILER_C_VERSION_MAJOR_MINOR MATCHES "4.7" OR 
+      COMPILER_C_VERSION_MAJOR_MINOR MATCHES "4.6")
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --disable-lto")
+endif()
+
 if(NOT enable_debug)
   set(CMAKE_C_FLAGS "-DNDEBUG ${CMAKE_C_FLAGS}")
 endif()