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"'
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
def hAddFlags(*args, **envDef): env = envDef.get("env", None) if not env: env = wrpManager.getEnv() for arg in args: env.AppendUnique(CCFLAGS = arg)
def hEnv(): return wrpManager.getEnv()
def hSetTargetDirectory(bindir): wrpManager.setTargetDir(bindir) env = wrpManager.getEnv() abspath = os.path.abspath(bindir) env.Append(RPATH=[env.Literal('\\$$ORIGIN')]) env.AppendUnique(LIBPATH=abspath)
def hGetPluginEnv(env=None): if env is None: env = wrpManager.getEnv() config._setupPluginEnv(env) return env
def hFindCompiled(name, srcs, env = None): if env is None: env = wrpManager.getEnv() return wrpManager.findCompiledObjects(name, srcs, env)
def hDynamicObjs(name, srcs, env = None): if env is None: env = wrpManager.getEnv() return wrpManager.toSharedObjects(srcs, name, env)
def hStaticObjs(name, srcs, env = None): if env is None: env = wrpManager.getEnv() return wrpManager.toStaticObjects(srcs, name, env)
def hAddLibraryPath(path, env = None): if env is None: env = wrpManager.getEnv() env.AppendUnique(LIBPATH = [path])
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
def hAddCppDefine(key, val = None, env = None): if env is None: env = wrpManager.getEnv() env.Append(CPPDEFINES = {key: val})
def hAddLinkFlags(*args, **envDef): env = envDef.get('env', None) if not env: env = wrpManager.getEnv() for arg in args: env.AppendUnique(LINKFLAGS = arg)