-add_executable(spawn_simulator _spawn_simulator.c spawn_father.c spawn_child.c spawn_common.c)
-add_executable(spawn_child _spawn_child.c spawn_child.c spawn_common.c)
-add_executable(spawn_father _spawn_father.c spawn_father.c spawn_child.c spawn_common.c)
+add_executable(spawn_simulator ${CMAKE_CURRENT_BINARY_DIR}/_spawn_simulator.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/spawn_father.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/spawn_child.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/spawn_common.c)
+add_executable(spawn_child ${CMAKE_CURRENT_BINARY_DIR}/_spawn_child.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/spawn_child.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/spawn_common.c)
+add_executable(spawn_father ${CMAKE_CURRENT_BINARY_DIR}/_spawn_father.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/spawn_father.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/spawn_child.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/spawn_common.c)