Пример #1
0
def get_ifort_versions(conf, eval_and_save=True):
	"""
	:return: list of compilers installed
	:rtype: list of string
	"""
	if conf.env['IFORT_INSTALLED_VERSIONS']:
		return conf.env['IFORT_INSTALLED_VERSIONS']

	# Gather all the compiler versions and targets. This phase can be lazy
	# per lazy detection settings.
	lst = []
	conf.gather_ifort_versions(lst)

	# Override lazy detection by evaluating after the fact.
	if eval_and_save:
		def checked_target(t):
			target,(arch,paths) = t
			try:
				paths.evaluate()
			except conf.errors.ConfigurationError:
				return None
			else:
				return t
		lst = [(version, list(filter(checked_target, targets))) for version, targets in lst]
		conf.env['IFORT_INSTALLED_VERSIONS'] = lst

	return lst
Пример #2
0
def get_ifort_versions(conf,eval_and_save=True):
	if conf.env['IFORT_INSTALLED_VERSIONS']:
		return conf.env['IFORT_INSTALLED_VERSIONS']
	lst=[]
	conf.gather_ifort_versions(lst)
	if eval_and_save:
		def checked_target(t):
			target,(arch,paths)=t
			try:
				paths.evaluate()
			except conf.errors.ConfigurationError:
				return None
			else:
				return t
		lst=[(version,list(filter(checked_target,targets)))for version,targets in lst]
		conf.env['IFORT_INSTALLED_VERSIONS']=lst
	return lst
Пример #3
0
def get_ifort_versions(conf,eval_and_save=True):
	if conf.env['IFORT_INSTALLED_VERSIONS']:
		return conf.env['IFORT_INSTALLED_VERSIONS']
	lst=[]
	conf.gather_ifort_versions(lst)
	if eval_and_save:
		def checked_target(t):
			target,(arch,paths)=t
			try:
				paths.evaluate()
			except conf.errors.ConfigurationError:
				return None
			else:
				return t
		lst=[(version,list(filter(checked_target,targets)))for version,targets in lst]
		conf.env['IFORT_INSTALLED_VERSIONS']=lst
	return lst