Changeset 088760e for wscript


Ignore:
Timestamp:
Oct 31, 2018, 10:26:52 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/constantq
Children:
c03d191
Parents:
45c2c5c (diff), 7a54b37 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into feature/constantq

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    r45c2c5c r088760e  
    8484            help_str = 'use CoreFoundation (darwin only) (auto)',
    8585            help_disable_str = 'do not use CoreFoundation framework')
     86    add_option_enable_disable(ctx, 'blas', default = False,
     87            help_str = 'use BLAS acceleration library (no)',
     88            help_disable_str = 'do not use BLAS library')
    8689    add_option_enable_disable(ctx, 'atlas', default = False,
    87             help_str = 'use Atlas library (no)',
    88             help_disable_str = 'do not use Atlas library')
     90            help_str = 'use ATLAS acceleration library (no)',
     91            help_disable_str = 'do not use ATLAS library')
    8992    add_option_enable_disable(ctx, 'wavread', default = True,
    9093            help_str = 'compile with source_wavread (default)',
     
    97100            help_str = 'build documentation (auto)',
    98101            help_disable_str = 'do not build documentation')
     102
     103    add_option_enable_disable(ctx, 'tests', default = True,
     104            help_str = 'build tests (true)',
     105            help_disable_str = 'do not build or run tests')
     106
     107    add_option_enable_disable(ctx, 'examples', default = True,
     108            help_str = 'build examples (true)',
     109            help_disable_str = 'do not build examples')
    99110
    100111    ctx.add_option('--with-target-platform', type='string',
     
    266277        ctx.env.LINKFLAGS_cshlib += ['-s', 'EXPORTED_FUNCTIONS=%s' % c_mangled_names]
    267278
    268     if (ctx.options.enable_atlas != True):
    269         ctx.options.enable_atlas = False
    270 
    271279    # check support for C99 __VA_ARGS__ macros
    272280    check_c99_varargs = '''
     
    419427    ctx.msg('Checking if using sink_wavwrite', ctx.options.enable_wavwrite and 'yes' or 'no')
    420428
    421     # use ATLAS
    422     if (ctx.options.enable_atlas != False):
    423         ctx.check(header_name = 'atlas/cblas.h', mandatory = ctx.options.enable_atlas)
    424         #ctx.check(lib = 'lapack', uselib_store = 'LAPACK', mandatory = ctx.options.enable_atlas)
    425         ctx.check(lib = 'cblas', uselib_store = 'BLAS', mandatory = ctx.options.enable_atlas)
     429    # use BLAS/ATLAS
     430    if (ctx.options.enable_blas != False):
     431        ctx.check_cfg(package = 'blas',
     432                args = '--cflags --libs',
     433                uselib_store='BLAS', mandatory = ctx.options.enable_blas)
     434        if 'LIB_BLAS' in ctx.env:
     435            blas_header = None
     436            if ctx.env['LIBPATH_BLAS']:
     437                if 'atlas' in ctx.env['LIBPATH_BLAS'][0]:
     438                    blas_header = 'atlas/cblas.h'
     439                elif 'openblas' in ctx.env['LIBPATH_BLAS'][0]:
     440                    blas_header = 'openblas/cblas.h'
     441            else:
     442                blas_header = 'cblas.h'
     443            ctx.check(header_name = blas_header, mandatory =
     444                    ctx.options.enable_atlas)
    426445
    427446    # use memcpy hacks
     
    474493        if bld.env['DEST_OS']=='emscripten' and not bld.options.testcmd:
    475494            bld.options.testcmd = 'node %s'
    476         bld.recurse('examples')
    477         bld.recurse('tests')
     495        if bld.options.enable_examples:
     496            bld.recurse('examples')
     497        if bld.options.enable_tests:
     498            bld.recurse('tests')
    478499
    479500    # pkg-config template
     
    585606    ctx.excl += ' **/.landscape.yml'
    586607    ctx.excl += ' **/.appveyor.yml'
    587     ctx.excl += ' **/circlei.yml'
     608    ctx.excl += ' **/.circleci/*'
     609    ctx.excl += ' **/azure-pipelines.yml'
     610    ctx.excl += ' **/.coveragerc'
Note: See TracChangeset for help on using the changeset viewer.