Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
31fa267b7cf7c297aa47cd02a714fbe0f1647017
[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_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 add_executable(sd_test_console sd_test_console.c)
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 m )
16   target_link_libraries(sd_test2 simgrid pthread m )
17   target_link_libraries(sd_typed_tasks_test simgrid pthread m )
18   target_link_libraries(sd_comm_throttling simgrid pthread m )
19   target_link_libraries(sd_seq_access simgrid pthread m )
20   target_link_libraries(sd_test_console simgrid pthread m )
21   target_link_libraries(simdag_tracing simgrid pthread m )
22
23   add_custom_command(TARGET ex_sd_test
24     POST_BUILD
25     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/ex_sd_test ${CMAKE_CURRENT_BINARY_DIR}/sd_test
26     WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
27     )
28   get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
29   set_directory_properties(
30     PROPERTIES
31     ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${CMAKE_CURRENT_BINARY_DIR}/sd_test")
32
33 else(NOT WIN32)
34   target_link_libraries(ex_sd_test simgrid)
35   target_link_libraries(sd_test2 simgrid)
36   target_link_libraries(sd_typed_tasks_test simgrid)
37   target_link_libraries(sd_comm_throttling simgrid)
38   target_link_libraries(sd_seq_access simgrid)
39   target_link_libraries(sd_test_console simgrid)
40   target_link_libraries(simdag_tracing simgrid)
41
42   add_custom_command(TARGET ex_sd_test
43     POST_BUILD
44     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/ex_sd_test.exe ${CMAKE_CURRENT_BINARY_DIR}/sd_test.exe
45     WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
46     )
47   get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
48   set_directory_properties(
49     PROPERTIES
50     ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${CMAKE_CURRENT_BINARY_DIR}/sd_test.exe")
51 endif(NOT WIN32)
52
53 set(tesh_files
54   ${tesh_files}
55   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag2.tesh
56   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_seq_access.tesh
57   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag.tesh
58   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_typed_tasks.tesh
59   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_comm_throttling.tesh
60   PARENT_SCOPE
61   )
62 set(xml_files
63   ${xml_files}
64   ${CMAKE_CURRENT_SOURCE_DIR}/2clusters.xml
65   PARENT_SCOPE
66   )
67 set(examples_src
68   ${examples_src}
69   ${CMAKE_CURRENT_SOURCE_DIR}/sd_seq_access.c
70   ${CMAKE_CURRENT_SOURCE_DIR}/sd_test2.c
71   ${CMAKE_CURRENT_SOURCE_DIR}/sd_test.c
72   ${CMAKE_CURRENT_SOURCE_DIR}/sd_test_console.c
73   ${CMAKE_CURRENT_SOURCE_DIR}/sd_typed_tasks_test.c
74   ${CMAKE_CURRENT_SOURCE_DIR}/sd_comm_throttling.c
75   ${CMAKE_CURRENT_SOURCE_DIR}/simdag_trace.c
76   PARENT_SCOPE
77   )
78 set(bin_files
79   ${bin_files}
80   ${CMAKE_CURRENT_SOURCE_DIR}/platform_script.lua
81   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag.in
82   PARENT_SCOPE
83   )
84 set(txt_files
85   ${txt_files}
86   PARENT_SCOPE
87   )