本文整理汇总了Python中waflib.Configure.conf.check_boost方法的典型用法代码示例。如果您正苦于以下问题:Python conf.check_boost方法的具体用法?Python conf.check_boost怎么用?Python conf.check_boost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类waflib.Configure.conf
的用法示例。
在下文中一共展示了conf.check_boost方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: check_boost
# 需要导入模块: from waflib.Configure import conf [as 别名]
# 或者: from waflib.Configure.conf import check_boost [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)