Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
37ec7d4d92c3a83f6d1967b97fd10b160acf30dc
[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_seq_access sd_seq_access.c)
8 add_executable(sd_test_console sd_test_console.c)
9 add_executable(simdag_tracing simdag_trace.c)
10
11 ### Add definitions for compile
12 if(NOT WIN32)
13         target_link_libraries(ex_sd_test simgrid pthread m )
14         target_link_libraries(sd_test2 simgrid pthread m )
15         target_link_libraries(sd_seq_access simgrid pthread m )
16         target_link_libraries(sd_test_console simgrid pthread m )
17         target_link_libraries(simdag_tracing simgrid pthread m )
18         
19         add_custom_command(TARGET ex_sd_test
20                 POST_BUILD
21                 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/ex_sd_test ${CMAKE_CURRENT_BINARY_DIR}/sd_test
22                 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
23         )
24         get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
25         set_directory_properties(
26          PROPERTIES
27          ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${CMAKE_CURRENT_BINARY_DIR}/sd_test")
28  
29 else(NOT WIN32)
30         target_link_libraries(ex_sd_test simgrid)
31         target_link_libraries(sd_test2 simgrid)
32         target_link_libraries(sd_seq_access simgrid)
33         target_link_libraries(sd_test_console simgrid)
34         target_link_libraries(simdag_tracing simgrid)
35         
36         add_custom_command(TARGET ex_sd_test
37                 POST_BUILD
38                 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/ex_sd_test.exe ${CMAKE_CURRENT_BINARY_DIR}/sd_test.exe
39                 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
40         )
41         get_directory_property(extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
42         set_directory_properties(
43          PROPERTIES
44          ADDITIONAL_MAKE_CLEAN_FILES "${extra_clean_files};${CMAKE_CURRENT_BINARY_DIR}/sd_test.exe")
45 endif(NOT WIN32)
46