Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
shrinking cmake in java examples
[simgrid.git] / examples / java / pingPong / CMakeLists.txt
1 set(example java_pingPong)
2 set(sources ${CMAKE_CURRENT_SOURCE_DIR}/PingPongTest.java ${CMAKE_CURRENT_SOURCE_DIR}/PingPongTask.java
3             ${CMAKE_CURRENT_SOURCE_DIR}/Receiver.java     ${CMAKE_CURRENT_SOURCE_DIR}/Sender.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 endif()
16
17 set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/pingpong.tesh           PARENT_SCOPE)
18 set(xml_files     ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/pingPongDeployment.xml  PARENT_SCOPE)
19 set(examples_src  ${examples_src}  ${sources}                                          PARENT_SCOPE)