Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change flatifier for having router.
[simgrid.git] / teshsuite / gras / empty_main / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/_empty_main_function.c
4                                                         ${CMAKE_CURRENT_BINARY_DIR}/_empty_main_simulator.c
5                                                         PROPERTIES GENERATED true)
6
7 set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
8
9 add_executable(empty_main_function      ${CMAKE_CURRENT_SOURCE_DIR}/empty_main.c
10                                                                         ${CMAKE_CURRENT_BINARY_DIR}/_empty_main_function.c)
11 add_executable(empty_main_simulator     ${CMAKE_CURRENT_SOURCE_DIR}/empty_main.c
12                                                                                 ${CMAKE_CURRENT_BINARY_DIR}/_empty_main_simulator.c)
13
14 add_custom_command(
15                                         OUTPUT  ${CMAKE_CURRENT_BINARY_DIR}/_empty_main_function.c
16                                                         ${CMAKE_CURRENT_BINARY_DIR}/_empty_main_simulator.c
17                                         DEPENDS gras_stub_generator ${CMAKE_CURRENT_SOURCE_DIR}/empty_main.xml
18                                         COMMAND ${CMAKE_BINARY_DIR}/bin/gras_stub_generator empty_main ${CMAKE_CURRENT_SOURCE_DIR}/empty_main.xml
19                                         )
20                                         
21 ### Add definitions for compile
22 if(NOT WIN32)
23 target_link_libraries(empty_main_simulator simgrid m pthread)
24 target_link_libraries(empty_main_function gras m pthread)
25 else(NOT WIN32)
26 target_link_libraries(empty_main_simulator simgrid)
27 target_link_libraries(empty_main_function gras)
28 endif(NOT WIN32)