Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
More windows compatibility for context.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 4 Aug 2010 08:05:12 +0000 (08:05 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 4 Aug 2010 08:05:12 +0000 (08:05 +0000)
Add visual basic and Devcpp compilers.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8089 48e7efb5-ca39-0410-a469-dd3cf9ba447f

19 files changed:
CMakeLists.txt
Devcpp.bat [new file with mode: 0644]
borland.bat [new file with mode: 0644]
buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/Flags.cmake
buildtools/Cmake/MakeExeLibWin.cmake
buildtools/Cmake/Option.cmake
buildtools/Cmake/PrintArgs.cmake
buildtools/Cmake/gras_config.h.in
buildtools/Cmake/test_prog/prog_AC_CHECK_MCSC.c
buildtools/Cmake/test_prog/prog_stacksetup.c
include/simgrid_config.h.in
src/simix/smx_context_sysv.c
src/simix/smx_context_sysv_private.h
src/surf/random_mgr.c
src/xbt/setset.c
src/xbt/win32_ucontext.c
src/xbt/xbt_main.c
vb.bat [new file with mode: 0644]

index 19fb40d..a8ac91d 100644 (file)
@@ -49,23 +49,34 @@ if(WIN32)
     message("  -- CMAKE_BUILD_TOOL             ${CMAKE_BUILD_TOOL}")
     message("  -- LINKER                       ${CMAKE_LINKER}")
     message("  -- CMAKE_GENERATOR              ${CMAKE_GENERATOR}")
     message("  -- CMAKE_BUILD_TOOL             ${CMAKE_BUILD_TOOL}")
     message("  -- LINKER                       ${CMAKE_LINKER}")
     message("  -- CMAKE_GENERATOR              ${CMAKE_GENERATOR}")
-    message("  -- INCLUDES                     ${INCLUDES}\n\n")
-    set(__STRICT_ANSI__ 1)
-    set(_MSC_VER 1)
-    set(_XBT_WIN32 1)
+    message("  -- INCLUDES                     ${INCLUDES}")
+    message("  -- BORLAND                          ${BORLAND}")
+    message("  -- VISUALC                          ${MSVC}")
+    message("  -- GNUC                         ${CMAKE_COMPILER_IS_GNUCC}\n\n")
     if(BORLAND)                        ### BORLAND COMPILER
            set(__BORLANDC__ 1)
            set(_XBT_BORLANDC_COMPILER 1)
     endif(BORLAND)
     if(BORLAND)                        ### BORLAND COMPILER
            set(__BORLANDC__ 1)
            set(_XBT_BORLANDC_COMPILER 1)
     endif(BORLAND)
-    if(MSVC_VERSION)   ### MicroSoftVisualC COMPILER
+    
+    if(MSVC)   ### MicroSoftVisualC COMPILER
            set(__VISUALC__ 1)
            set(_XBT_VISUALC_COMPILER 1)
            set(__VISUALC__ 1)
            set(_XBT_VISUALC_COMPILER 1)
-    endif(MSVC_VERSION)  
+           set(_MSC_VER 1)
+        set(__STRICT_ANSI__ 1)
+        set(_M_IX86 1)
+    endif(MSVC)
+    
+    if(CMAKE_COMPILER_IS_GNUCC)
+        set(__GNUC__ 1)
+    endif(CMAKE_COMPILER_IS_GNUCC)
+    
     if(ARCH_32_BITS)   ### Arch 32bits
     if(ARCH_32_BITS)   ### Arch 32bits
-       set(_WIN32 1)
+        set(_WIN32 1)
     else(ARCH_32_BITS) ### Arch 64bits
     else(ARCH_32_BITS) ### Arch 64bits
-       set(_WIN64 1)
+        set(_WIN64 1)
     endif(ARCH_32_BITS)
     endif(ARCH_32_BITS)
+    
+    set(_XBT_WIN32 1)
 endif(WIN32)
 
 add_definitions (${INCLUDES})
 endif(WIN32)
 
 add_definitions (${INCLUDES})
@@ -87,9 +98,9 @@ include(${PROJECT_DIRECTORY}/buildtools/Cmake/Flags.cmake)
 
 ### Make Libs and Exes
 if(WIN32)
 
 ### Make Libs and Exes
 if(WIN32)
-include(${PROJECT_DIRECTORY}/buildtools/Cmake/MakeExeLibWin.cmake)
+    include(${PROJECT_DIRECTORY}/buildtools/Cmake/MakeExeLibWin.cmake)
 else(WIN32)
 else(WIN32)
-include(${PROJECT_DIRECTORY}/buildtools/Cmake/MakeExeLib.cmake)
+    include(${PROJECT_DIRECTORY}/buildtools/Cmake/MakeExeLib.cmake)
 endif(WIN32)
 
 ### Build the doc
 endif(WIN32)
 
 ### Build the doc
diff --git a/Devcpp.bat b/Devcpp.bat
new file mode 100644 (file)
index 0000000..5e83004
--- /dev/null
@@ -0,0 +1,15 @@
+echo off\r
+set CC=C:\Dev-Cpp\bin\gcc\r
+set CXX=C:\Dev-Cpp\bin\g++\r
+\r
+set INCLUDE=C:\Dev-Cpp\include;C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include\r
+set LIB=C:\Dev-Cpp\lib;C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib\r
+\r
+set RC=C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\RC\r
+\r
+set Path=%Path%;C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\r
+set Path=%Path%;C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib\r
+set Path=%Path%;C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include\r
+\r
+set Path=%Path%;C:\Borland\BCC55\r
+set Path=%Path%;C:\Dev-Cpp\bin
\ No newline at end of file
diff --git a/borland.bat b/borland.bat
new file mode 100644 (file)
index 0000000..4a032af
--- /dev/null
@@ -0,0 +1,11 @@
+echo off\r
+set CC=C:\Borland\BCC55\Bin\bcc32\r
+set CXX=C:\Borland\BCC55\Bin\bcc32\r
+set INCLUDE=C:\Borland\BCC55\Include;C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include\r
+set LIB=C:\Borland\BCC55\Lib;C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib\r
+set RC=C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\RC\r
+set Path=%Path%;C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\r
+set Path=%Path%;C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib\r
+set Path=%Path%;C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include\r
+set Path=%Path%;C:\Borland\BCC55\r
+set Path=%Path%;C:\Borland\BCC55\Bin
\ No newline at end of file
index 4d22b77..31e0860 100644 (file)
@@ -246,13 +246,23 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
        set(mcsc_flags "-D_XOPEN_SOURCE")
 endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
 
        set(mcsc_flags "-D_XOPEN_SOURCE")
 endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
 
+if(WIN32)
+    if(__VISUALC__)
+       set(mcsc_flags "/D_XBT_WIN32 /I${PROJECT_DIRECTORY}/include/xbt /I${PROJECT_DIRECTORY}/src/xbt")
+       endif(__VISUALC__)
+       if(__GNUC__)
+               set(mcsc_flags "-D_XBT_WIN32 -I${PROJECT_DIRECTORY}/include/xbt -I${PROJECT_DIRECTORY}/src/xbt")
+       endif(__GNUC__)
+endif(WIN32)
+
 try_run(RUN_mcsc_VAR COMPILE_mcsc_VAR
        ${PROJECT_DIRECTORY}
        ${PROJECT_DIRECTORY}/buildtools/Cmake/test_prog/prog_AC_CHECK_MCSC.c
        COMPILE_DEFINITIONS "${mcsc_flags}"
 try_run(RUN_mcsc_VAR COMPILE_mcsc_VAR
        ${PROJECT_DIRECTORY}
        ${PROJECT_DIRECTORY}/buildtools/Cmake/test_prog/prog_AC_CHECK_MCSC.c
        COMPILE_DEFINITIONS "${mcsc_flags}"
+       OUTPUT_VARIABLE var_compil
        )
        )
-       
-if(EXISTS "${simgrid_BINARY_DIR}/conftestval")
+
+if(EXISTS "${simgrid_BINARY_DIR}/conftestval" AND COMPILE_mcsc_VAR)
        file(READ "${simgrid_BINARY_DIR}/conftestval" mcsc)
        STRING(REPLACE "\n" "" mcsc "${mcsc}")
        if(mcsc)
        file(READ "${simgrid_BINARY_DIR}/conftestval" mcsc)
        STRING(REPLACE "\n" "" mcsc "${mcsc}")
        if(mcsc)
@@ -260,9 +270,9 @@ if(EXISTS "${simgrid_BINARY_DIR}/conftestval")
        elseif(mcsc)
                set(mcsc "no")
        endif(mcsc)
        elseif(mcsc)
                set(mcsc "no")
        endif(mcsc)
-else(EXISTS "${simgrid_BINARY_DIR}/conftestval")
+else(EXISTS "${simgrid_BINARY_DIR}/conftestval" AND COMPILE_mcsc_VAR)
        set(mcsc "no")
        set(mcsc "no")
-endif(EXISTS "${simgrid_BINARY_DIR}/conftestval")
+endif(EXISTS "${simgrid_BINARY_DIR}/conftestval" AND COMPILE_mcsc_VAR)
 
 if(mcsc MATCHES "no" AND pthread)
        if(HAVE_WINDOWS_H)
 
 if(mcsc MATCHES "no" AND pthread)
        if(HAVE_WINDOWS_H)
@@ -460,9 +470,16 @@ if(HAVE_MAKECONTEXT OR WIN32)
                set(makecontext_CPPFLAGS_2 "-DOSX")
        endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
        
                set(makecontext_CPPFLAGS_2 "-DOSX")
        endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
        
-       if(WIN32)
-           set(makecontext_CPPFLAGS_2 "-D_XBT_WIN32 ${INCLUDES}")
-       endif(WIN32)
+    if(WIN32)
+        if(__VISUALC__)
+            set(makecontext_CPPFLAGS "/DTEST_makecontext")
+           set(makecontext_CPPFLAGS_2 "/D_XBT_WIN32 /I${PROJECT_DIRECTORY}/include/xbt /I${PROJECT_DIRECTORY}/src/xbt")
+       endif(__VISUALC__)
+       if(__GNUC__)
+           set(makecontext_CPPFLAGS "-DTEST_makecontext")
+               set(makecontext_CPPFLAGS_2 "-D_XBT_WIN32 -I${PROJECT_DIRECTORY}/include/xbt -I${PROJECT_DIRECTORY}/src/xbt")
+       endif(__GNUC__)
+    endif(WIN32)
 
        try_run(RUN_makecontext_VAR COMPILE_makecontext_VAR
                ${PROJECT_DIRECTORY}
 
        try_run(RUN_makecontext_VAR COMPILE_makecontext_VAR
                ${PROJECT_DIRECTORY}
@@ -477,7 +494,6 @@ if(HAVE_MAKECONTEXT OR WIN32)
        string(REPLACE "," "" makecontext_size "${MAKECONTEXT_SIZE}")   
        set(pth_skaddr_makecontext "#define pth_skaddr_makecontext(skaddr,sksize) (${makecontext_addr})")
        set(pth_sksize_makecontext "#define pth_sksize_makecontext(skaddr,sksize) (${makecontext_size})")
        string(REPLACE "," "" makecontext_size "${MAKECONTEXT_SIZE}")   
        set(pth_skaddr_makecontext "#define pth_skaddr_makecontext(skaddr,sksize) (${makecontext_addr})")
        set(pth_sksize_makecontext "#define pth_sksize_makecontext(skaddr,sksize) (${makecontext_size})")
-
 endif(HAVE_MAKECONTEXT OR WIN32)
 
 #--------------------------------------------------------------------------------------------------
 endif(HAVE_MAKECONTEXT OR WIN32)
 
 #--------------------------------------------------------------------------------------------------
@@ -627,8 +643,10 @@ try_run(RUN_RESULT_VAR COMPILE_RESULT_VAR
 
 if(NOT COMPILE_RESULT_VAR)
 SET(need_getline "#define SIMGRID_NEED_GETLINE 1")
 
 if(NOT COMPILE_RESULT_VAR)
 SET(need_getline "#define SIMGRID_NEED_GETLINE 1")
+SET(SIMGRID_NEED_GETLINE 1)
 else(NOT COMPILE_RESULT_VAR)
 SET(need_getline "")
 else(NOT COMPILE_RESULT_VAR)
 SET(need_getline "")
+SET(SIMGRID_NEED_GETLINE 0)
 endif(NOT COMPILE_RESULT_VAR)
 
 ### check for a working snprintf
 endif(NOT COMPILE_RESULT_VAR)
 
 ### check for a working snprintf
@@ -660,15 +678,19 @@ endif(HAVE_SNPRINTF AND HAVE_VSNPRINTF)
 
 ### check for asprintf function familly
 if(HAVE_ASPRINTF)
 
 ### check for asprintf function familly
 if(HAVE_ASPRINTF)
-       SET(need_asprintf "")
+       SET(simgrid_need_asprintf "")
+       SET(NEED_ASPRINTF 0)
 else(HAVE_ASPRINTF)
 else(HAVE_ASPRINTF)
-       SET(need_asprintf "#define SIMGRID_NEED_ASPRINTF 1")
+       SET(simgrid_need_asprintf "#define SIMGRID_NEED_ASPRINTF 1")
+       SET(NEED_ASPRINTF 1)
 endif(HAVE_ASPRINTF)
 
 if(HAVE_VASPRINTF)
 endif(HAVE_ASPRINTF)
 
 if(HAVE_VASPRINTF)
-       SET(need_vasprintf "")
+       SET(simgrid_need_vasprintf "")
+       SET(NEED_VASPRINTF 0)
 else(HAVE_VASPRINTF)
 else(HAVE_VASPRINTF)
-       SET(need_vasprintf "#define SIMGRID_NEED_VASPRINTF 1")
+       SET(simgrid_need_vasprintf "#define SIMGRID_NEED_VASPRINTF 1")
+       SET(NEED_VASPRINTF 1)
 endif(HAVE_VASPRINTF)
 
 ### check for addr2line
 endif(HAVE_VASPRINTF)
 
 ### check for addr2line
index a5a863b..7c9ee10 100644 (file)
@@ -1,9 +1,15 @@
 set(warnCFLAGS "")
 set(optCFLAGS "")
 
 set(warnCFLAGS "")
 set(optCFLAGS "")
 
-if(NOT WIN32)
-       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-g3 ${custom_flags}")
-endif(NOT WIN32)
+if(NOT __VISUALC__ AND NOT __BORLANDC__)
+       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-g3")
+else(NOT __VISUALC__ AND NOT __BORLANDC__)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}/Zi")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}/Zi")
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}/DEBUG")
+endif(NOT __VISUALC__ AND NOT __BORLANDC__)
+
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${custom_flags}")
 
 if(enable_supernovae)
        set(warnCFLAGS "-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror ")
 
 if(enable_supernovae)
        set(warnCFLAGS "-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wcomment -Wformat -Wwrite-strings -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing -Wno-format-nonliteral -Werror ")
index 04a74f8..56e8e53 100644 (file)
@@ -8,12 +8,26 @@ add_library(gras_static STATIC ${gras_sources})
 set_target_properties(simgrid PROPERTIES VERSION ${libsimgrid_version})\r
 set_target_properties(gras PROPERTIES VERSION ${libgras_version})\r
 \r
 set_target_properties(simgrid PROPERTIES VERSION ${libsimgrid_version})\r
 set_target_properties(gras PROPERTIES VERSION ${libgras_version})\r
 \r
-set_target_properties(gras            PROPERTIES COMPILE_FLAGS "/D _XBT_DLL_EXPORT")\r
-set_target_properties(gras_static     PROPERTIES COMPILE_FLAGS "/D _XBT_DLL_STATIC"\r
-                                                 OUTPUT_NAME   "gras")\r
-set_target_properties(simgrid         PROPERTIES COMPILE_FLAGS "/D _XBT_DLL_EXPORT")\r
-set_target_properties(simgrid_static  PROPERTIES COMPILE_FLAGS "/D _XBT_DLL_STATIC"\r
-                                                 OUTPUT_NAME   "simgrid")\r
+\r
+if(MSVC)\r
+    set_target_properties(gras            PROPERTIES COMPILE_FLAGS "/D _XBT_DLL_EXPORT")\r
+    set_target_properties(gras_static     PROPERTIES COMPILE_FLAGS "/D _XBT_DLL_STATIC"\r
+                                                     OUTPUT_NAME   "gras")\r
+    set_target_properties(simgrid         PROPERTIES COMPILE_FLAGS "/D _XBT_DLL_EXPORT")\r
+    set_target_properties(simgrid_static  PROPERTIES COMPILE_FLAGS "/D _XBT_DLL_STATIC"\r
+                                                     OUTPUT_NAME   "simgrid")\r
+else(MSVC)\r
+    if(CMAKE_COMPILER_IS_GNUCC)\r
+        set_target_properties(gras            PROPERTIES COMPILE_FLAGS "-D _XBT_DLL_EXPORT")\r
+        set_target_properties(gras_static     PROPERTIES COMPILE_FLAGS "-D _XBT_DLL_STATIC"\r
+                                                         OUTPUT_NAME   "gras")\r
+        set_target_properties(simgrid         PROPERTIES COMPILE_FLAGS "-D _XBT_DLL_EXPORT")\r
+        set_target_properties(simgrid_static  PROPERTIES COMPILE_FLAGS "-D _XBT_DLL_STATIC"\r
+                                                         OUTPUT_NAME   "simgrid")\r
+    else(CMAKE_COMPILER_IS_GNUCC)\r
+        message(FATAL_ERROR "Compilateur non connu!!!")\r
+    endif(CMAKE_COMPILER_IS_GNUCC)\r
+endif(MSVC)\r
 \r
 set(GRAS_DEP "wsock32")\r
 set(SIMGRID_DEP "wsock32")\r
 \r
 set(GRAS_DEP "wsock32")\r
 set(SIMGRID_DEP "wsock32")\r
@@ -28,11 +42,8 @@ target_link_libraries(gras_static    ${GRAS_DEP})
 #src/testall\r
 add_subdirectory(${PROJECT_DIRECTORY}/src)\r
 \r
 #src/testall\r
 add_subdirectory(${PROJECT_DIRECTORY}/src)\r
 \r
-#tools/gras\r
-add_subdirectory(${PROJECT_DIRECTORY}/tools/gras)\r
-\r
-#tools/tesh\r
-add_subdirectory(${PROJECT_DIRECTORY}/tools/tesh)\r
+#examples\r
+add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/icomms)\r
 \r
 #testsuite/xbt\r
 add_subdirectory(${PROJECT_DIRECTORY}/testsuite/xbt)\r
 \r
 #testsuite/xbt\r
 add_subdirectory(${PROJECT_DIRECTORY}/testsuite/xbt)\r
