Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
6d0a8a14f525281d73ca4e543159df4155abdda8
[simgrid.git] / examples / simdag / CMakeLists.txt
1 set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
2
3 add_executable(ex_sd_test sd_test.c)
4 add_executable(sd_test2 sd_test2.c)
5 add_executable(sd_fail sd_fail.c)
6 add_executable(sd_avail sd_avail.c)
7 add_executable(sd_typed_tasks_test sd_typed_tasks_test.c)
8 add_executable(sd_comm_throttling sd_comm_throttling.c)
9
10 add_executable(simdag_tracing simdag_trace.c)
11
12 ### Add definitions for compile
13 if(NOT WIN32)
14   target_link_libraries(ex_sd_test simgrid pthread )
15   target_link_libraries(sd_test2 simgrid pthread )
16   target_link_libraries(sd_fail simgrid pthread )
17   target_link_libraries(sd_avail simgrid pthread )
18   target_link_libraries(sd_typed_tasks_test simgrid pthread )
19   target_link_libraries(sd_comm_throttling simgrid pthread )
20   target_link_libraries(simdag_tracing simgrid pthread )
21
22   add_custom_command(TARGET ex_sd_test
23     POST_BUILD
24     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/ex_sd_test ${CMAKE_CURRENT_BINARY_DIR}/sd_test
25     WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
26     )
27   get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
28   set_directory_properties(
29     PROPERTIES
30     ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${CMAKE_CURRENT_BINARY_DIR}/sd_test")
31
32 else()
33   target_link_libraries(ex_sd_test simgrid)
34   target_link_libraries(sd_test2 simgrid)
35   target_link_libraries(sd_fail simgrid)
36   target_link_libraries(sd_avail simgrid)
37   target_link_libraries(sd_typed_tasks_test simgrid)
38   target_link_libraries(sd_comm_throttling simgrid)
39   target_link_libraries(simdag_tracing simgrid)
40   
41   add_custom_command(TARGET ex_sd_test
42     POST_BUILD
43     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/ex_sd_test.exe ${CMAKE_CURRENT_BINARY_DIR}/sd_test.exe
44     WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
45     )
46   get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
47   set_directory_properties(
48     PROPERTIES
49     ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${CMAKE_CURRENT_BINARY_DIR}/sd_test.exe")
50 endif()
51
52 set(tesh_files
53   ${tesh_files}
54   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag.tesh
55   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag2.tesh
56   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_comm_throttling.tesh
57   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_tracing.tesh
58   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_typed_tasks.tesh
59   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_avail.tesh
60   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_fail.tesh
61   PARENT_SCOPE
62   )
63 set(xml_files
64   ${xml_files}
65   ${CMAKE_CURRENT_SOURCE_DIR}/2clusters.xml
66   ${CMAKE_CURRENT_SOURCE_DIR}/two_hosts.xml
67   ${CMAKE_CURRENT_SOURCE_DIR}/faulty_host.xml
68   PARENT_SCOPE
69   )
70 set(examples_src
71   ${examples_src}
72   ${CMAKE_CURRENT_SOURCE_DIR}/sd_avail.c
73   ${CMAKE_CURRENT_SOURCE_DIR}/sd_comm_throttling.c
74   ${CMAKE_CURRENT_SOURCE_DIR}/sd_fail.c
75   ${CMAKE_CURRENT_SOURCE_DIR}/sd_test.c
76   ${CMAKE_CURRENT_SOURCE_DIR}/sd_test2.c
77   ${CMAKE_CURRENT_SOURCE_DIR}/sd_typed_tasks_test.c
78   ${CMAKE_CURRENT_SOURCE_DIR}/simdag_trace.c
79   PARENT_SCOPE
80   )
81 set(bin_files
82   ${bin_files}
83   ${CMAKE_CURRENT_SOURCE_DIR}/platform_script.lua
84   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag.in
85   PARENT_SCOPE
86   )
87 set(txt_files
88   ${txt_files}
89   ${CMAKE_CURRENT_SOURCE_DIR}/faulty_host.trace
90   ${CMAKE_CURRENT_SOURCE_DIR}/jupiter_power.trace
91   ${CMAKE_CURRENT_SOURCE_DIR}/link1_avail.trace
92   PARENT_SCOPE
93   )