- Timestamp:
- Oct 3, 2017, 10:31:12 PM (7 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
- Children:
- 2e5c52e
- Parents:
- 7b7a58e (diff), 25db68c (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wscript
r7b7a58e rbfbfafa 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 = False, 54 help_str = 'use Intel IPP libraries (auto)', 55 help_disable_str = 'do not use Intel IPP libraries') 53 56 add_option_enable_disable(ctx, 'complex', default = False, 54 57 help_str ='compile with C99 complex', … … 101 104 ctx.load('waf_unit_test') 102 105 ctx.load('gnu_dirs') 106 ctx.load('waf_gensyms', tooldir='.') 103 107 104 108 def configure(ctx): 105 from waflib import Options106 ctx.load('compiler_c')107 ctx.load('waf_unit_test')108 ctx.load('gnu_dirs')109 110 109 target_platform = sys.platform 111 110 if ctx.options.target_platform: 112 111 target_platform = ctx.options.target_platform 113 112 113 from waflib import Options 114 114 115 115 if target_platform=='emscripten': 116 # need to force spaces between flag -o and path 117 # inspired from : 118 # https://github.com/waf-project/waf/blob/master/waflib/extras/c_emscripten.py (#1885) 119 # (OSX /emscripten 1.37.9) 120 ctx.env.CC_TGT_F = ['-c', '-o', ''] 121 ctx.env.CCLNK_TGT_F = ['-o', ''] 116 ctx.load('c_emscripten') 117 else: 118 ctx.load('compiler_c') 119 120 ctx.load('waf_unit_test') 121 ctx.load('gnu_dirs') 122 ctx.load('waf_gensyms', tooldir='.') 123 122 124 # check for common headers 123 125 ctx.check(header_name='stdlib.h') … … 152 154 else: 153 155 # enable debug symbols 154 ctx.env.CFLAGS += ['/Z7', '/FS'] 156 ctx.env.CFLAGS += ['/Z7'] 157 # /FS flag available in msvc >= 12 (2013) 158 if 'MSVC_VERSION' in ctx.env and ctx.env.MSVC_VERSION >= 12: 159 ctx.env.CFLAGS += ['/FS'] 155 160 ctx.env.LINKFLAGS += ['/DEBUG', '/INCREMENTAL:NO'] 156 161 # configure warnings 157 162 ctx.env.CFLAGS += ['/W4', '/D_CRT_SECURE_NO_WARNINGS'] 163 # ignore "possible loss of data" warnings 164 ctx.env.CFLAGS += ['/wd4305', '/wd4244', '/wd4245', '/wd4267'] 165 # ignore "unreferenced formal parameter" warnings 166 ctx.env.CFLAGS += ['/wd4100'] 158 167 # set optimization level and runtime libs 159 168 if (ctx.options.build_type == "release"): … … 227 236 228 237 if target_platform == 'emscripten': 229 import os.path230 ctx.env.CFLAGS += [ '-I' + os.path.join(os.environ['EMSCRIPTEN'], 'system', 'include') ]231 232 238 if ctx.options.build_type == "debug": 233 239 ctx.env.cshlib_PATTERN = '%s.js' … … 248 254 249 255 # tell emscripten functions we want to expose 250 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 256 from python.lib.gen_external import get_c_declarations, \ 257 get_cpp_objects_from_c_declarations, get_all_func_names_from_lib, \ 258 generate_lib_from_c_declarations 251 259 c_decls = get_c_declarations(usedouble=False) # emscripten can't use double 252 objects = get_cpp_objects_from_c_declarations(c_decls)260 objects = list(get_cpp_objects_from_c_declarations(c_decls)) 253 261 # ensure that aubio structs are exported 254 262 objects += ['fvec_t', 'cvec_t', 'fmat_t'] … … 286 294 else: 287 295 ctx.msg('Checking if complex.h is enabled', 'no') 296 297 # check for Intel IPP 298 if (ctx.options.enable_intelipp != False): 299 has_ipp_headers = ctx.check(header_name=['ippcore.h', 'ippvm.h', 'ipps.h'], 300 mandatory = False) 301 has_ipp_libs = ctx.check(lib=['ippcore', 'ippvm', 'ipps'], 302 uselib_store='INTEL_IPP', mandatory = False) 303 if (has_ipp_headers and has_ipp_libs): 304 ctx.msg('Checking if Intel IPP is available', 'yes') 305 ctx.define('HAVE_INTEL_IPP', 1) 306 if ctx.env.CC_NAME == 'msvc': 307 # force linking multi-threaded static IPP libraries on Windows with msvc 308 ctx.define('_IPP_SEQUENTIAL_STATIC', 1) 309 else: 310 ctx.msg('Checking if Intel IPP is available', 'no') 288 311 289 312 # check for fftw3 … … 310 333 ctx.define('HAVE_FFTW3', 1) 311 334 312 # fftw not enabled, use vDSP or ooura335 # fftw not enabled, use vDSP, intelIPP or ooura 313 336 if 'HAVE_FFTW3F' in ctx.env.define_key: 314 337 ctx.msg('Checking for FFT implementation', 'fftw3f') … … 317 340 elif 'HAVE_ACCELERATE' in ctx.env.define_key: 318 341 ctx.msg('Checking for FFT implementation', 'vDSP') 342 elif 'HAVE_INTEL_IPP' in ctx.env.define_key: 343 ctx.msg('Checking for FFT implementation', 'Intel IPP') 319 344 else: 320 345 ctx.msg('Checking for FFT implementation', 'ooura') … … 447 472 # add sub directories 448 473 if bld.env['DEST_OS'] not in ['ios', 'iosimulator', 'android']: 474 if bld.env['DEST_OS']=='emscripten' and not bld.options.testcmd: 475 bld.options.testcmd = 'node %s' 449 476 bld.recurse('examples') 450 477 bld.recurse('tests') … … 558 585 ctx.excl += ' **/.landscape.yml' 559 586 ctx.excl += ' **/.appveyor.yml' 587 ctx.excl += ' **/circlei.yml'
Note: See TracChangeset
for help on using the changeset viewer.