)
string(REPLACE ".c" "" TARGET_NAME ${SOURCE_FILE})
-#########################
-# add_executable #
-# args1 target name #
-# args2 sources #
-#########################
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 simgrid and pcre
- target_link_libraries(${target} simgrid pcre)
+ target_link_libraries(${target} simgrid pcre pthread)
endforeach(target ${SOURCE_FILE})