Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
I blame someone else for this
[simgrid.git] / doc / HelloWorld / README
1 This is a very simple example to explain how to compile with simgrid.
2
3 1) How to compile an example: (HelloWorld)
4
5 - Run windows shell "cmd".
6 - Open HelloWorld Directory ('cd' command line).
7 - Create a build directory and change directory. (optional)
8 - Type 'cmake -G"MinGW Makefiles" <path_to_HelloWorld_project>'
9 - Run mingw32-make
10 - You should obtain a runnable example ("HelloWorld.exe").
11
12 2) Content of this directory
13
14 - HelloWorld.c 
15         The example source file.
16 - CMakeLists.txt
17         It allows to configure the project.
18 - README
19         This explaination.
20         
21 3) How to add and compile a new example
22
23 - Put your source file into the helloWord directory.
24 - Edit CMakeLists.txt :
25         * In the Targets section add those two lines:
26                 add_executable(TARGET_NAME SOURCES)
27                 target_link_libraries(TARGET_NAME simgrid) 
28         * It creates a target called 'TARGET_NAME.exe' with the sources 'SOURCES'.
29 - To initialize your project, you'll need to run 'cmake -G"Unix Makefiles" <path_to_HelloWorld_project>.'
30 - To build you project, run "cmake ." 
31 - Run "gmake"
32 - You should obtain "TARGET_NAME.exe".