Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
have a try with foreach in CMakeLists
[simgrid.git] / teshsuite / msg / host_on_off / CMakeLists.txt
index 2f60d1e..febf151 100644 (file)
@@ -1,21 +1,12 @@
 foreach(x host_on_off host_on_off_wait host_on_off_recv)
   add_executable       (${x} ${x}.c)
   target_link_libraries(${x} simgrid)
+
+  set(tesh_files    ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/${x}.tesh  PARENT_SCOPE)
+  set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}.c     PARENT_SCOPE)
+
+  ADD_TESH_FACTORIES(tesh-msg-${x} "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x} --cd ${CMAKE_BINARY_DIR}/teshsuite/msg/${x} ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/${x}/${x}.tesh)
 endforeach()
 
-set(tesh_files
-  ${tesh_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_wait.tesh
-  ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_recv.tesh
-  PARENT_SCOPE)
-set(teshsuite_src
-  ${teshsuite_src}
-  ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_wait.c
-  ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_recv.c
-  PARENT_SCOPE)
-set(xml_files
-  ${xml_files}
-  ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_d.xml
-  PARENT_SCOPE)
+set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/host_on_off_d.xml PARENT_SCOPE)
+