Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Disable tracing tests when !HAVE_TRACING.
[simgrid.git] / examples / java / tracing / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 if(HAVE_TRACING)
4   set(example java_tracing)
5   set(sources
6     ${CMAKE_CURRENT_SOURCE_DIR}/PingPongTask.java
7     ${CMAKE_CURRENT_SOURCE_DIR}/Receiver.java
8     ${CMAKE_CURRENT_SOURCE_DIR}/Sender.java
9     ${CMAKE_CURRENT_SOURCE_DIR}/TracingTest.java
10     )
11
12   if(enable_java)
13     add_custom_command(
14       COMMENT "Building ${example}..."
15       OUTPUT ${example}_compiled
16       DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
17       COMMAND ${JAVA_COMPILE} -classpath ${SIMGRID_JAR}
18                               -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
19       COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
20       COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
21       )
22     add_custom_target(${example} ALL DEPENDS ${example}_compiled)
23   endif()
24 endif()
25
26 set(tesh_files
27   ${tesh_files}
28   ${CMAKE_CURRENT_SOURCE_DIR}/tracingPingPong.tesh
29   PARENT_SCOPE
30   )
31 set(xml_files
32   ${xml_files}
33   ${CMAKE_CURRENT_SOURCE_DIR}/tracingPingPongDeployment.xml
34   PARENT_SCOPE
35   )
36 set(examples_src
37   ${examples_src}
38   ${sources}
39   PARENT_SCOPE
40   )
41 set(bin_files
42   ${bin_files}
43   PARENT_SCOPE
44   )
45 set(txt_files
46   ${txt_files}
47   ${CMAKE_CURRENT_SOURCE_DIR}/README
48   PARENT_SCOPE
49   )