Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of github.com:mquinson/simgrid
[simgrid.git] / examples / java / energy / CMakeLists.txt
1 set(example java_energy)
2 set(sources
3   ${CMAKE_CURRENT_SOURCE_DIR}/EnergyConsumer.java
4   ${CMAKE_CURRENT_SOURCE_DIR}/Energy.java
5   )
6
7 if(enable_java)
8   add_custom_command(
9     COMMENT "Building ${example}..."
10     OUTPUT ${example}_compiled
11     DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
12     COMMAND ${JAVA_COMPILE} -classpath ${SIMGRID_JAR}
13                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
14     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
15     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
16   )
17   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
18 endif()
19
20 set(tesh_files
21   ${tesh_files}
22   ${CMAKE_CURRENT_SOURCE_DIR}/energy.tesh
23   PARENT_SCOPE
24   )
25 set(xml_files
26   ${xml_files}
27   ${CMAKE_CURRENT_SOURCE_DIR}/energyDeployment.xml
28   PARENT_SCOPE
29   )
30 set(examples_src
31   ${examples_src}
32   ${sources}
33   PARENT_SCOPE
34   )
35 set(bin_files
36   ${bin_files}
37   PARENT_SCOPE
38   )
39 set(txt_files
40   ${txt_files}
41   ${CMAKE_CURRENT_SOURCE_DIR}/README
42   PARENT_SCOPE
43   )