set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
+find_package(SimGrid REQUIRED)
+include_directories(${SimGrid_INCLUDE_DIR})
+
set(SIMULATOR_SOURCES main.c other.c util.c)
add_executable(my_simulator ${SIMULATOR_SOURCES})
-target_link_libraries(my_simulator simgrid)
+target_link_libraries(my_simulator ${SimGrid_LIBRARY})
set(OTHER_SOURCES blah.c bar.c foo.h)
add_executable(other_xp ${OTHER_SOURCES})
-target_link_libraries(other_xp simgrid)
+target_link_libraries(other_xp ${SimGrid_LIBRARY})
@endverbatim
+For that, you need <a href="https://github.com/simgrid/simgrid/blob/master/FindSimGrid.cmake">FindSimGrid.cmake</a>,
+that is located at the root of the SimGrid tree. You can either copy
+this file into the `cmake/Modules` directory of your project, or use
+the version installed on the disk. Both solutions present advantages
+and drawback: if you copy the file, you have to keep it in sync
+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.
+
@section install_yours_makefile Building your project with Makefile
Here is a Makefile that will work if your project is composed of three
Next you have to activate C++11 in your build settings, add -std=c++11 in the CDT GCC Built-in compiler settings.
- \image html eclipseScreenShot.png "Eclipse preference page" width=10cm
-
-
+![Eclipse preference page.](eclipseScreenShot.png)
@section install_yours_javaexample Building the Java examples in Eclipse