コード例 #1
0
def hHideBuildCommands():
	env = wrpManager.getEnv()
	env['CCCOMSTR'] = 'cc: $TARGETS'
	env['SHCCCOMSTR'] = 'shcc: $TARGETS'
	env['CXXCOMSTR'] = 'cxx: $TARGETS'
	env['SHCXXCOMSTR'] = 'shcxx: $TARGETS'
	env['LINKCOMSTR'] = 'link: $TARGETS'
	env['SHLINKCOMSTR'] = 'shlink: $TARGETS'
	env['ARCOMSTR'] = 'ar: $TARGETS'
	env['RANLIBCOMSTR'] = 'ranlib: $TARGETS'
	env['GENSTR'] = '$GEN_NAME: $TARGETS'
	env['MOCSTR'] = 'moc $TARGET'
	env['MOCSTR'] = 'moc $TARGET'
	env['INSTALLSTR'] = 'Install "$SOURCES" as "$TARGETS"'
コード例 #2
0
	def __init__(self, configFlags):
		projectConfig.ProjectConfig.__init__(self, configFlags)
		loglib.info("Using configuration : %s" % self.__class__.__name__)
		# NOTE: self.env should be always base environment, any SConscript should not access it
		self.env = wrpManager.getEnv()
		self._setupSconsDefaults()
		self.__setupForAll()
		self._setupDefaultOpts()
		self._setupLibAliases()
		if "gcov" not in self.configFlags and int(os.getenv('ENABLE_SCONS_CACHE', 1)):
			# while compilation with gcov compilator save *.gcdo files that are needed to store
			# execution line counter. If binary is retrieved from cache then requested gcdo file
			# would be missed
			self._setupCache()
		
		self.configure() # this function executes method corresponding CONFIG flags
コード例 #3
0
def hAddFlags(*args, **envDef):
	env = envDef.get("env", None)
	if not env:
		env = wrpManager.getEnv()
	for arg in args:
		env.AppendUnique(CCFLAGS = arg)
コード例 #4
0
def hEnv():
	return wrpManager.getEnv()
コード例 #5
0
def hSetTargetDirectory(bindir):
	wrpManager.setTargetDir(bindir)
	env = wrpManager.getEnv()
	abspath = os.path.abspath(bindir)
	env.Append(RPATH=[env.Literal('\\$$ORIGIN')])
	env.AppendUnique(LIBPATH=abspath)
コード例 #6
0
def hGetPluginEnv(env=None):
	if env is None:
		env = wrpManager.getEnv()
	config._setupPluginEnv(env)
	return env
コード例 #7
0
def hFindCompiled(name, srcs, env = None):
	if env is None:
		env = wrpManager.getEnv()
	return wrpManager.findCompiledObjects(name, srcs, env)
コード例 #8
0
def hDynamicObjs(name, srcs, env = None):
	if env is None:
		env = wrpManager.getEnv()
	return wrpManager.toSharedObjects(srcs, name, env)
コード例 #9
0
def hStaticObjs(name, srcs, env = None):
	if env is None:
		env = wrpManager.getEnv()
	return wrpManager.toStaticObjects(srcs, name, env)
コード例 #10
0
def hAddLibraryPath(path, env = None):
	if env is None:
		env = wrpManager.getEnv()
	env.AppendUnique(LIBPATH = [path])
コード例 #11
0
def hAddIncludePaths(*args, **envDef):
	env = envDef.get('env', None)
	if env is None:
		env = wrpManager.getEnv()
	env.AppendUnique(CPPPATH = map(None, args)) #map(None, args) => just convert tuple to list
コード例 #12
0
def hAddCppDefine(key, val = None, env = None):
	if env is None:
		env = wrpManager.getEnv()
	env.Append(CPPDEFINES = {key: val})
コード例 #13
0
def hAddLinkFlags(*args, **envDef):
	env = envDef.get('env', None)
	if not env:
		env = wrpManager.getEnv()
	for arg in args:
		env.AppendUnique(LINKFLAGS = arg)