@@ -41,55 +52,4 @@ add_subdirectory(${PROJECT_DIRECTORY}/testsuite/xbt)
 add_subdirectory(${PROJECT_DIRECTORY}/testsuite/surf)\r
 \r
 #testsuite/simdag\r
 add_subdirectory(${PROJECT_DIRECTORY}/testsuite/surf)\r
 \r
 #testsuite/simdag\r
-add_subdirectory(${PROJECT_DIRECTORY}/testsuite/simdag)\r
-\r
-#teshsuite\r
-add_subdirectory(${PROJECT_DIRECTORY}/teshsuite/xbt)\r
-add_subdirectory(${PROJECT_DIRECTORY}/teshsuite/gras/datadesc)\r
-add_subdirectory(${PROJECT_DIRECTORY}/teshsuite/gras/msg_handle)\r
-add_subdirectory(${PROJECT_DIRECTORY}/teshsuite/gras/empty_main)\r
-add_subdirectory(${PROJECT_DIRECTORY}/teshsuite/gras/small_sleep)\r
-add_subdirectory(${PROJECT_DIRECTORY}/teshsuite/simdag)\r
-add_subdirectory(${PROJECT_DIRECTORY}/teshsuite/simdag/network)\r
-add_subdirectory(${PROJECT_DIRECTORY}/teshsuite/simdag/network/p2p)\r
-add_subdirectory(${PROJECT_DIRECTORY}/teshsuite/simdag/network/mxn)\r
-add_subdirectory(${PROJECT_DIRECTORY}/teshsuite/simdag/partask)\r
-add_subdirectory(${PROJECT_DIRECTORY}/teshsuite/simdag/platforms)\r
-add_subdirectory(${PROJECT_DIRECTORY}/teshsuite/msg)\r
-\r
-#examples\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/gras/ping)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/gras/rpc)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/gras/spawn)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/gras/timer)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/gras/chrono)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/gras/mutual_exclusion/simple_token)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/gras/mmrpc)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/gras/all2all)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/gras/pmm)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/gras/synchro)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/gras/properties)\r
-\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/properties)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/actions)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/migration)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/sendrecv)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/suspend)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/parallel_task)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/priority)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/masterslave)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/trace)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/tracing)\r
-\r
-if(HAVE_MC)\r
-       add_subdirectory(${PROJECT_DIRECTORY}/examples/msg/mc)\r
-endif(HAVE_MC)\r
-\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/amok/bandwidth)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/amok/saturate)\r
-\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/dax)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/metaxml)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/properties)\r
-add_subdirectory(${PROJECT_DIRECTORY}/examples/simdag/scheduling)\r
+add_subdirectory(${PROJECT_DIRECTORY}/testsuite/simdag)
\ No newline at end of file
index 6cbe6d9..2a7c638 100644 (file)
@@ -43,6 +43,11 @@ if(WIN32) #actually not enable with windows
        message("Mode supernovae and maintainer disable with Windows.")
        set(enable_supernovae false CACHE TYPE INTERNAL FORCE)
        set(enable_maintainer_mode false CACHE TYPE INTERNAL FORCE)
        message("Mode supernovae and maintainer disable with Windows.")
        set(enable_supernovae false CACHE TYPE INTERNAL FORCE)
        set(enable_maintainer_mode false CACHE TYPE INTERNAL FORCE)
