From 5adf5015df8b7e0daff433f7da4f2501a5fb6e69 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Mon, 19 May 2014 10:17:01 +0200 Subject: [PATCH] Disable tracing tests when !HAVE_TRACING. --- examples/java/tracing/CMakeLists.txt | 38 +++++++++++++++------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/examples/java/tracing/CMakeLists.txt b/examples/java/tracing/CMakeLists.txt index 562f1614dd..26d6584048 100644 --- a/examples/java/tracing/CMakeLists.txt +++ b/examples/java/tracing/CMakeLists.txt @@ -1,24 +1,26 @@ 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 - ) +if(HAVE_TRACING) + 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 + ) -if(enable_java) - add_custom_command( - COMMENT "Building ${example}..." - OUTPUT ${example}_compiled - 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) + if(enable_java) + add_custom_command( + COMMENT "Building ${example}..." + OUTPUT ${example}_compiled + 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() endif() set(tesh_files -- 2.20.1