Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Storage-kill: no more check disk attachement
[simgrid.git] / docs / source / Start_Your_Own_Project.rst
index bf05453..5325abe 100644 (file)
@@ -32,7 +32,7 @@ your project. It builds two simulators from a given set of source files.
    cmake_minimum_required(VERSION 2.8.8)
    project(MyFirstSimulator)
 
-   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
 
    set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
    find_package(SimGrid REQUIRED)
@@ -57,6 +57,15 @@ manually but your project will produce relevant error messages when
 trying to compile on a machine where SimGrid is not installed. Please
 also refer to the file header for more information.
 
+MPI projects should include ``find_package (MPI)`` in CMakeLists.txt. Then, the
+variables ``MPI_C_COMPILER``, ``MPI_CXX_COMPILER`` and ``MPI_Fortran_COMPILER`` should
+point to the full path of smpicc, smpicxx and smpiff respectively. Example:
+
+.. code-block:: shell
+
+   cmake -DMPI_C_COMPILER=/opt/simgrid/bin/smpicc -DMPI_CXX_COMPILER=/opt/simgrid/bin/smpicxx -DMPI_Fortran_COMPILER=/opt/simgrid/bin/smpiff .
+
+
 Building your project with Makefile
 -----------------------------------
 
@@ -112,7 +121,7 @@ Develop in C++ with Eclipse
 If you wish to develop your plugin or modify SimGrid using
 Eclipse. You have to run cmake and import it as a Makefile project.
 
-Next you have to activate C++11 in your build settings, add -std=c++11
+Next you have to activate C++14 in your build settings, add -std=c++14
 in the CDT GCC Built-in compiler settings.
 
 .. image:: /img/eclipseScreenShot.png
@@ -183,6 +192,6 @@ Sometimes, the compilation only spits very few "undefined reference"
 errors. A possible cause is that the system selected an old version of
 the SimGrid library somewhere on your disk.
 
-Dicover which version is used with ``ldd name-of-yoursimulator``.
+Discover which version is used with ``ldd name-of-yoursimulator``.
 Once you've found the obsolete copy of SimGrid, just erase it, and
 recompile and relaunch your program.