add_library(network network-common.c)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
  set_target_properties(network PROPERTIES COMPILE_DEFINITIONS "_BSD_SOURCE;_POSIX_C_SOURCE")
endif()
add_executable(echo-server echo-server.c)
target_link_libraries(echo-server network)
add_executable(echo-client echo-client.c)
target_link_libraries(echo-client network)


add_library(network network-common.c)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
  set_target_properties(network PROPERTIES COMPILE_DEFINITIONS "_BSD_SOURCE;_POSIX_C_SOURCE")
endif()
add_executable(echo-server echo-server.c)
target_link_libraries(echo-server network)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
  set_target_properties(network PROPERTIES COMPILE_DEFINITIONS "_POSIX_C_SOURCE")
endif()
add_executable(echo-client echo-client.c)
target_link_libraries(echo-client network)


Add _POSIX_C_SOURCE feature macro to echo-server
Add _POSIX_C_SOURCE feature macro to echo-server
