Skip to content
Snippets Groups Projects
wscript 2.86 KiB
Newer Older
#!/usr/bin/env python
Yannik Stradmann's avatar
Yannik Stradmann committed
from waflib.extras.test_base import summary

def depends(dep):
    dep('lib-rcf')
    dep.recurse('pyflange')
    dep.recurse('pyhxcomm')
Yannik Stradmann's avatar
Yannik Stradmann committed
def options(opt):
    opt.load('compiler_c')
    opt.load('compiler_cxx')
    opt.load('boost')
Yannik Stradmann's avatar
Yannik Stradmann committed
    opt.load("test_base")
    opt.load("gtest")
    opt.recurse('pyflange')
    opt.recurse('pyhxcomm')
def configure(conf):
    conf.load('compiler_c')
    conf.load('compiler_cxx')
    conf.load('boost')
    conf.check_boost(lib='program_options system', uselib_store='BOOST4HXCOMM')
    conf.load("test_base")
    conf.load("gtest")
    conf.recurse('pyflange')
    conf.recurse('pyhxcomm')
def build(bld):
    bld(target          = 'hx_comm_inc',
        export_includes = 'include'
    )

    bld(target          = 'flange_inc',
        export_includes = 'include'
    )

    bld.shlib(
        target       = 'hx_comm',
        features     = 'cxx',
        source       = bld.path.ant_glob('src/hxcomm/*.cpp'),
        use          = ['hx_comm_inc', 'arqstream_obj', 'BOOST4HXCOMM', 'rcf-sf-only',
                        'flange'],
        install_path = '${PREFIX}/lib',
    )

    bld.shlib(
        features     = 'cxx',
        source       = bld.path.ant_glob('src/flange/*.cpp'),
        use          = ['flange_inc', 'rcf-sf-only'],
        install_path = '${PREFIX}/lib',
    bld(
        target       = 'hx_comm_example_arq',
        features     = 'cxx cxxprogram',
        source       = ['example/hx_comm_arq.cpp'],
        use          = ['hx_comm'],
        install_path = '${PREFIX}/bin',
    )

    bld(
        target       = 'hx_comm_example_sim',
        features     = 'cxx cxxprogram',
        source       = ['example/hx_comm_sim.cpp'],
        use          = ['hx_comm'],
        install_path = '${PREFIX}/bin',
    )
    bld(
        target       = 'hx_comm_example_pipe',
        features     = 'cxx cxxprogram',
        source       = ['example/hx_comm_pipe.cpp'],
        use          = ['hx_comm'],
        install_path = '${PREFIX}/bin',
    )

        target       = 'hx_comm_swtests',
        features     = 'gtest cxx cxxprogram',
        source       = bld.path.ant_glob('tests/sw/hxcomm/test-*.cpp'),
        use          = ['hx_comm'],
    )

    bld(
        target       = 'hx_comm_hwtests',
        features     = 'gtest cxx cxxprogram',
        source       = bld.path.ant_glob('tests/hw/hxcomm/test-*.cpp'),
        skip_run     = True,
        use          = ['hx_comm'],
    )

    bld(
        target       = 'flange_swtests',
        features     = 'gtest cxx cxxprogram',
        source       = bld.path.ant_glob('tests/sw/flange/test-*.cpp'),
    bld.recurse('pyflange')
    bld.recurse('pyhxcomm')

    # Create test summary (to stdout and XML file)
    bld.add_post_fun(summary)


Yannik Stradmann's avatar
Yannik Stradmann committed
def doc(dox):
    pass