+       set(enable_java false CACHE TYPE INTERNAL FORCE)
+       set(enable_lua false CACHE TYPE INTERNAL FORCE)
+       set(enable_ruby false CACHE TYPE INTERNAL FORCE)
+       set(enable_smpi false CACHE TYPE INTERNAL FORCE)
+       set(enable_gtnets false CACHE TYPE INTERNAL FORCE)
 endif(WIN32)
 
 if(enable_supernovae AND enable_model-checking)
 endif(WIN32)
 
 if(enable_supernovae AND enable_model-checking)
index 37ea0c6..2507db8 100644 (file)
@@ -27,8 +27,8 @@ if(enable_print_message)
        message("SIZEOF_MAX :                   ${SIZEOF_MAX}")
        message("PTH_STACKGROWTH                ${PTH_STACKGROWTH}")
        message("need_getline                   ${need_getline}")
        message("SIZEOF_MAX :                   ${SIZEOF_MAX}")
        message("PTH_STACKGROWTH                ${PTH_STACKGROWTH}")
        message("need_getline                   ${need_getline}")
-       message("need_asprintf                  ${need_asprintf}")
-       message("need_vasprintf                 ${need_vasprintf}")
+       message("need_asprintf                  ${simgrid_need_asprintf}")
+       message("need_vasprintf                 ${simgrid_need_vasprintf}")
        message("PREFER_PORTABLE_SNPRINTF       ${PREFER_PORTABLE_SNPRINTF}")
        message("HAVE_VA_COPY                   ${HAVE_VA_COPY}")
        message("GRAS_BIGENDIAN                 ${GRAS_BIGENDIAN}")
        message("PREFER_PORTABLE_SNPRINTF       ${PREFER_PORTABLE_SNPRINTF}")
        message("HAVE_VA_COPY                   ${HAVE_VA_COPY}")
        message("GRAS_BIGENDIAN                 ${GRAS_BIGENDIAN}")
