Esempio n. 1
0
    def test_load_store_simple(self):
        """Test one can load and store the contexts."""
        ctx = get_cfg()
        ctx.store()

        ctx = get_bld()
        ctx.store()
Esempio n. 2
0
    def test_load_store_simple(self):
        """Test one can load and store the contexts."""
        ctx = get_cfg()
        ctx.store()

        ctx = get_bld()
        ctx.store()
Esempio n. 3
0
    def setUp(self):
        super(TestBuildYaku, self).setUp()

        ctx = get_cfg()
        ctx.use_tools(["ctasks", "pyext"])
        ctx.store()

        self.yaku_build = get_bld()

        self._configure_context = ConfigureYakuContext
        self._build_context = BuildYakuContext
Esempio n. 4
0
import yaku.task_manager

from yaku.task_manager import get_extension_hook, set_file_hook
from yaku.context import get_cfg, get_bld
from yaku.scheduler import run_tasks

def file_hook(self, node):
    print("Yo mama", node.name)
    return get_extension_hook(".c")(self, node)

def configure(ctx):
    ctx.use_tools(["ctasks"])
    set_file_hook(ctx, "src/fubar.c", file_hook)

def build(ctx):
    builder = ctx.builders["ctasks"].program
    builder("src/main", sources=["src/main.c", "src/fubar.c"])

if __name__ == "__main__":
    cfg = get_cfg()
    configure(cfg)
    cfg.store()

    bld = get_bld()
    build(bld)
    run_tasks(bld)
    bld.store()
Esempio n. 5
0
    import \
        get_bld, get_cfg

from yaku.conftests.fconftests \
    import \
        check_fcompiler, check_fortran_verbose_flag, \
        check_fortran_runtime_flags, check_fortran_dummy_main, \
        check_fortran_mangling

def configure(ctx):
    ctx.use_tools(["fortran", "ctasks"])
    check_fcompiler(ctx)
    check_fortran_verbose_flag(ctx)
    check_fortran_runtime_flags(ctx)
    check_fortran_dummy_main(ctx)
    check_fortran_mangling(ctx)

def build(ctx):
    builder = ctx.builders["fortran"]
    #builder.program("fbar", ["src/bar.f"])

if __name__ == "__main__":
    ctx = get_cfg()
    configure(ctx)
    ctx.store()

    ctx = get_bld()
    build(ctx)
    run_tasks(ctx)
    ctx.store()
Esempio n. 6
0
        #  - support for env update
        #  - config header support
        #  - confdefs header support
        check_compiler(conf)
        check_header(conf, "stdio.h")
        check_header(conf, "stdio")
        check_type(conf, "char")
        #check_type(conf, "complex")
        check_type(conf, "complex", headers=["complex.h"])
        if check_func(conf, "exp"):
            mlib = []
        else:
            if not check_lib(conf, "m", "exp"):
                raise ValueError("What is mlib ?")
            else:
                mlib = ["m"]
        check_lib(conf, mlib, "exp")
        #check_lib(conf, lib="mm")
        check_func(conf, "floor", libs=mlib)
        check_func(conf, "floor")

        generate_config_h(conf.conf_results, "build/conf/config.h")
    finally:
        conf.log.close()


if __name__ == "__main__":
    ctx = get_cfg()
    configure(ctx)
    ctx.store()
Esempio n. 7
0
    def test_compiler(self):
        ctx = get_cfg()
        ctx.store()

        ctx = get_bld()
        ctx.store()
Esempio n. 8
0
    import \
        run_tasks
from yaku.context \
    import \
        get_bld, get_cfg


def configure(ctx):
    ctx.use_tools(["ctasks", "cxxtasks"])
    ctx.env.append("DEFINES", "_FOO")


def build(ctx):
    builder = ctx.builders["cxxtasks"]
    builder.program("foo", ["src/main.cxx"])

    builder = ctx.builders["ctasks"]
    builder.static_library("bar", ["src/bar.c"])


if __name__ == "__main__":
    build_path = "BBUILD"
    ctx = get_cfg(build_path=build_path)
    configure(ctx)
    ctx.store()

    ctx = get_bld(build_path=build_path)
    build(ctx)
    run_tasks(ctx)
    ctx.store()
Esempio n. 9
0
from yaku.scheduler \
    import \
        run_tasks
from yaku.context \
    import \
        get_bld, get_cfg

def configure(ctx):
    ctx.use_tools(["ctasks", "cxxtasks"])
    ctx.env.append("DEFINES", "_FOO")

def build(ctx):
    builder = ctx.builders["cxxtasks"]
    builder.program("foo", ["src/main.cxx"])

    builder = ctx.builders["ctasks"]
    builder.static_library("bar", ["src/bar.c"])

if __name__ == "__main__":
    build_path = "BBUILD"
    ctx = get_cfg(build_path=build_path)
    configure(ctx)
    ctx.store()

    ctx = get_bld(build_path=build_path)
    build(ctx)
    run_tasks(ctx)
    ctx.store()
Esempio n. 10
0
    def test_compiler(self):
        ctx = get_cfg()
        ctx.store()

        ctx = get_bld()
        ctx.store()