Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add a new target to build all Java examples and their dependencies
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 5 Aug 2018 00:35:43 +0000 (02:35 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 5 Aug 2018 00:35:43 +0000 (02:35 +0200)
examples/java/CMakeLists.txt

index 0e1967b..768f22c 100644 (file)
@@ -24,6 +24,11 @@ set(process-startkilltime_files Main  Sleeper)
 set(process-suspend_files       Main  DreamMaster  LazyGuy)
 set(task-priority_files         Main  Test)
 
 set(process-suspend_files       Main  DreamMaster  LazyGuy)
 set(task-priority_files         Main  Test)
 
+if(enable_java)
+  add_custom_target(java-all
+    COMMENT "Building all Java examples..."
+  )
+endif()
 
 foreach (example app-bittorrent app-centralizedmutex app-masterworker app-pingpong app-tokenring async-yield async-waitall async-dsend
          cloud-migration cloud-masterworker dht-chord dht-kademlia energy-consumption energy-pstate energy-vm io-file io-storage
 
 foreach (example app-bittorrent app-centralizedmutex app-masterworker app-pingpong app-tokenring async-yield async-waitall async-dsend
          cloud-migration cloud-masterworker dht-chord dht-kademlia energy-consumption energy-pstate energy-vm io-file io-storage
@@ -45,6 +50,7 @@ foreach (example app-bittorrent app-centralizedmutex app-masterworker app-pingpo
       COMMAND ${CMAKE_COMMAND} -E touch ${example_dir}/java-${example}_compiled
     )
     add_custom_target(java-${example} ALL DEPENDS ${example_dir}/java-${example}_compiled)
       COMMAND ${CMAKE_COMMAND} -E touch ${example_dir}/java-${example}_compiled
     )
     add_custom_target(java-${example} ALL DEPENDS ${example_dir}/java-${example}_compiled)
+    add_dependencies(java-all java-${example})
   endif()
   set(examples_src  ${examples_src}  ${${example}_sources})
   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${example_dir}/${example}.tesh)
   endif()
   set(examples_src  ${examples_src}  ${${example}_sources})
   set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${example_dir}/${example}.tesh)