From: unknown Date: Thu, 30 Jun 2011 09:52:56 +0000 (+0200) Subject: Add a README and examples/platforms. X-Git-Tag: v3_6_2~203^2~4 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e1094f9e0a18fb54aa02cb93190d3b93567550ed Add a README and examples/platforms. --- diff --git a/buildtools/Cmake/simgrid.nsi.in b/buildtools/Cmake/simgrid.nsi.in index c34a8e1dc2..54bb19f304 100644 --- a/buildtools/Cmake/simgrid.nsi.in +++ b/buildtools/Cmake/simgrid.nsi.in @@ -127,12 +127,17 @@ section file bin\smpirun file bin\tesh - #install doc + # install doc CreateDirectory $INSTDIR\doc setOutPath $INSTDIR\doc file /nonfatal /r @CMAKE_HOME_DIRECTORY@\doc\html file /r @CMAKE_HOME_DIRECTORY@\doc\HelloWorld + # install examples + CreateDirectory $INSTDIR\examples + setOutPath $INSTDIR\examples + file /r @CMAKE_HOME_DIRECTORY@\examples\platforms + # define uninstaller name writeUninstaller $INSTDIR\uninstaller@BIN_EXE@ @@ -263,8 +268,8 @@ section "Uninstall" RMDir "$INSTDIR\include\xbt" RMDir "$INSTDIR\include" RMDir /r "$INSTDIR\doc" + RMDir /r "$INSTDIR\examples" RMDir "$SMPROGRAMS\SimGrid" - RMDir "$PROGRAMFILES\SimGrid" # Delete variable DeleteRegValue ${env_hklm} SIMGRID_ROOT diff --git a/doc/HelloWorld/README b/doc/HelloWorld/README new file mode 100644 index 0000000000..2fcbf6976d --- /dev/null +++ b/doc/HelloWorld/README @@ -0,0 +1,35 @@ +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" ' +- 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" .' +- To build you project, run "cmake ." +- Run "gmake" +- You should obtain "TARGET_NAME.exe". \ No newline at end of file