Ejemplo n.º 1
0
	def __init__(self):
		self.jobs = []
		self.options = OptionParser()
		self.target = { }
		self.numCPUs = osutil.NumberOfCPUs()
		self.quietAdd = False
		if osutil.IsWindows():
			self.target['platform'] = 'windows'
		elif sys.platform.startswith('linux'):
			self.target['platform'] = 'linux'
		elif sys.platform.startswith('darwin'):
			self.target['platform'] = 'darwin'
Ejemplo n.º 2
0
	def DetectCxxCompiler(self):
		if 'CXX' in self.env:
			if self.TryVerifyCompiler(self.env['CXX'], 'cxx'):
				return True
		else:
			list = ['g++', 'clang++', 'c++', 'icc']
			if osutil.IsMac():
				list = ['clang++', 'g++', 'c++', 'icc']
			elif osutil.IsWindows():
				list[0:0] = ['cl']
			for i in list:
				if self.TryVerifyCompiler(i, 'cxx'):
					return True
		raise Exception('Unable to find suitable C++ compiler')
Ejemplo n.º 3
0
	def TryVerifyCompiler(self, name, mode):
		if osutil.IsWindows() and self.VerifyCompiler(name, mode, 'msvc'):
			return True
		return self.VerifyCompiler(name, mode, 'gcc')