Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
7f5a91603efe7b6b21f6be383bc967a522e1cd51
[simgrid.git] / teshsuite / gras / msg_handle / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/_msg_handle_simulator.c
4   ${CMAKE_CURRENT_BINARY_DIR}/_msg_handle_client.c
5   ${CMAKE_CURRENT_BINARY_DIR}/_msg_handle_server.c
6   PROPERTIES GENERATED true)
7
8 set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
9
10 add_executable(msg_handle_simulator ${CMAKE_CURRENT_SOURCE_DIR}/msg_handle.c
11   ${CMAKE_CURRENT_BINARY_DIR}/_msg_handle_simulator.c)
12 add_executable(msg_handle_client        ${CMAKE_CURRENT_SOURCE_DIR}/msg_handle.c
13   ${CMAKE_CURRENT_BINARY_DIR}/_msg_handle_client.c)
14 add_executable(msg_handle_server        ${CMAKE_CURRENT_SOURCE_DIR}/msg_handle.c
15   ${CMAKE_CURRENT_BINARY_DIR}/_msg_handle_server.c)
16
17 add_custom_command(
18   OUTPUT        ${CMAKE_CURRENT_BINARY_DIR}/_msg_handle_simulator.c
19   ${CMAKE_CURRENT_BINARY_DIR}/_msg_handle_client.c
20   ${CMAKE_CURRENT_BINARY_DIR}/_msg_handle_server.c
21   DEPENDS gras_stub_generator ${CMAKE_CURRENT_SOURCE_DIR}/msg_handle.xml
22   COMMAND ${CMAKE_BINARY_DIR}/bin/gras_stub_generator msg_handle ${CMAKE_CURRENT_SOURCE_DIR}/msg_handle.xml
23   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
24   )
25
26 ### Add definitions for compile
27 if(NOT WIN32)
28   target_link_libraries(msg_handle_simulator simgrid m pthread )
29   target_link_libraries(msg_handle_client gras m pthread )
30   target_link_libraries(msg_handle_server gras m pthread )
31 else()
32   target_link_libraries(msg_handle_simulator simgrid)
33   target_link_libraries(msg_handle_client gras)
34   target_link_libraries(msg_handle_server gras)
35 endif()
36
37 set(tesh_files
38   ${tesh_files}
39   ${CMAKE_CURRENT_SOURCE_DIR}/test_rl.tesh
40   ${CMAKE_CURRENT_SOURCE_DIR}/test_sg_32.tesh
41   ${CMAKE_CURRENT_SOURCE_DIR}/test_sg_64.tesh
42   PARENT_SCOPE
43   )
44 set(xml_files
45   ${xml_files}
46   ${CMAKE_CURRENT_SOURCE_DIR}/msg_handle.xml
47   PARENT_SCOPE
48   )
49 set(teshsuite_src
50   ${teshsuite_src}
51   ${CMAKE_CURRENT_SOURCE_DIR}/msg_handle.c
52   PARENT_SCOPE
53   )
54 set(bin_files
55   ${bin_files}
56   PARENT_SCOPE
57   )
58 set(txt_files
59   ${txt_files}
60   PARENT_SCOPE
61   )