本文整理汇总了Python中waflib.Configure.conf.load方法的典型用法代码示例。如果您正苦于以下问题:Python conf.load方法的具体用法?Python conf.load怎么用?Python conf.load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类waflib.Configure.conf
的用法示例。
在下文中一共展示了conf.load方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: find_ifort_win32
# 需要导入模块: from waflib.Configure import conf [as 别名]
# 或者: from waflib.Configure.conf import load [as 别名]
def find_ifort_win32(conf):
v=conf.env
path=v['PATH']
compiler=v['MSVC_COMPILER']
version=v['MSVC_VERSION']
compiler_name,linker_name,lib_name=_get_prog_names(conf,compiler)
v.IFORT_MANIFEST=(compiler=='intel'and version>=11)
fc=conf.find_program(compiler_name,var='FC',path_list=path)
env=dict(conf.environ)
if path:env.update(PATH=';'.join(path))
if not conf.cmd_and_log(fc+['/nologo','/help'],env=env):
conf.fatal('not intel fortran compiler could not be identified')
v['FC_NAME']='IFORT'
if not v['LINK_FC']:
conf.find_program(linker_name,var='LINK_FC',path_list=path,mandatory=True)
if not v['AR']:
conf.find_program(lib_name,path_list=path,var='AR',mandatory=True)
v['ARFLAGS']=['/NOLOGO']
if v.IFORT_MANIFEST:
conf.find_program('MT',path_list=path,var='MT')
v['MTFLAGS']=['/NOLOGO']
try:
conf.load('winres')
except Errors.WafError:
warn('Resource compiler not found. Compiling resource file is disabled')
示例2: configure
# 需要导入模块: from waflib.Configure import conf [as 别名]
# 或者: from waflib.Configure.conf import load [as 别名]
def configure(conf):
conf.find_dmd()
if sys.platform=='win32':
out=conf.cmd_and_log(conf.env.D+['--help'])
if out.find("D Compiler v2.")>-1:
conf.fatal('dmd2 on Windows is not supported, use gdc or ldc2 instead')
conf.load('ar')
conf.load('d')
conf.common_flags_dmd()
conf.d_platform_flags()
if str(conf.env.D).find('ldc')>-1:
conf.common_flags_ldc()
示例3: cc_load_tools
# 需要导入模块: from waflib.Configure import conf [as 别名]
# 或者: from waflib.Configure.conf import load [as 别名]
def cc_load_tools(conf):
if not conf.env.DEST_OS:
conf.env.DEST_OS=Utils.unversioned_sys_platform()
conf.load('c')
示例4: cxx_load_tools
# 需要导入模块: from waflib.Configure import conf [as 别名]
# 或者: from waflib.Configure.conf import load [as 别名]
def cxx_load_tools(conf):
if not conf.env.DEST_OS:
conf.env.DEST_OS=Utils.unversioned_sys_platform()
conf.load('cxx')
示例5: configure
# 需要导入模块: from waflib.Configure import conf [as 别名]
# 或者: from waflib.Configure.conf import load [as 别名]
def configure(conf):
conf.find_ldc2()
conf.load('ar')
conf.load('d')
conf.common_flags_ldc2()
conf.d_platform_flags()
示例6: find_ar
# 需要导入模块: from waflib.Configure import conf [as 别名]
# 或者: from waflib.Configure.conf import load [as 别名]
def find_ar(conf):
conf.load('ar')
示例7: find_msvc
# 需要导入模块: from waflib.Configure import conf [as 别名]
# 或者: from waflib.Configure.conf import load [as 别名]
def find_msvc(conf):
if sys.platform=='cygwin':
conf.fatal('MSVC module does not work under cygwin Python!')
v=conf.env
path=v['PATH']
compiler=v['MSVC_COMPILER']
version=v['MSVC_VERSION']
compiler_name,linker_name,lib_name=_get_prog_names(conf,compiler)
v.MSVC_MANIFEST=(compiler=='msvc'and version>=8)or(compiler=='wsdk'and version>=6)or(compiler=='intel'and version>=11)
cxx=None
if v['CXX']:cxx=v['CXX']
elif'CXX'in conf.environ:cxx=conf.environ['CXX']
cxx=conf.find_program(compiler_name,var='CXX',path_list=path)
env=dict(conf.environ)
if path:env.update(PATH=';'.join(path))
if not conf.cmd_and_log(cxx+['/nologo','/help'],env=env):
conf.fatal('the msvc compiler could not be identified')
v['CC']=v['CXX']=cxx
v['CC_NAME']=v['CXX_NAME']='msvc'
if not v['LINK_CXX']:
link=conf.find_program(linker_name,path_list=path)
if link:v['LINK_CXX']=link
else:conf.fatal('%s was not found (linker)'%linker_name)
v['LINK']=link
if not v['LINK_CC']:
v['LINK_CC']=v['LINK_CXX']
if not v['AR']:
stliblink=conf.find_program(lib_name,path_list=path,var='AR')
if not stliblink:return
v['ARFLAGS']=['/NOLOGO']
if v.MSVC_MANIFEST:
conf.find_program('MT',path_list=path,var='MT')
v['MTFLAGS']=['/NOLOGO']
try:
conf.load('winres')
except Errors.WafError:
warn('Resource compiler not found. Compiling resource file is disabled')
示例8: configure
# 需要导入模块: from waflib.Configure import conf [as 别名]
# 或者: from waflib.Configure.conf import load [as 别名]
def configure(conf):
conf.find_gdc()
conf.load('ar')
conf.load('d')
conf.common_flags_gdc()
conf.d_platform_flags()
示例9: find_msvc
# 需要导入模块: from waflib.Configure import conf [as 别名]
# 或者: from waflib.Configure.conf import load [as 别名]
def find_msvc(conf):
if sys.platform=='cygwin':
conf.fatal('MSVC module does not work under cygwin Python!')
v=conf.env
path=v['PATH']
compiler=v['MSVC_COMPILER']
version=v['MSVC_VERSION']
compiler_name,linker_name,lib_name=_get_prog_names(conf,compiler)
v.MSVC_MANIFEST=(compiler=='msvc'and version>=8)or(compiler=='wsdk'and version>=6)or(compiler=='intel'and version>=11)
cxx=conf.find_program(compiler_name,var='CXX',path_list=path)
env=dict(conf.environ)
if path:env.update(PATH=';'.join(path))
if not conf.cmd_and_log(cxx+['/nologo','/help'],env=env):
conf.fatal('the msvc compiler could not be identified')
v['CC']=v['CXX']=cxx
v['CC_NAME']=v['CXX_NAME']='msvc'
if not v['LINK_CXX']:
link=conf.find_program(linker_name,path_list=path)
if link:v['LINK_CXX']=link
else:conf.fatal('%s was not found (linker)'%linker_name)
v['LINK']=link
if not v['LINK_CC']:
v['LINK_CC']=v['LINK_CXX']
if not v['AR']:
stliblink=conf.find_program(lib_name,path_list=path,var='AR')
if not stliblink:return
v['ARFLAGS']=['/NOLOGO']
if v.MSVC_MANIFEST:
conf.find_program('MT',path_list=path,var='MT')
v['MTFLAGS']=['/NOLOGO']
try:
conf.load('winres')
except Errors.WafError:
warn('Resource compiler not found. Compiling resource file is disabled')
示例10: check_boost
# 需要导入模块: from waflib.Configure import conf [as 别名]
# 或者: from waflib.Configure.conf import load [as 别名]
def check_boost(self, *k, **kw):
"""
initialize boost
You can pass the same parameters as the command line (without "--boost-"),
but the command line has the priority.
"""
if not self.env['CXX']:
self.fatal('load a c++ compiler first, conf.load("compiler_cxx")')
params = {'lib': k and k[0] or kw.get('lib', None)}
for key, value in self.options.__dict__.items():
if not key.startswith('boost_'):
continue
key = key[len('boost_'):]
params[key] = value and value or kw.get(key, '')
var = kw.get('uselib_store', 'BOOST')
self.start_msg('Checking boost includes')
try:
self.env['INCLUDES_%s' % var] = self.boost_get_includes(**params)
self.env.BOOST_VERSION = self.boost_get_version(self.env['INCLUDES_%s' % var])
except WafError:
self.end_msg("not found", 'YELLOW')
raise
self.end_msg(self.env.BOOST_VERSION)
if Logs.verbose:
Logs.pprint('CYAN', ' path : %s' % self.env['INCLUDES_%s' % var])
if not params['lib']:
return
self.start_msg('Checking boost libs')
try:
suffix = params.get('static', 'ST') or ''
path, libs = self.boost_get_libs(**params)
except WafError:
self.end_msg("not found", 'YELLOW')
raise
self.env['%sLIBPATH_%s' % (suffix, var)] = [path]
self.env['%sLIB_%s' % (suffix, var)] = libs
self.end_msg('ok')
if Logs.verbose:
Logs.pprint('CYAN', ' path : %s' % path)
Logs.pprint('CYAN', ' libs : %s' % libs)