X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2e9105988280d1e88b5b496d6e2eed4c8d541883..03b24e261031cc8cfc835e0bb9f7c388f143da3e:/examples/java/tracing/CMakeLists.txt diff --git a/examples/java/tracing/CMakeLists.txt b/examples/java/tracing/CMakeLists.txt index f035001a36..8a18864c51 100644 --- a/examples/java/tracing/CMakeLists.txt +++ b/examples/java/tracing/CMakeLists.txt @@ -1,47 +1,19 @@ -cmake_minimum_required(VERSION 2.6) - set(example java_tracing) -set(sources - ${CMAKE_CURRENT_SOURCE_DIR}/PingPongTask.java - ${CMAKE_CURRENT_SOURCE_DIR}/Receiver.java - ${CMAKE_CURRENT_SOURCE_DIR}/Sender.java - ${CMAKE_CURRENT_SOURCE_DIR}/TracingTest.java - ) +set(sources ${CMAKE_CURRENT_SOURCE_DIR}/PingPongTask.java ${CMAKE_CURRENT_SOURCE_DIR}/Receiver.java + ${CMAKE_CURRENT_SOURCE_DIR}/Sender.java ${CMAKE_CURRENT_SOURCE_DIR}/TracingTest.java) if(enable_java) add_custom_command( COMMENT "Building ${example}..." OUTPUT ${example}_compiled - DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR} - COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR} - -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources} + DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR} + COMMAND ${JAVA_COMPILE} -classpath ${SIMGRID_JAR} -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources} COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled - ) + ) add_custom_target(${example} ALL DEPENDS ${example}_compiled) endif() -set(tesh_files - ${tesh_files} - ${CMAKE_CURRENT_SOURCE_DIR}/tracingPingPong.tesh - PARENT_SCOPE - ) -set(xml_files - ${xml_files} - ${CMAKE_CURRENT_SOURCE_DIR}/tracingPingPongDeployment.xml - PARENT_SCOPE - ) -set(examples_src - ${examples_src} - ${sources} - PARENT_SCOPE - ) -set(bin_files - ${bin_files} - PARENT_SCOPE - ) -set(txt_files - ${txt_files} - ${CMAKE_CURRENT_SOURCE_DIR}/README - PARENT_SCOPE - ) +set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/tracingPingPong.tesh PARENT_SCOPE) +set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/tracingPingPongDeployment.xml PARENT_SCOPE) +set(examples_src ${examples_src} ${sources} PARENT_SCOPE)