From f0eee002b188ccbadba97e527ce6765cd6bfffe7 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 5 Aug 2018 02:35:43 +0200 Subject: [PATCH] add a new target to build all Java examples and their dependencies --- examples/java/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/java/CMakeLists.txt b/examples/java/CMakeLists.txt index 0e1967b218..768f22cef3 100644 --- a/examples/java/CMakeLists.txt +++ b/examples/java/CMakeLists.txt @@ -24,6 +24,11 @@ set(process-startkilltime_files Main Sleeper) 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 @@ -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) + 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) -- 2.20.1