Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
3ed17582b562c2c919615fa1f83ab9679f533242
[simgrid.git] / tools / tesh / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 if(WIN32)
4 #  add_custom_target(tesh ALL
5 #    DEPENDS ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl
6 #    COMMENT "Install ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl"
7 #    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl ${CMAKE_BINARY_DIR}/bin/tesh
8 #    )
9     configure_file("${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl"
10   "${CMAKE_BINARY_DIR}/bin/tesh" @ONLY IMMEDIATE)
11
12     file(COPY        ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/Diff.pm 
13          DESTINATION ${CMAKE_BINARY_DIR}/bin
14          FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
15                           GROUP_EXECUTE GROUP_READ)
16
17 else()
18   set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
19
20   add_executable(tesh tesh.c run_context.c signal.c)
21
22   ### Add definitions for compile
23   target_link_libraries(tesh simgrid m pthread)
24 endif()
25
26 set(tesh_files
27   ${tesh_files}
28   ${CMAKE_CURRENT_SOURCE_DIR}/setenv.tesh
29   ${CMAKE_CURRENT_SOURCE_DIR}/set-ignore-output.tesh
30   ${CMAKE_CURRENT_SOURCE_DIR}/set-return.tesh
31   ${CMAKE_CURRENT_SOURCE_DIR}/set-signal.tesh
32   ${CMAKE_CURRENT_SOURCE_DIR}/set-timeout.tesh
33   ${CMAKE_CURRENT_SOURCE_DIR}/background.tesh
34   ${CMAKE_CURRENT_SOURCE_DIR}/basic2.tesh
35   ${CMAKE_CURRENT_SOURCE_DIR}/basic.tesh
36   ${CMAKE_CURRENT_SOURCE_DIR}/bg-basic.tesh
37   ${CMAKE_CURRENT_SOURCE_DIR}/bg-set-signal.tesh
38   ${CMAKE_CURRENT_SOURCE_DIR}/catch-return.tesh
39   ${CMAKE_CURRENT_SOURCE_DIR}/catch-signal.tesh
40   ${CMAKE_CURRENT_SOURCE_DIR}/catch-timeout.tesh
41   ${CMAKE_CURRENT_SOURCE_DIR}/catch-wrong-output.tesh
42   ${CMAKE_CURRENT_SOURCE_DIR}/cd.tesh
43   ${CMAKE_CURRENT_SOURCE_DIR}/IO-bigsize.tesh
44   ${CMAKE_CURRENT_SOURCE_DIR}/IO-broken-pipe.tesh
45   ${CMAKE_CURRENT_SOURCE_DIR}/IO-orders.tesh
46   PARENT_SCOPE
47   )
48 set(xml_files
49   ${xml_files}
50   PARENT_SCOPE
51   )
52 set(tools_src
53   ${tools_src}
54   ${CMAKE_CURRENT_SOURCE_DIR}/run_context.c
55   ${CMAKE_CURRENT_SOURCE_DIR}/run_context.h
56   ${CMAKE_CURRENT_SOURCE_DIR}/signal.c
57   ${CMAKE_CURRENT_SOURCE_DIR}/tesh.c
58   ${CMAKE_CURRENT_SOURCE_DIR}/tesh.h
59   PARENT_SCOPE
60   )
61 set(bin_files
62   ${bin_files}
63   ${CMAKE_CURRENT_SOURCE_DIR}/colorize.pl
64   PARENT_SCOPE
65   )
66 set(txt_files
67   ${txt_files}
68   ${CMAKE_CURRENT_SOURCE_DIR}/README
69   ${CMAKE_CURRENT_SOURCE_DIR}/tesh.1
70   PARENT_SCOPE
71   )