A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[doc] improve CMake example in setup your project
[simgrid.git]
/
doc
/
doxygen
/
install_yours.doc
diff --git
a/doc/doxygen/install_yours.doc
b/doc/doxygen/install_yours.doc
index
4d4383b
..
da754cd
100644
(file)
--- a/
doc/doxygen/install_yours.doc
+++ b/
doc/doxygen/install_yours.doc
@@
-22,18
+22,25
@@
documentation.
Here is a `CMakeLists.txt` that you can use as a starting point for
your project. It builds two simulators from a given set of source files.
Here is a `CMakeLists.txt` that you can use as a starting point for
your project. It builds two simulators from a given set of source files.
+You first need to copy the `FindSimGrid.cmake` (at the root of the
+SimGrid tree) into the `cmake/Modules` directory of your project.
+
@verbatim
project(MyFirstScheduler)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
@verbatim
project(MyFirstScheduler)
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})
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})
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
@section install_yours_makefile Building your project with Makefile
@endverbatim
@section install_yours_makefile Building your project with Makefile