Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
woopsy, broke make distcheck. Again.
[simgrid.git] / examples / java / cloud / energy / CMakeLists.txt
1 set(example java_cloud_energy)
2 set(sources ${CMAKE_CURRENT_SOURCE_DIR}/Main.java
3             ${CMAKE_CURRENT_SOURCE_DIR}/EnergyVMRunner.java)
4
5 if(enable_java)
6   add_custom_command(
7     COMMENT "Building ${example}..."
8     OUTPUT ${example}_compiled
9     DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
10     COMMAND ${JAVA_COMPILE} -classpath ${SIMGRID_JAR}
11                              -d ${CMAKE_CURRENT_BINARY_DIR}/../.. ${sources}
12     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
13     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
14   )
15   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
16 endif()
17
18 set(tesh_files
19   ${tesh_files}
20   ${CMAKE_CURRENT_SOURCE_DIR}/energy.tesh
21   PARENT_SCOPE)
22 set(xml_files
23   ${xml_files}
24   PARENT_SCOPE)
25 set(examples_src
26   ${examples_src}
27   ${sources}
28   PARENT_SCOPE)