Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
convert cloud-migration
[simgrid.git] / examples / c / CMakeLists.txt
1 # Regular examples: with only one source and tested with all factories
2 ######################################################################
3
4 foreach(x
5         actor-create actor-daemon actor-exiting actor-join actor-kill actor-migrate actor-suspend actor-yield
6         app-pingpong app-token-ring 
7         async-waitall async-waitany
8         cloud-capping cloud-migration cloud-simple
9         exec-dvfs
10         energy-exec
11         io-disk-raw io-file-remote
12         plugin-hostload)
13   add_executable       (${x}-c EXCLUDE_FROM_ALL ${x}/${x}.c)
14   target_link_libraries(${x}-c simgrid)
15   set_target_properties(${x}-c PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
16   add_dependencies(tests ${x}-c)
17
18   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
19   set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.c)
20 endforeach()
21
22 # Multi-files examples
23 ######################
24 # Chainsend example
25
26 add_executable       (app-chainsend-c EXCLUDE_FROM_ALL app-chainsend/chainsend.c app-chainsend/broadcaster.c 
27                       app-chainsend/peer.c)
28 target_link_libraries(app-chainsend-c simgrid)
29 set_target_properties(app-chainsend-c PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/app-chainsend)
30 add_dependencies(tests app-chainsend-c)
31
32 foreach (file chainsend broadcaster peer)
33   set(teshsuite_src  ${teshsuite_src}  ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/${file}.c)
34 endforeach()
35 set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/chainsend.h)
36
37 # Add all extra files to the archive
38 ####################################
39
40 set(teshsuite_src ${teshsuite_src}  PARENT_SCOPE)
41 set(tesh_files    ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/app-chainsend.tesh
42                                 PARENT_SCOPE)
43
44 set(xml_files     ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/actor-create_d.xml
45                                ${CMAKE_CURRENT_SOURCE_DIR}/actor-yield/actor-yield_d.xml
46                                ${CMAKE_CURRENT_SOURCE_DIR}/app-chainsend/app-chainsend_d.xml
47                                ${CMAKE_CURRENT_SOURCE_DIR}/app-pingpong/app-pingpong_d.xml
48                                ${CMAKE_CURRENT_SOURCE_DIR}/async-waitall/async-waitall_d.xml
49                                ${CMAKE_CURRENT_SOURCE_DIR}/async-waitany/async-waitany_d.xml
50                                ${CMAKE_CURRENT_SOURCE_DIR}/io-file-remote/io-file-remote_d.xml
51                                PARENT_SCOPE)
52
53 foreach(x
54         actor-create actor-daemon actor-exiting actor-join actor-kill actor-migrate actor-suspend actor-yield
55         app-chainsend app-pingpong app-token-ring
56         async-waitall async-waitany
57         cloud-capping cloud-migration cloud-simple
58         exec-dvfs
59         energy-exec
60         io-disk-raw io-file-remote
61         plugin-hostload)
62   ADD_TESH(c-${x} --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
63                   --setenv bindir=${CMAKE_BINARY_DIR}/examples/c/${x}
64                   --cd ${CMAKE_HOME_DIRECTORY}/examples/c/${x}
65                   ${CMAKE_HOME_DIRECTORY}/examples/c/${x}/${x}.tesh)
66 endforeach()