Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
package energy
[simgrid.git] / examples / java / io / CMakeLists.txt
1 set(example java_io)
2 set(sources ${CMAKE_CURRENT_SOURCE_DIR}/IO.java       ${CMAKE_CURRENT_SOURCE_DIR}/Node.java
3             ${CMAKE_CURRENT_SOURCE_DIR}/Storage.java  ${CMAKE_CURRENT_SOURCE_DIR}/Client.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} -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
11     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
12     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
13   )
14   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
15   ADD_TESH(java-storage --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/java --setenv classpath=${TESH_CLASSPATH} --cd ${CMAKE_BINARY_DIR}/examples/java ${CMAKE_HOME_DIRECTORY}/examples/java/io/storage.tesh)
16 endif()
17
18 set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/storage.tesh  PARENT_SCOPE)
19 set(examples_src  ${examples_src}  ${sources}                                PARENT_SCOPE)