@@ -56,7 +56,7 @@ if(enable_print_message)
        message("HAVE_STAT_H                    ${HAVE_STAT_H}")
        message("HAVE_SYS_STAT_H                ${HAVE_SYS_STAT_H}")
        message("HAVE_WINDOWS_H                 ${HAVE_WINDOWS_H}")
        message("HAVE_STAT_H                    ${HAVE_STAT_H}")
        message("HAVE_SYS_STAT_H                ${HAVE_SYS_STAT_H}")
        message("HAVE_WINDOWS_H                 ${HAVE_WINDOWS_H}")
-       message("HAVE_WINSOCK_H                 ${HAVE_WINSOCK_H}")
+       message("HAVE_WINSOCK_H                     ${HAVE_WINSOCK_H}")
        message("HAVE_WINSOCK2_H                ${HAVE_WINSOCK2_H}")
        message("HAVE_ERRNO_H                   ${HAVE_ERRNO_H}")
        message("HAVE_UNISTD_H                  ${HAVE_UNISTD_H}")
        message("HAVE_WINSOCK2_H                ${HAVE_WINSOCK2_H}")
        message("HAVE_ERRNO_H                   ${HAVE_ERRNO_H}")
        message("HAVE_UNISTD_H                  ${HAVE_UNISTD_H}")
