Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Run Java tests from build directory, instead of source directory.
[simgrid.git] / examples / java / priority / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 set(example java_priority)
4 set(sources
5   ${CMAKE_CURRENT_SOURCE_DIR}/Priority.java
6   ${CMAKE_CURRENT_SOURCE_DIR}/Test.java
7   )
8
9 if(enable_java)
10   add_custom_command(
11     COMMENT "Building ${example}..."
12     OUTPUT ${example}_compiled
13     DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
14     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
15                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
16     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
17     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
18   )
19   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
20 endif()
21
22 set(tesh_files
23   ${tesh_files}
24   ${CMAKE_CURRENT_SOURCE_DIR}/priority.tesh
25   PARENT_SCOPE
26   )
27 set(xml_files
28   ${xml_files}
29   ${CMAKE_CURRENT_SOURCE_DIR}/priorityDeployment.xml
30   PARENT_SCOPE
31   )
32 set(examples_src
33   ${examples_src}
34   ${sources}
35   PARENT_SCOPE
36   )
37 set(bin_files
38   ${bin_files}
39   PARENT_SCOPE
40   )
41 set(txt_files
42   ${txt_files}
43   PARENT_SCOPE
44   )