Ignore:
Timestamp:
Nov 13, 2013, 1:00:56 PM (10 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
d3066e2
Parents:
54e74f0
Message:

waf, waflib: update to 1.7.13

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waflib/Tools/msvc.py

    r54e74f0 rc101fe1  
    44
    55import os,sys,re,tempfile
    6 from waflib import Utils,Task,Logs,Options
     6from waflib import Utils,Task,Logs,Options,Errors
    77from waflib.Logs import debug,warn
    88from waflib.TaskGen import after_method,feature
     
    2929wintrust wldap32 wmiutils wow32 ws2_32 wsnmp32 wsock32 wst wtsapi32 xaswitch xolehlp
    3030'''.split()
    31 all_msvc_platforms=[('x64','amd64'),('x86','x86'),('ia64','ia64'),('x86_amd64','amd64'),('x86_ia64','ia64')]
     31all_msvc_platforms=[('x64','amd64'),('x86','x86'),('ia64','ia64'),('x86_amd64','amd64'),('x86_ia64','ia64'),('x86_arm','arm')]
    3232all_wince_platforms=[('armv4','arm'),('armv4i','arm'),('mipsii','mips'),('mipsii_fp','mips'),('mipsiv','mips'),('mipsiv_fp','mips'),('sh4','sh'),('x86','cex86')]
    3333all_icl_platforms=[('intel64','amd64'),('em64t','amd64'),('ia32','x86'),('Itanium','ia64')]
     
    6767echo PATH=%%PATH%%
    6868echo INCLUDE=%%INCLUDE%%
    69 echo LIB=%%LIB%%
     69echo LIB=%%LIB%%;%%LIBPATH%%
    7070"""%(vcvars,target))
    7171        sout=conf.cmd_and_log(['cmd','/E:on','/V:on','/C',batfile.abspath()])
     
    7373        if not lines[0]:
    7474                lines.pop(0)
    75         if version=='11.0':
    76                 if lines[0].startswith('Error'):
    77                         conf.fatal('msvc: Could not find a valid architecture for building (get_msvc_version_1)')
    78         else:
    79                 for x in('Setting environment','Setting SDK environment','Intel(R) C++ Compiler','Intel Parallel Studio','Intel(R) Parallel Studio','Intel(R) Composer','Intel Corporation. All rights reserved.'):
    80                         if lines[0].find(x)>-1:
    81                                 lines.pop(0)
    82                                 break
    83                 else:
    84                         debug('msvc: get_msvc_version: %r %r %r -> not found',compiler,version,target)
    85                         conf.fatal('msvc: Could not find a valid architecture for building (get_msvc_version_2)')
    8675        MSVC_PATH=MSVC_INCDIR=MSVC_LIBDIR=None
    8776        for line in lines:
     
    233222                except conf.errors.ConfigurationError:
    234223                        pass
    235         versions.append(('msvc '+version,targets))
     224        if targets:
     225                versions.append(('msvc '+version,targets))
    236226@conf
    237227def gather_wince_targets(conf,versions,version,vc_path,vsvars,supported_platforms):
     
    254244                        versions.append((device+' '+version,cetargets))
    255245@conf
     246def gather_winphone_targets(conf,versions,version,vc_path,vsvars):
     247        targets=[]
     248        for target,realtarget in all_msvc_platforms[::-1]:
     249                try:
     250                        targets.append((target,(realtarget,conf.get_msvc_version('winphone',version,target,vsvars))))
     251                except conf.errors.ConfigurationError ,e:
     252                        pass
     253        if targets:
     254                versions.append(('winphone '+version,targets))
     255@conf
    256256def gather_msvc_versions(conf,versions):
    257257        vc_paths=[]
     
    272272                if wince_supported_platforms and os.path.isfile(vsvars):
    273273                        conf.gather_wince_targets(versions,version,vc_path,vsvars,wince_supported_platforms)
     274                vsvars=os.path.join(vs_path,'VC','WPSDK','WP80','vcvarsphoneall.bat')
     275                if os.path.isfile(vsvars):
     276                        conf.gather_winphone_targets(versions,'8.0',vc_path,vsvars)
    274277        for version,vc_path in vc_paths:
    275278                vs_path=os.path.dirname(vc_path)
     
    370373                                        patch_url='http://software.intel.com/en-us/forums/topic/328487'
    371374                                        compilervars_arch=os.path.join(path,'bin','compilervars_arch.bat')
    372                                         vs_express_path=os.environ['VS110COMNTOOLS']+r'..\IDE\VSWinExpress.exe'
    373                                         dev_env_path=os.environ['VS110COMNTOOLS']+r'..\IDE\devenv.exe'
    374                                         if(r'if exist "%VS110COMNTOOLS%..\IDE\VSWinExpress.exe"'in Utils.readf(compilervars_arch)and not os.path.exists(vs_express_path)and not os.path.exists(dev_env_path)):
    375                                                 Logs.warn(('The Intel compilervar_arch.bat only checks for one Visual Studio SKU ''(VSWinExpress.exe) but it does not seem to be installed at %r. ''The intel command line set up will fail to configure unless the file %r''is patched. See: %s')%(vs_express_path,compilervars_arch,patch_url))
     375                                        for vscomntool in['VS110COMNTOOLS','VS100COMNTOOLS']:
     376                                                if vscomntool in os.environ:
     377                                                        vs_express_path=os.environ[vscomntool]+r'..\IDE\VSWinExpress.exe'
     378                                                        dev_env_path=os.environ[vscomntool]+r'..\IDE\devenv.exe'
     379                                                        if(r'if exist "%VS110COMNTOOLS%..\IDE\VSWinExpress.exe"'in Utils.readf(compilervars_arch)and not os.path.exists(vs_express_path)and not os.path.exists(dev_env_path)):
     380                                                                Logs.warn(('The Intel compilervar_arch.bat only checks for one Visual Studio SKU ''(VSWinExpress.exe) but it does not seem to be installed at %r. ''The intel command line set up will fail to configure unless the file %r''is patched. See: %s')%(vs_express_path,compilervars_arch,patch_url))
    376381                        except WindowsError:
    377382                                pass
     
    545550                conf.find_program('MT',path_list=path,var='MT')
    546551                v['MTFLAGS']=['/NOLOGO']
    547         conf.load('winres')
    548         if not conf.env['WINRC']:
     552        try:
     553                conf.load('winres')
     554        except Errors.WafError:
    549555                warn('Resource compiler not found. Compiling resource file is disabled')
    550556@conf
     
    564570        v['CC_SRC_F']=''
    565571        v['CC_TGT_F']=['/c','/Fo']
    566         if v['MSVC_VERSION']>=8:
    567                 v['CC_TGT_F']=['/FC']+v['CC_TGT_F']
    568572        v['CXX_SRC_F']=''
    569573        v['CXX_TGT_F']=['/c','/Fo']
    570         if v['MSVC_VERSION']>=8:
     574        if(v.MSVC_COMPILER=='msvc'and v.MSVC_VERSION>=8)or(v.MSVC_COMPILER=='wsdk'and v.MSVC_VERSION>=6):
     575                v['CC_TGT_F']=['/FC']+v['CC_TGT_F']
    571576                v['CXX_TGT_F']=['/FC']+v['CXX_TGT_F']
    572577        v['CPPPATH_ST']='/I%s'
     
    682687        return ret
    683688def exec_command_msvc(self,*k,**kw):
    684         assert self.env['CC_NAME']=='msvc'
    685689        if isinstance(k[0],list):
    686690                lst=[]
     
    725729for k in'c cxx cprogram cxxprogram cshlib cxxshlib cstlib cxxstlib'.split():
    726730        wrap_class(k)
     731def make_winapp(self,family):
     732        append=self.env.append_unique
     733        append('DEFINES','WINAPI_FAMILY=%s'%family)
     734        append('CXXFLAGS','/ZW')
     735        append('CXXFLAGS','/TP')
     736        for lib_path in self.env.LIBPATH:
     737                append('CXXFLAGS','/AI%s'%lib_path)
     738@feature('winphoneapp')
     739@after_method('process_use')
     740@after_method('propagate_uselib_vars')
     741def make_winphone_app(self):
     742        make_winapp(self,'WINAPI_FAMILY_PHONE_APP')
     743        conf.env.append_unique('LINKFLAGS','/NODEFAULTLIB:ole32.lib')
     744        conf.env.append_unique('LINKFLAGS','PhoneAppModelHost.lib')
     745@feature('winapp')
     746@after_method('process_use')
     747@after_method('propagate_uselib_vars')
     748def make_windows_app(self):
     749        make_winapp(self,'WINAPI_FAMILY_DESKTOP_APP')
Note: See TracChangeset for help on using the changeset viewer.