Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cleanups in java examples (2/2)
[simgrid.git] / examples / java / cloud / energy / CMakeLists.txt
1 set(example java_cloud_energy)
2 set(sources
3   ${CMAKE_CURRENT_SOURCE_DIR}/Main.java
4   ${CMAKE_CURRENT_SOURCE_DIR}/EnergyVMRunner.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 set(xml_files
25   ${xml_files}
26   PARENT_SCOPE)
27 set(examples_src
28   ${examples_src}
29   ${sources}
30   PARENT_SCOPE)