X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4954e55da24797b576b6cf1dc74f09fd77824d2e..81c3c0394f8a6fa6ef9fbad74529ce5a82081c2a:/examples/java/migration/CMakeLists.txt diff --git a/examples/java/migration/CMakeLists.txt b/examples/java/migration/CMakeLists.txt index 180279547b..383a02d2a1 100644 --- a/examples/java/migration/CMakeLists.txt +++ b/examples/java/migration/CMakeLists.txt @@ -1,5 +1,6 @@ cmake_minimum_required(VERSION 2.6) +set(example java_migration) set(sources ${CMAKE_CURRENT_SOURCE_DIR}/Emigrant.java ${CMAKE_CURRENT_SOURCE_DIR}/Migration.java @@ -7,11 +8,15 @@ set(sources ) if(enable_java) - add_custom_target(java_migration ALL - COMMENT "Building java_migration..." - COMMAND ${JAVA_COMPILE} -cp ${CMAKE_BINARY_DIR}/simgrid.jar - -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}) - add_dependencies(java_migration SG_java_jar) + add_custom_command( + COMMENT "Building ${example}..." + OUTPUT ${example}_compiled + DEPENDS ${sources} ${SIMGRID_JAR} + COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR} + -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources} + COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled + ) + add_custom_target(${example} ALL DEPENDS ${example}_compiled) endif() set(tesh_files