Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
d541688b01274f25fdacc26964c8e28b6ae64f13
[simgrid.git] / examples / simdag / dot / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 if(HAVE_GRAPHVIZ)
4   set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
5
6   #add_executable(<name_of_target> <src list>)
7   add_executable(dot_test dot_test.c)
8   add_executable(ptg_test ptg_test.c)
9   add_executable(simulate_dot simulate_dot.c)
10   add_executable(dot_test2 dot_test2.c)
11
12   if(NOT WIN32)
13     target_link_libraries(dot_test simgrid pthread m)   #target_link_libraries(<name_of_targe> <dependencies>)
14     target_link_libraries(ptg_test simgrid pthread m)   #target_link_libraries(<name_of_targe> <dependencies>)
15     target_link_libraries(simulate_dot simgrid pthread m)       #target_link_libraries(<name_of_targe> <dependencies>)
16     target_link_libraries(dot_test2 simgrid pthread m)  #target_link_libraries(<name_of_targe> <dependencies>)
17
18     get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
19     set_directory_properties(
20       PROPERTIES
21       ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${CMAKE_CURRENT_BINARY_DIR}/dot_test; ${CMAKE_CURRENT_BINARY_DIR}/simulate_dot;")
22
23   else()
24     target_link_libraries(dot_test simgrid)     #target_link_libraries(<name_of_targe> <dependencies>)
25     target_link_libraries(ptg_test simgrid)   #target_link_libraries(<name_of_targe> <dependencies>)
26     target_link_libraries(simulate_dot simgrid)         #target_link_libraries(<name_of_targe> <dependencies>)
27     target_link_libraries(dot_test2 simgrid)    #target_link_libraries(<name_of_targe> <dependencies>)
28     set_directory_properties(
29       PROPERTIES
30       ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${CMAKE_CURRENT_BINARY_DIR}/dot_test; ${CMAKE_CURRENT_BINARY_DIR}/simulate_dot;")
31   endif()
32 endif()
33
34 set(tesh_files
35   ${tesh_files}
36   ${CMAKE_CURRENT_SOURCE_DIR}/test_simdag_dotload.tesh
37   PARENT_SCOPE
38   )
39 set(xml_files
40   ${xml_files}
41   PARENT_SCOPE
42   )
43 set(examples_src
44   ${examples_src}
45   ${CMAKE_CURRENT_SOURCE_DIR}/dot_test.c
46   ${CMAKE_CURRENT_SOURCE_DIR}/ptg_test.c
47   ${CMAKE_CURRENT_SOURCE_DIR}/dot_test2.c
48   ${CMAKE_CURRENT_SOURCE_DIR}/simulate_dot.c
49   PARENT_SCOPE
50   )
51 set(bin_files
52   ${bin_files}
53   PARENT_SCOPE
54   )
55 set(txt_files
56   ${txt_files}
57   ${CMAKE_CURRENT_SOURCE_DIR}/dag_with_bad_schedule.dot
58   ${CMAKE_CURRENT_SOURCE_DIR}/dag_with_cycle.dot
59   ${CMAKE_CURRENT_SOURCE_DIR}/dag_with_good_schedule.dot
60   ${CMAKE_CURRENT_SOURCE_DIR}/dag.dot
61   ${CMAKE_CURRENT_SOURCE_DIR}/ptg.dot
62   PARENT_SCOPE
63   )