Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix dependencies for Java and its examples.
[simgrid.git] / examples / java / suspend / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 set(example java_suspend)
4 set(sources
5   ${CMAKE_CURRENT_SOURCE_DIR}/DreamMaster.java
6   ${CMAKE_CURRENT_SOURCE_DIR}/LazyGuy.java
7   ${CMAKE_CURRENT_SOURCE_DIR}/Suspend.java
8   )
9
10 if(enable_java)
11   add_custom_command(
12     COMMENT "Building ${example}..."
13     OUTPUT ${example}_compiled
14     DEPENDS ${sources} ${SIMGRID_JAR}
15     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
16                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
17     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
18   )
19   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
20 endif()
21
22 set(tesh_files
23   ${tesh_files}
24   ${CMAKE_CURRENT_SOURCE_DIR}/suspend.tesh
25   PARENT_SCOPE
26   )
27 set(xml_files
28   ${xml_files}
29   ${CMAKE_CURRENT_SOURCE_DIR}/suspendDeployment.xml
30   PARENT_SCOPE
31   )
32 set(examples_src
33   ${examples_src}
34   ${sources}
35   PARENT_SCOPE
36   )
37 set(bin_files
38   ${bin_files}
39   PARENT_SCOPE
40   )
41 set(txt_files
42   ${txt_files}
43   PARENT_SCOPE
44   )