-#########################
-# add_executable #
-# args1 target name #
-# args2 sources #
-#########################
-add_executable(HelloWorld HelloWorld.c)
-# Any targets need to be linked with simgrid and pcre
-target_link_libraries(HelloWorld simgrid pcre)
+foreach(target "${TARGET_NAME}")
+ add_executable(${target} "${target}.c")
+ message(STATUS "source_file: ${target}.c")
+ message(STATUS "target name: ${target}.exe")
+ # Any targets need to be linked with libraries
+ target_link_libraries(${target} ${LIBRARIES_DEP})
+endforeach(target ${SOURCE_FILE})