Logo AND Algorithmique Numérique Distribuée

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