Ejemplo n.º 1
0
def configure(ctx):
    fl = ['-fdiagnostics-color'] if ctx.options.use_color else []
    cxx = guess_static(ctx, flags=fl, includes=['.'], platform_options=[
        ({'windows'}, {'flags+': ['/EHsc']}),
        ({'posix'}, {'flags+': ['-std=c++11']})
    ])
    if not Expat(cxx).expat_h: return
    return Record(cxx=cxx)
Ejemplo n.º 2
0
def configure(ctx):
    fl = ['-fdiagnostics-color'] if ctx.options.use_color else []
    id, ld = ['.'], []
    for t, l in ('inc', id), ('lib', ld):
        opt = getattr(ctx.options, 'asmjit_%sdir' % t)
        if opt: l.append(opt)
    cxx = guess_static(ctx, flags=fl, includes=id, libpaths=ld, platform_options=[
        ({'windows'}, {'flags': ['/EHsc']}),
        ({'posix'}, {'flags+': ['-std=c++11']})
    ])
    return Record(cxx=cxx)
Ejemplo n.º 3
0
def configure(ctx):
    cxx = guess_static(ctx, platform_options=(
        ({'posix'}, {'flags+': ['-std=c++11']}),
    ), exe=ctx.options.cxx, flags=(['-fdiagnostics-color'] if ctx.options.use_color\
                                  else [])+ctx.options.cxxflag)
    libs = []
    defs = []
    if not ctx.options.no_re2 and RE2(cxx).re2_h:
        libs.append('re2')
        defs.append('USE_RE2')
    else:
        if not CheckBrokenRegex(cxx).broken_regex:
            raise ConfigFailed('Your libstdc++ version is too old; try a newer '\
                'one, pass --cxxflag=-stdlib=libc++ if you are using Clang and '\
                'have libc++ installed, or install RE2')
    return Record(cxx=cxx, libs=libs, defs=defs)
Ejemplo n.º 4
0
def configure(ctx, release):
    config_kw = {}
    wcxxflags = []
    if release:
        config_kw['optimize'] = True
        wcxxflags.append('/MT')
    else:
        config_kw['debug'] = True
        wcxxflags.append('/LDd')
    felix = Felix(ctx, flags=ctx.options.flxflag, **config_kw)
    extra = felix.platform_extra
    kw = dict(platform_extra=extra, platform_options=[
        ({'windows'}, {'flags+': ['/EHsc']+wcxxflags}),
        ({'posix'}, {'flags+': ['-std=c++11']}),
    ], flags=ctx.options.cxxflag, **config_kw)
    static = guess_static(ctx, **kw)
    shared = guess_shared(ctx, **kw)
    gen_fpc(ctx, static)
    linker = static.lib_linker if 'windows' in extra else shared.lib_linker
    fluidsynth = check_fluid(linker)
    return Record(static=static, shared=shared, felix=felix, fluidsynth=fluidsynth)