Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[cmake] clean the gcc version detection and handling
[simgrid.git] / tools / cmake / MakeLibWin.cmake
index 59f0557..2a2a69a 100644 (file)
@@ -1,5 +1,4 @@
 ### Make Libs
-#>gcc c:\simgrid-trunk\examples\msg\icomms\peer.c -static -Lc:\simgrid-trunk\lib -lsimgrid -Ic:\simgrid-trunk\include -lwsock32
 
 add_library(simgrid SHARED ${simgrid_sources})
 
@@ -7,10 +6,6 @@ if(MSVC)
   set_target_properties(simgrid  PROPERTIES 
        COMPILE_FLAGS "/D_XBT_DLL_EXPORT /DDLL_EXPORT" 
        VERSION ${libsimgrid_version} )
-#       PREFIX "lib" SUFFIX ".dll"
-#       IMPORT_PREFIX "lib"
-#       IMPORT_SUFFIX ".dll")
-#  ${CMAKE_COMMAND} -E make_directory ${CMAKE_HOME_DIRECTORY}/lib/Debug
 else()
   set_target_properties(simgrid  PROPERTIES 
        COMPILE_FLAGS "-D_XBT_DLL_EXPORT -DDLL_EXPORT" 
@@ -19,27 +14,12 @@ else()
        PREFIX "lib" SUFFIX ".dll" 
        IMPORT_PREFIX "lib" IMPORT_SUFFIX ".dll")
 
-  set(SIMGRID_DEP "-lws2_32 -lm")
+  set(SIMGRID_DEP "-lm")
 
   if (HAVE_PTHREAD)
     set(SIMGRID_DEP "${SIMGRID_DEP} -lpthread")
   endif()
-
-  if(ARCH_32_BITS)
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32 -march=i486 -D_I_X86_")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32 -march=i486 -D_I_X86_")
-  else()
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64 -D_AMD64_")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -D_AMD64_")
-    #        message(FATAL_ERROR "Sorry, Simgrid fails with full 64bits for now! Please contact us.")
-  endif()
 endif()
 
 target_link_libraries(simgrid  ${SIMGRID_DEP})
 
-find_path(PEXPORTS_PATH NAMES pexports.exe PATHS NO_DEFAULT_PATHS)
-message(STATUS "pexports: ${PEXPORTS_PATH}")
-if(PEXPORTS_PATH)
-  add_custom_command(TARGET simgrid POST_BUILD
-    COMMAND ${PEXPORTS_PATH}/pexports.exe ${CMAKE_BINARY_DIR}/lib/libsimgrid.dll > ${CMAKE_BINARY_DIR}/lib/libsimgrid.def)
-endif()