## iostream transport unit tests
##

Import('env')
Import('env_cpp11')
Import('boostlibs')
Import('platform_libs')
Import('polyfill_libs')

env = env.Clone ()
env_cpp11 = env_cpp11.Clone ()

BOOST_LIBS = boostlibs(['unit_test_framework','system'],env) + [platform_libs]

objs = env.Object('iostream_base_boost.o', ["base.cpp"], LIBS = BOOST_LIBS)
objs += env.Object('iostream_connection_boost.o', ["connection.cpp"], LIBS = BOOST_LIBS)
objs += env.Object('iostream_endpoint_boost.o', ["endpoint.cpp"], LIBS = BOOST_LIBS)
prgs = env.Program('test_iostream_base_boost', ["iostream_base_boost.o"], LIBS = BOOST_LIBS)
prgs += env.Program('test_iostream_connection_boost', ["iostream_connection_boost.o"], LIBS = BOOST_LIBS)
prgs += env.Program('test_iostream_endpoint_boost', ["iostream_endpoint_boost.o"], LIBS = BOOST_LIBS)

if env_cpp11.has_key('WSPP_CPP11_ENABLED'):
   BOOST_LIBS_CPP11 = boostlibs(['unit_test_framework'],env_cpp11) + [platform_libs] + [polyfill_libs]
   objs += env_cpp11.Object('iostream_base_stl.o', ["base.cpp"], LIBS = BOOST_LIBS_CPP11)
   objs += env_cpp11.Object('iostream_connection_stl.o', ["connection.cpp"], LIBS = BOOST_LIBS_CPP11)
   objs += env_cpp11.Object('iostream_endpoint_stl.o', ["endpoint.cpp"], LIBS = BOOST_LIBS_CPP11)
   prgs += env_cpp11.Program('test_iostream_base_stl', ["iostream_base_stl.o"], LIBS = BOOST_LIBS_CPP11)
   prgs += env_cpp11.Program('test_iostream_connection_stl', ["iostream_connection_stl.o"], LIBS = BOOST_LIBS_CPP11)
   prgs += env_cpp11.Program('test_iostream_endpoint_stl', ["iostream_endpoint_stl.o"], LIBS = BOOST_LIBS_CPP11)

Return('prgs')
