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)
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
-----------------------------------
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
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.