index 15a1e35..dec1cd4 100644 (file)
 #ifndef _MSC_VER
        #cmakedefine _MSC_VER @_MSC_VER@
 #endif
 #ifndef _MSC_VER
        #cmakedefine _MSC_VER @_MSC_VER@
 #endif
+#ifndef _M_IX86
+       #cmakedefine _M_IX86 @_M_IX86@
+#endif
 #cmakedefine _XBT_WIN32 @_XBT_WIN32@   //this variable is set if it is a windows platform
 #cmakedefine _WIN32 @_WIN32@                   //this variable is set if it is a 32 bits windows platform
 #cmakedefine _WIN64 @_WIN64@                   //this variable is set if it is a 64 bits  windows platform
 #cmakedefine __VISUALC__ @__VISUALC__@
 #cmakedefine __BORLANDC__ @__BORLANDC__@
 #cmakedefine _XBT_WIN32 @_XBT_WIN32@   //this variable is set if it is a windows platform
 #cmakedefine _WIN32 @_WIN32@                   //this variable is set if it is a 32 bits windows platform
 #cmakedefine _WIN64 @_WIN64@                   //this variable is set if it is a 64 bits  windows platform
 #cmakedefine __VISUALC__ @__VISUALC__@
 #cmakedefine __BORLANDC__ @__BORLANDC__@
