當前位置: 首頁>>代碼示例>>Python>>正文


Python conf.check_boost方法代碼示例

本文整理匯總了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) 
開發者ID:ntu-dsi-dcn,項目名稱:ntu-dsi-dcn,代碼行數:47,代碼來源:boost.py


注:本文中的waflib.Configure.conf.check_boost方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。