1 This is a very simple example to explain how to compile with simgrid.
3 1) How to compile an example: (HelloWorld)
5 - Run "Git bash" (installed with git) or windows shell "cmd".
6 - Open HelloWorld Directory ('cd' command line).
7 - Create a build directory and change directory. (optional)
8 - Type 'cmake -G"Unix Makefiles" <path_to_HelloWorld_project>'
10 - You should obtain a runnable example ("HelloWorld.exe").
12 2) Content of this directory
15 The example source file.
17 It allows to configure the project.
19 Simgrid needs pcre regular expression.
20 This finds and links to the pcre library (Normally included into Simgrid directory "GnuWin32").
24 3) How to add and compile a new example
26 - Put your source file into the helloWord directory.
27 - Edit CMakeLists.txt :
28 * In the Targets section add those two lines:
29 add_executable(TARGET_NAME SOURCES)
30 target_link_libraries(TARGET_NAME simgrid pcre)
31 * It creates a target called 'TARGET_NAME.exe' with the sources 'SOURCES'.
32 - To initialize your project, you'll need to run 'cmake -G"Unix Makefiles" <path_to_HelloWorld_project>.'
33 - To build you project, run "cmake ."
35 - You should obtain "TARGET_NAME.exe".