-
+#ifdef _XBT_WIN32
+       #ifndef __GNUC__
+               #cmakedefine __GNUC__ @__GNUC__@
+       #endif
+#endif
 /* Set to true if enable_model-checking is true */
 #cmakedefine MMALLOC_WANT_OVERIDE_LEGACY @MMALLOC_WANT_OVERIDE_LEGACY@
 #cmakedefine HAVE_MC @HAVE_MC@
 /* Set to true if enable_model-checking is true */
 #cmakedefine MMALLOC_WANT_OVERIDE_LEGACY @MMALLOC_WANT_OVERIDE_LEGACY@
 #cmakedefine HAVE_MC @HAVE_MC@
index a0a7337..2fc26ed 100644 (file)
@@ -6,10 +6,12 @@
 
 #include <stdio.h>
 #include <stdlib.h>
 
 #include <stdio.h>
 #include <stdlib.h>
+
 #ifdef _XBT_WIN32
 #ifdef _XBT_WIN32
-#include <win32_ucontext.h>
+       #include "win32_ucontext.h"
+       #include "win32_ucontext.c"
 #else
 #else
-#include <ucontext.h>
+       #include <ucontext.h>
 #endif
 
 void child(void);
 #endif
 
 void child(void);
index 55936ed..8bffd64 100644 (file)
 #include <signal.h>
 #include <unistd.h>
 #endif
 #include <signal.h>
 #include <unistd.h>
 #endif
