-cmake_minimum_required(VERSION 2.6)
-
-set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
-
-add_executable(host_on_off host_on_off.c)
-
-### Add definitions for compile
-target_link_libraries(host_on_off simgrid)
+foreach(x host_on_off host_on_off_wait host_on_off_recv)
+ add_executable (${x} ${x}.c)
+ target_link_libraries(${x} simgrid)
+endforeach()