file bin\smpirun\r
file bin\tesh\r
\r
- #install doc\r
+ # install doc\r
CreateDirectory $INSTDIR\doc\r
setOutPath $INSTDIR\doc\r
file /nonfatal /r @CMAKE_HOME_DIRECTORY@\doc\html\r
file /r @CMAKE_HOME_DIRECTORY@\doc\HelloWorld\r
\r
+ # install examples\r
+ CreateDirectory $INSTDIR\examples\r
+ setOutPath $INSTDIR\examples\r
+ file /r @CMAKE_HOME_DIRECTORY@\examples\platforms \r
+ \r
# define uninstaller name\r
writeUninstaller $INSTDIR\uninstaller@BIN_EXE@\r
\r
RMDir "$INSTDIR\include\xbt"\r
RMDir "$INSTDIR\include"\r
RMDir /r "$INSTDIR\doc"\r
+ RMDir /r "$INSTDIR\examples"\r
RMDir "$SMPROGRAMS\SimGrid"\r
- RMDir "$PROGRAMFILES\SimGrid"\r
\r
# Delete variable\r
DeleteRegValue ${env_hklm} SIMGRID_ROOT\r
--- /dev/null
+This is a very simple example to explain how to compile with simgrid.
+
+1) How to compile an example: (HelloWorld)
+
+- Run "Git bash" (installed with git).
+- Open HelloWorld Directory ('cd' command line).
+- Create a build directory and change directory. (optional)
+- Type 'cmake -G"Unix Makefiles" <path_to_HelloWorld_project>'
+- Run gmake
+- You should obtain a runnable example ("HelloWorld.exe").
+
+2) Content of this directory
+
+- HelloWorld.c
+ The example source file.
+- CMakeLists.txt
+ It allows to configure the project.
+- FindPCRE.cmake
+ Simgrid needs pcre regular expression.
+ This finds and links to the pcre library.
+- README
+ This explaination.
+
+3) How to add and compile a new example
+
+- Put your source file into the helloWord directory.
+- Edit CMakeLists.txt :
+ * In the Targets section add those two lines:
+ add_executable(TARGET_NAME SOURCES)
+ target_link_libraries(TARGET_NAME simgrid pcre)
+ * It creates a target called 'TARGET_NAME.exe' with the sources 'SOURCES'.
+- To initialize your project, you'll need to run 'cmake -G"Unix Makefiles" <path_to_HelloWorld_project>.'
+- To build you project, run "cmake ."
+- Run "gmake"
+- You should obtain "TARGET_NAME.exe".
\ No newline at end of file