+
 #if defined(TEST_makecontext)
 #if defined(TEST_makecontext)
-#include <ucontext.h>
+#ifdef _XBT_WIN32
+       #include "win32_ucontext.h"
+#else
+       #include <ucontext.h>
+#endif
+
 #endif
 union alltypes {
     long   l;
 #endif
 union alltypes {
     long   l;
index 6b01102..1735095 100644 (file)
 #cmakedefine _WIN64 @_WIN64@                   /*this variable is set if it is a 64 bits  windows platform*/
 #cmakedefine __VISUALC__ @__VISUALC__@
 #cmakedefine __BORLANDC__ @__BORLANDC__@
 #cmakedefine _WIN64 @_WIN64@                   /*this variable is set if it is a 64 bits  windows platform*/
 #cmakedefine __VISUALC__ @__VISUALC__@
 #cmakedefine __BORLANDC__ @__BORLANDC__@
+#ifdef _XBT_WIN32
+       #ifndef __GNUC__
+               #cmakedefine __GNUC__ @__GNUC__@
+       #endif
+#endif
 
 #ifndef SIMGRID_PUBLIC_CONFIG_H
 #define SIMGRID_PUBLIC_CONFIG_H
 
 #ifndef SIMGRID_PUBLIC_CONFIG_H
 #define SIMGRID_PUBLIC_CONFIG_H
@@ -37,8 +42,8 @@ SG_BEGIN_DECL()
 #undef SIMGRID_NEED_ASPRINTF
 #undef SIMGRID_NEED_VASPRINTF
 @need_getline@
 #undef SIMGRID_NEED_ASPRINTF
 #undef SIMGRID_NEED_VASPRINTF
 @need_getline@
-@need_asprintf@
-@need_vasprintf@
+@simgrid_need_asprintf@
+@simgrid_need_vasprintf@
 
 /* Use that config to declare missing elements */
 #ifdef SIMGRID_NEED_GETLINE
 
 /* Use that config to declare missing elements */
 #ifdef SIMGRID_NEED_GETLINE
index da3dd53..7f15c64 100644 (file)
@@ -15,6 +15,9 @@
 #endif /* HAVE_VALGRIND_VALGRIND_H */
 
 #ifdef _XBT_WIN32
 #endif /* HAVE_VALGRIND_VALGRIND_H */
 
 #ifdef _XBT_WIN32
+       #include "win32_ucontext.h"
+       #include "win32_ucontext.c"
+#else
        #include "ucontext.h"
        #include "ucontext.c"
 #endif
        #include "ucontext.h"
        #include "ucontext.c"
 #endif
index d98d79a..5714534 100644 (file)
@@ -23,8 +23,11 @@ SG_BEGIN_DECL()
 #endif /*CONTEXT_STACK_SIZE */
 
 #include "context_sysv_config.h"        /* loads context system definitions */
 #endif /*CONTEXT_STACK_SIZE */
 
 #include "context_sysv_config.h"        /* loads context system definitions */
+#ifdef _XBT_WIN32
+#include <win32_ucontext.h>           /* context relative declarations */
+#else
 #include <ucontext.h>           /* context relative declarations */
 #include <ucontext.h>           /* context relative declarations */
-
+#endif
 typedef struct s_smx_ctx_sysv {
   s_smx_ctx_base_t super;       /* Fields of super implementation */
   ucontext_t uc;                /* the thread that execute the code */
 typedef struct s_smx_ctx_sysv {
   s_smx_ctx_base_t super;       /* Fields of super implementation */
   ucontext_t uc;                /* the thread that execute the code */
index 4588aa0..48769c4 100644 (file)
 
 static unsigned int _seed = 2147483647;
 
 
 static unsigned int _seed = 2147483647;
 
+#ifdef __VISUALC__
 typedef unsigned __int64 uint64_t;
 typedef unsigned int uint32_t;
 typedef unsigned __int64 uint64_t;
 typedef unsigned int uint32_t;
+#endif
 
 struct drand48_data {
   unsigned short int __x[3];    /* Current state.  */
 
 struct drand48_data {
   unsigned short int __x[3];    /* Current state.  */
index 16986fe..1e0dd05 100644 (file)
@@ -7,18 +7,16 @@
 
 /*The function ffs doesn't exist for windows*/
 #ifdef _XBT_WIN32
 
 /*The function ffs doesn't exist for windows*/
 #ifdef _XBT_WIN32
-       int XBT_INLINE ffs(int x)
-       {
-               int r;
-               __asm{
-                       mov ecx, [x]
-                       bsf eax, ecx
-                       jnz ffs1
-                       mov eax, -1
-                       ffs1:
-                       mov[r],eax
+       int ffs(int bits)
+    {
+               int i;
+               if (bits == 0)
+                       return (0);
+               for (i = 1; ; i++, bits >>= 1)
+               {
+                       if (bits & 1) break;
                }
                }
-               return(r);
+               return (i);
        }
 #endif
 
        }
 #endif
 
index 3051d05..1d7d453 100644 (file)
@@ -20,7 +20,7 @@
  *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\r
  */\r
 \r
  *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\r
  */\r
 \r
-#include "ucontext.h"\r
+#include "win32_ucontext.h"\r
 \r
 int getcontext(ucontext_t *ucp)\r
 {\r
 \r
 int getcontext(ucontext_t *ucp)\r
 {\r
index 6f5688f..9783021 100644 (file)
@@ -7,7 +7,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "xbt/misc.h"
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "xbt/misc.h"
-#include "simgrid_config.h"            /*HAVE_MMAP*/
+#include "simgrid_config.h"            /*HAVE_MMAP _XBT_WIN32*/
 #include "time.h"               /* to seed the random generator */
 
 #include "xbt/sysdep.h"
 #include "time.h"               /* to seed the random generator */
 
 #include "xbt/sysdep.h"
@@ -53,6 +53,11 @@ XBT_LOG_EXTERNAL_CATEGORY(xbt_sync_os);
  */
 static void xbt_preinit(void) _XBT_GNUC_CONSTRUCTOR;
 static void xbt_postexit(void) _XBT_GNUC_DESTRUCTOR;
  */
 static void xbt_preinit(void) _XBT_GNUC_CONSTRUCTOR;
 static void xbt_postexit(void) _XBT_GNUC_DESTRUCTOR;
+
+#ifdef _XBT_WIN32
+ # undef _XBT_NEED_INIT_PRAGMA
+#endif
+
 #ifdef _XBT_NEED_INIT_PRAGMA
 #pragma init (xbt_preinit)
 #pragma fini (xbt_postexit)
 #ifdef _XBT_NEED_INIT_PRAGMA
 #pragma init (xbt_preinit)
 #pragma fini (xbt_postexit)
diff --git a/vb.bat b/vb.bat
new file mode 100644 (file)
index 0000000..fef401a
--- /dev/null
+++ b/vb.bat
@@ -0,0 +1,12 @@
+echo off\r
+set CC=C:\MicrosoftVisualStudio10\VC\bin\cl\r
+set CXX=C:\MicrosoftVisualStudio10\VC\bin\cl\r
+set INCLUDE=C:\MicrosoftVisualStudio10\VC\include;C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include\r
+set LIB=C:\MicrosoftVisualStudio10\VC\lib;C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib\r
+set RC=C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\RC\r
+set Path=%Path%;C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\r
+set Path=%Path%;C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib\r
+set Path=%Path%;C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include\r
+set Path=%Path%;C:\MicrosoftVisualStudio10\VC\\r
+set Path=%Path%;C:\MicrosoftVisualStudio10\Common7\IDE\r
+set Path=%Path%;C:\MicrosoftVisualStudio10\VC\bin
\ No newline at end of file