From 92b5df93e3d02736a7bc4982c2ba897a066f8d44 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 10 Jan 2012 18:05:36 +0100 Subject: [PATCH] Make Simgrid compile with MinGW and gcc4.6 Need new flags. For now on gcc 64bits it fails so we must use gcc 32bits on 64platforms. --- buildtools/Cmake/MakeLibWin.cmake | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/buildtools/Cmake/MakeLibWin.cmake b/buildtools/Cmake/MakeLibWin.cmake index 7632e9d444..8e3f46308c 100644 --- a/buildtools/Cmake/MakeLibWin.cmake +++ b/buildtools/Cmake/MakeLibWin.cmake @@ -3,15 +3,18 @@ add_library(simgrid STATIC ${simgrid_sources}) add_library(gras STATIC ${gras_sources}) -if(CMAKE_COMPILER_IS_GNUCC) - set_target_properties(gras PROPERTIES COMPILE_FLAGS "-D_XBT_DLL_STATIC" +set_target_properties(gras PROPERTIES COMPILE_FLAGS "-D_XBT_DLL_STATIC" OUTPUT_NAME "gras") - set_target_properties(simgrid PROPERTIES COMPILE_FLAGS "-D_XBT_DLL_STATIC" - OUTPUT_NAME "simgrid") -endif(CMAKE_COMPILER_IS_GNUCC) +set_target_properties(simgrid PROPERTIES COMPILE_FLAGS "-D_XBT_DLL_STATIC" OUTPUT_NAME "simgrid") set(GRAS_DEP "ws2_32 -lpthread") set(SIMGRID_DEP "ws2_32 -lpcre -lpthread") +if(ARCH_32_BITS) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32 -march=i486") +else(ARCH_32_BITS) + message(FATAL_ERROR "Sorry, Simgrid fails with full 64bits for now! Please contact us.") +endif(ARCH_32_BITS) + target_link_libraries(simgrid ${SIMGRID_DEP}) -target_link_libraries(gras ${GRAS_DEP}) +target_link_libraries(gras ${GRAS_DEP}) \ No newline at end of file -- 2.20.1