Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a new cmake file for windows. Cosmetics.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 21 Jun 2010 14:07:50 +0000 (14:07 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 21 Jun 2010 14:07:50 +0000 (14:07 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7911 48e7efb5-ca39-0410-a469-dd3cf9ba447f

buildtools/Cmake/MakeExeLib.cmake
buildtools/Cmake/MakeExeLibWin.cmake [new file with mode: 0644]

index 338ff0f..8ffd6cd 100644 (file)
@@ -1,38 +1,26 @@
 ### Make Libs
 ### Make Libs
-if(WIN32)
-  foreach(file ${simgrid_sources})
-    set_source_files_properties(${file} PROPERTIES COMPILE_FLAGS "/D _XBT_DLL_EXPORT")
-  endforeach(file ${simgrid_sources})
-  foreach(file ${gras_sources})
-    set_source_files_properties(${file} PROPERTIES COMPILE_FLAGS "/D _XBT_DLL_EXPORT")
-  endforeach(file ${gras_sources})
-endif(WIN32)
-
-if(enable_supernovae AND NOT WIN32)
+
+if(enable_supernovae)
        include(${PROJECT_DIRECTORY}/buildtools/Cmake/Supernovae.cmake)
        include(${PROJECT_DIRECTORY}/buildtools/Cmake/Supernovae.cmake)
-else(enable_supernovae AND NOT WIN32)  
+else(enable_supernovae)        
        add_library(simgrid SHARED ${simgrid_sources})
        add_library(simgrid_static STATIC ${simgrid_sources})
        add_library(gras SHARED ${gras_sources})
        if(enable_smpi)
                add_library(smpi SHARED ${SMPI_SRC})
        endif(enable_smpi)
        add_library(simgrid SHARED ${simgrid_sources})
        add_library(simgrid_static STATIC ${simgrid_sources})
        add_library(gras SHARED ${gras_sources})
        if(enable_smpi)
                add_library(smpi SHARED ${SMPI_SRC})
        endif(enable_smpi)
-endif(enable_supernovae AND NOT WIN32)
+endif(enable_supernovae)
 
 set_target_properties(simgrid PROPERTIES VERSION ${libsimgrid_version})
 set_target_properties(gras PROPERTIES VERSION ${libgras_version})
 
 set_target_properties(simgrid PROPERTIES VERSION ${libsimgrid_version})
 set_target_properties(gras PROPERTIES VERSION ${libgras_version})
+
 if(enable_smpi)
        set_target_properties(smpi PROPERTIES VERSION ${libsmpi_version})
 endif(enable_smpi)
 
 if(enable_smpi)
        set_target_properties(smpi PROPERTIES VERSION ${libsmpi_version})
 endif(enable_smpi)
 
-if(WIN32)
-       set(GRAS_DEP "wsock32")
-       set(SIMGRID_DEP "wsock32")
-else(WIN32)
-    set(GRAS_DEP "-lm -lpthread")
-    set(SIMGRID_DEP "-lm")
-    set(SMPI_DEP "")
-endif(WIN32)
+set(GRAS_DEP "-lm -lpthread")
+set(SIMGRID_DEP "-lm")
+set(SMPI_DEP "")
 
 if(HAVE_RUBY)
        set(SIMGRID_DEP "${SIMGRID_DEP} -l${RUBY_LIBRARY_NAME} -module")
 
 if(HAVE_RUBY)
        set(SIMGRID_DEP "${SIMGRID_DEP} -l${RUBY_LIBRARY_NAME} -module")
@@ -51,7 +39,6 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
        add_definitions("-D_XOPEN_SOURCE")
 endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
 
        add_definitions("-D_XOPEN_SOURCE")
 endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
 
-
 if(pthread)
        if(with_context MATCHES pthread)
                SET(SIMGRID_DEP "${SIMGRID_DEP} -lpthread")
 if(pthread)
        if(with_context MATCHES pthread)
                SET(SIMGRID_DEP "${SIMGRID_DEP} -lpthread")
@@ -87,11 +74,11 @@ endif(HAVE_POSIX_GETTIME)
 target_link_libraries(simgrid  ${SIMGRID_DEP})
 target_link_libraries(simgrid_static   ${SIMGRID_DEP})
 target_link_libraries(gras     ${GRAS_DEP})
 target_link_libraries(simgrid  ${SIMGRID_DEP})
 target_link_libraries(simgrid_static   ${SIMGRID_DEP})
 target_link_libraries(gras     ${GRAS_DEP})
+
 if(enable_smpi)
        target_link_libraries(smpi      simgrid ${SMPI_DEP})
 endif(enable_smpi)
 
 if(enable_smpi)
        target_link_libraries(smpi      simgrid ${SMPI_DEP})
 endif(enable_smpi)
 
-
 ### Make EXEs
 
 #src/testall
 ### Make EXEs
 
 #src/testall
diff --git a/buildtools/Cmake/MakeExeLibWin.cmake b/buildtools/Cmake/MakeExeLibWin.cmake
new file mode 100644 (file)
index 0000000..04a74f8
--- /dev/null
@@ -0,0 +1,95 @@
+### Make Libs\r
+       \r
+add_library(simgrid SHARED ${simgrid_sources})\r
+add_library(simgrid_static STATIC ${simgrid_sources})\r
+add_library(gras SHARED ${gras_sources})\r
+add_library(gras_static STATIC ${gras_sources})\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
+set(GRAS_DEP "wsock32")\r
+set(SIMGRID_DEP "wsock32")\r
+\r
+target_link_libraries(simgrid  ${SIMGRID_DEP})\r
+target_link_libraries(simgrid_static   ${SIMGRID_DEP})\r
+target_link_libraries(gras     ${GRAS_DEP})\r
+target_link_libraries(gras_static      ${GRAS_DEP})\r
+\r
+### Make EXEs\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
+\r
+#testsuite/xbt\r
+add_subdirectory(${PROJECT_DIRECTORY}/testsuite/xbt)\r
+\r
+#testsuite/surf\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