Changes in wscript [986131d:873646d]
Legend:
- Unmodified
- Added
- Removed
-
wscript
r986131d r873646d 51 51 help_str = 'compile with fftw3 instead of ooura', 52 52 help_disable_str = 'do not compile with fftw3') 53 add_option_enable_disable(ctx, 'intelipp', default = None,54 help_str = 'use Intel IPP libraries (auto)',55 help_disable_str = 'do not use Intel IPP libraries')56 53 add_option_enable_disable(ctx, 'complex', default = False, 57 54 help_str ='compile with C99 complex', … … 106 103 107 104 def configure(ctx): 108 from waflib import Options109 ctx.load('compiler_c')110 ctx.load('waf_unit_test')111 ctx.load('gnu_dirs')112 113 105 target_platform = sys.platform 114 106 if ctx.options.target_platform: 115 107 target_platform = ctx.options.target_platform 116 108 109 from waflib import Options 117 110 118 111 if target_platform=='emscripten': 119 # need to force spaces between flag -o and path 120 # inspired from : 121 # https://github.com/waf-project/waf/blob/master/waflib/extras/c_emscripten.py (#1885) 122 # (OSX /emscripten 1.37.9) 123 ctx.env.CC_TGT_F = ['-c', '-o', ''] 124 ctx.env.CCLNK_TGT_F = ['-o', ''] 112 ctx.load('c_emscripten') 113 else: 114 ctx.load('compiler_c') 115 116 ctx.load('waf_unit_test') 117 ctx.load('gnu_dirs') 118 125 119 # check for common headers 126 120 ctx.check(header_name='stdlib.h') … … 155 149 else: 156 150 # enable debug symbols 157 ctx.env.CFLAGS += ['/Z7', '/FS'] 151 ctx.env.CFLAGS += ['/Z7'] 152 # /FS flag available in msvc >= 12 (2013) 153 if 'MSVC_VERSION' in ctx.env and ctx.env.MSVC_VERSION >= 12: 154 ctx.env.CFLAGS += ['/FS'] 158 155 ctx.env.LINKFLAGS += ['/DEBUG', '/INCREMENTAL:NO'] 159 156 # configure warnings 160 157 ctx.env.CFLAGS += ['/W4', '/D_CRT_SECURE_NO_WARNINGS'] 161 # ignore "possible loss of data" warnings162 ctx.env.CFLAGS += ['/wd4305', '/wd4244', '/wd4245', '/wd4267']163 # ignore "unreferenced formal parameter" warnings164 ctx.env.CFLAGS += ['/wd4100']165 158 # set optimization level and runtime libs 166 159 if (ctx.options.build_type == "release"): … … 234 227 235 228 if target_platform == 'emscripten': 236 import os.path237 ctx.env.CFLAGS += [ '-I' + os.path.join(os.environ['EMSCRIPTEN'], 'system', 'include') ]238 239 229 if ctx.options.build_type == "debug": 240 230 ctx.env.cshlib_PATTERN = '%s.js' … … 257 247 from python.lib.gen_external import get_c_declarations, get_cpp_objects_from_c_declarations, get_all_func_names_from_lib, generate_lib_from_c_declarations 258 248 c_decls = get_c_declarations(usedouble=False) # emscripten can't use double 259 objects = get_cpp_objects_from_c_declarations(c_decls)249 objects = list(get_cpp_objects_from_c_declarations(c_decls)) 260 250 # ensure that aubio structs are exported 261 251 objects += ['fvec_t', 'cvec_t', 'fmat_t'] … … 293 283 else: 294 284 ctx.msg('Checking if complex.h is enabled', 'no') 295 296 # check for Intel IPP 297 if (ctx.options.enable_intelipp != False): 298 if (ctx.check(header_name=['ippcore.h', 'ippvm.h', 'ipps.h'], mandatory = False) and 299 ctx.check(lib=['ippcore', 'ippvm', 'ipps'], uselib_store='INTEL_IPP', mandatory = False)): 300 ctx.msg('Checking if Intel IPP is available', 'yes') 301 ctx.define('HAVE_INTEL_IPP', 1) 302 if ctx.env.CC_NAME == 'msvc': 303 # force linking multi-threaded static IPP libraries on Windows with msvc 304 ctx.define('_IPP_SEQUENTIAL_STATIC', 1) 305 else: 306 ctx.msg('Checking if Intel IPP is available', 'no') 307 285 308 286 # check for fftw3 309 287 if (ctx.options.enable_fftw3 != False or ctx.options.enable_fftw3f != False): … … 329 307 ctx.define('HAVE_FFTW3', 1) 330 308 331 # fftw not enabled, use vDSP , intelIPPor ooura309 # fftw not enabled, use vDSP or ooura 332 310 if 'HAVE_FFTW3F' in ctx.env.define_key: 333 311 ctx.msg('Checking for FFT implementation', 'fftw3f') … … 336 314 elif 'HAVE_ACCELERATE' in ctx.env.define_key: 337 315 ctx.msg('Checking for FFT implementation', 'vDSP') 338 elif 'HAVE_INTEL_IPP' in ctx.env.define_key:339 ctx.msg('Checking for FFT implementation', 'Intel IPP')340 316 else: 341 317 ctx.msg('Checking for FFT implementation', 'ooura') … … 468 444 # add sub directories 469 445 if bld.env['DEST_OS'] not in ['ios', 'iosimulator', 'android']: 446 if bld.env['DEST_OS']=='emscripten' and not bld.options.testcmd: 447 bld.options.testcmd = 'node %s' 470 448 bld.recurse('examples') 471 449 bld.recurse('tests')
Note: See TracChangeset
for help on using the changeset viewer.