Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a new test to see how failures are handled by SimDag.
[simgrid.git] / examples / simdag / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
4
5 add_executable(ex_sd_test sd_test.c)
6 add_executable(sd_test2 sd_test2.c)
7 add_executable(sd_fail sd_fail.c)
8 add_executable(sd_typed_tasks_test sd_typed_tasks_test.c)
9 add_executable(sd_comm_throttling sd_comm_throttling.c)
10 add_executable(sd_seq_access sd_seq_access.c)
11 add_executable(sd_test_console sd_test_console.c)
12 add_executable(simdag_tracing simdag_trace.c)
13
14 ### Add definitions for compile
15 if(NOT WIN32)
16   target_link_libraries(ex_sd_test simgrid pthread m )
17   target_link_libraries(sd_test2 simgrid pthread m )
18   target_link_libraries(sd_fail simgrid pthread m )
19   target_link_libraries(sd_typed_tasks_test simgrid pthread m )
20   target_link_libraries(sd_comm_throttling simgrid pthread m )
21   target_link_libraries(sd_seq_access simgrid pthread m )
22   target_link_libraries(sd_test_console simgrid pthread m )
23   target_link_libraries(simdag_tracing simgrid pthread m )
24
25   add_custom_command(TARGET ex_sd_test
26     POST_BUILD
27     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/ex_sd_test ${CMAKE_CURRENT_BINARY_DIR}/sd_test
28     WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
29     )
30   get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
31   set_directory_properties(
32     PROPERTIES
33     ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${CMAKE_CURRENT_BINARY_DIR}/sd_test")
34
35 else(NOT WIN32)
36   target_link_libraries(ex_sd_test simgrid)
37   target_link_libraries(sd_test2 simgrid)
38   target_link_libraries(sd_fail 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(sd_test_console simgrid)
43   target_link_libraries(simdag_tracing simgrid)
44
45   add_custom_command(TARGET ex_sd_test
46     POST_BUILD
47     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/ex_sd_test.exe ${CMAKE_CURRENT_BINARY_DIR}/sd_test.exe
48     WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
49     )
50   get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
51   set_directory_properties(
52     PROPERTIES
53     ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${CMAKE_CURRENT_BINARY_DIR}/sd_test.exe")
54 endif(NOT WIN32)
55
56 set(tesh_files
57   ${tesh_files}
58   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag2.tesh
59   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_seq_access.tesh
60   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag.tesh
61   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_typed_tasks.tesh
62   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_comm_throttling.tesh
63   PARENT_SCOPE
64   )
65 set(xml_files
66   ${xml_files}
67   ${CMAKE_CURRENT_SOURCE_DIR}/2clusters.xml
68   PARENT_SCOPE
69   )
70 set(examples_src
71   ${examples_src}
72   ${CMAKE_CURRENT_SOURCE_DIR}/sd_seq_access.c
73   ${CMAKE_CURRENT_SOURCE_DIR}/sd_test2.c
74   ${CMAKE_CURRENT_SOURCE_DIR}/sd_test.c
75   ${CMAKE_CURRENT_SOURCE_DIR}/sd_test_console.c
76   ${CMAKE_CURRENT_SOURCE_DIR}/sd_typed_tasks_test.c
77   ${CMAKE_CURRENT_SOURCE_DIR}/sd_comm_throttling.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   PARENT_SCOPE
90   )