Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update CMakeLists for windows
[simgrid.git] / examples / simdag / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 set(EXECUTABLE_OUTPUT_PATH "${PROJECT_DIRECTORY}/examples/simdag/")
4
5 add_executable(ex_sd_test sd_test.c)
6 add_executable(ex_sd_test2 sd_test2.c)
7 add_executable(ex_sd_seq_access sd_seq_access.c)
8 add_executable(ex_sd_test_console sd_test_console.c)
9
10 ### Add definitions for compile
11 if(NOT WIN32)
12 target_link_libraries(ex_sd_test simgrid pthread m )
13 target_link_libraries(ex_sd_test2 simgrid pthread m )
14 target_link_libraries(ex_sd_seq_access simgrid pthread m )
15 target_link_libraries(ex_sd_test_console simgrid pthread m )
16
17 add_custom_command(TARGET ex_sd_test
18         POST_BUILD
19         COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_DIRECTORY}/examples/simdag/ex_sd_test ${PROJECT_DIRECTORY}/examples/simdag/sd_test
20         WORKING_DIRECTORY "${PROJECT_DIRECTORY}/examples/simdag/"
21 )
22 add_custom_command(TARGET ex_sd_test2
23         POST_BUILD
24         COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_DIRECTORY}/examples/simdag/ex_sd_test2 ${PROJECT_DIRECTORY}/examples/simdag/sd_test2
25         WORKING_DIRECTORY "${PROJECT_DIRECTORY}/examples/simdag/")
26
27 add_custom_command(TARGET ex_sd_seq_access
28         POST_BUILD
29         COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_DIRECTORY}/examples/simdag/ex_sd_seq_access ${PROJECT_DIRECTORY}/examples/simdag/sd_seq_access
30         WORKING_DIRECTORY "${PROJECT_DIRECTORY}/examples/simdag/")
31
32 get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
33 set_directory_properties(
34  PROPERTIES
35  ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${PROJECT_DIRECTORY}/examples/simdag/sd_test;${PROJECT_DIRECTORY}/examples/simdag/sd_test2;${PROJECT_DIRECTORY}/examples/simdag/sd_seq_access")
36 else(NOT WIN32)
37 target_link_libraries(ex_sd_test simgrid)
38 target_link_libraries(ex_sd_test2 simgrid)
39 target_link_libraries(ex_sd_seq_access simgrid)
40
41 add_custom_command(TARGET ex_sd_test
42         POST_BUILD
43         COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_DIRECTORY}/examples/simdag/ex_sd_test.exe ${PROJECT_DIRECTORY}/examples/simdag/sd_test.exe
44         WORKING_DIRECTORY "${PROJECT_DIRECTORY}/examples/simdag/"
45 )
46 add_custom_command(TARGET ex_sd_test2
47         POST_BUILD
48         COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_DIRECTORY}/examples/simdag/ex_sd_test2.exe ${PROJECT_DIRECTORY}/examples/simdag/sd_test2.exe
49         WORKING_DIRECTORY "${PROJECT_DIRECTORY}/examples/simdag/")
50
51 add_custom_command(TARGET ex_sd_seq_access
52         POST_BUILD
53         COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_DIRECTORY}/examples/simdag/ex_sd_seq_access.exe ${PROJECT_DIRECTORY}/examples/simdag/sd_seq_access.exe
54         WORKING_DIRECTORY "${PROJECT_DIRECTORY}/examples/simdag/")
55
56 get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
57 set_directory_properties(
58  PROPERTIES
59  ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${PROJECT_DIRECTORY}/examples/simdag/sd_test.exe;${PROJECT_DIRECTORY}/examples/simdag/sd_test2.exe;${PROJECT_DIRECTORY}/examples/simdag/sd_seq_access.exe")
60
61 endif(NOT WIN32)
62