Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
54b10294bfde2963d6a031784e43b98d66cbc22e
[simgrid.git] / examples / scala / masterslave / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 set(example scala_masterslave)
4 set(sources
5   ${CMAKE_CURRENT_SOURCE_DIR}/FinalizeTask.scala
6   ${CMAKE_CURRENT_SOURCE_DIR}/Forwarder.scala
7   ${CMAKE_CURRENT_SOURCE_DIR}/Master.scala
8   ${CMAKE_CURRENT_SOURCE_DIR}/Masterslave.scala
9   ${CMAKE_CURRENT_SOURCE_DIR}/Slave.scala
10   )
11
12 if(enable_scala)
13   add_custom_command(
14     COMMENT "Building ${example}..."
15     OUTPUT ${example}_compiled
16     DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
17     COMMAND ${SCALA_COMPILE} -cp ${SIMGRID_JAR}
18                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
19     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
20     COMMAND ${CMAKE_COMMAND} -E touch ${example}_compiled
21   )
22   add_custom_target(${example} ALL DEPENDS ${example}_compiled)
23 endif()
24
25 set(tesh_files
26   ${tesh_files}
27   ${CMAKE_CURRENT_SOURCE_DIR}/masterslave.tesh
28   PARENT_SCOPE
29   )
30 set(xml_files
31   ${xml_files}
32   ${CMAKE_CURRENT_SOURCE_DIR}/deploy.xml
33   ${CMAKE_CURRENT_SOURCE_DIR}/masterslaveDeployment.xml
34   PARENT_SCOPE
35   )
36 set(examples_src
37   ${examples_src}
38   ${sources}
39   PARENT_SCOPE
40   )
41 set(bin_files
42   ${bin_files}
43   PARENT_SCOPE
44   )
45 set(txt_files
46   ${txt_files}
47   ${CMAKE_CURRENT_SOURCE_DIR}/README
48   PARENT_SCOPE
49   )