Esempio n. 1
0
                                datefmt='%H:%M:%S',
                                level = logging.DEBUG);
#logger = logging.getLogegr()
#logger.
#logging.debug('Starting...')


#
# Get configuration.
#
contexo_config_path = os.path.join( ctx_common.getUserCfgDir(), ctx_sysinfo.CTX_CONFIG_FILENAME )
infoMessage("Using config file '%s'"%contexo_config_path,  1)
cfgFile = ctx_cfg.CFGFile( contexo_config_path )

#legacy code: to be rewritten
setInfoMessageVerboseLevel( int(cfgFile.getVerboseLevel()) )

CTX_DEFAULT_BCONF = cfgFile.getDefaultBConf().strip(" '")

#TODO: make args not global in ctx.py
#------------------------------------------------------------------------------
def deprecated_tolerate_missing_headers_warning(args):
    if args.tolerate_missing_headers:
        warningMessage('--tolerate-missing-headers is deprecated and redunant. The default is to ignore missing headers and let the compiler abort compilation if necessary. To get the old behaviour where contexo aborts when headers are missing: use the \'--fail-on-missing-headers\' option.')

#------------------------------------------------------------------------------
def getBuildConfiguration( cview ,  args):
    from contexo import ctx_bc
    from contexo import config

    if args.bconf != None:
Esempio n. 2
0
import os
import contexo.ctx_bc
import contexo.ctx_cmod
import contexo.ctx_msvc
import contexo.ctx_cfg as ctx_cfg
import contexo.ctx_common as ctx_common
import contexo.ctx_sysinfo as ctx_sysinfo

msgSender = 'MSVC Export'

default_projname = "MSVC_EXPORT"

contexo_config_path = os.path.join( ctx_common.getUserCfgDir(), ctx_sysinfo.CTX_CONFIG_FILENAME )
infoMessage("Using config file '%s'"%contexo_config_path,  1)
cfgFile = ctx_cfg.CFGFile( contexo_config_path)
ctx_common.setInfoMessageVerboseLevel( int(cfgFile.getVerboseLevel()) )

#------------------------------------------------------------------------------
def create_module_mapping_from_module_list( ctx_module_list, depMgr):
    code_module_map = list()
    print >>sys.stderr, 'mapping'
    for mod in ctx_module_list:
        #srcFiles = list()
        privHdrs = list()
        pubHdrs  = list()
        depHdrDirs = set()

        rawMod = ctx_module_list[mod] #ctx_cmod.CTXRawCodeModule( mod )

        srcs = rawMod.getSourceAbsolutePaths()
        privHdrs= rawMod.getPrivHeaderAbsolutePaths()
Esempio n. 3
0
compFiles   = options['--comp']
bcFile      = options['--bc'][0]
outputPath  = options['--o'][0]
libDir      = options['--sl'][0]
hdrDir      = options['--sh'][0]
switchEnv   = bool( options.has_key('--env' ) )
compSubDirs = bool( options.has_key('--sc') )
genLogFile  = bool( options.has_key('--log') )
logFilename = 'ctxbuildlog.xml'

if genLogFile and len(options['--log']) != 0:
    logFilename = options['--log'][0]

verbose     = bool( options.has_key('--verb' ) )
if verbose:
    ctx_common.setInfoMessageVerboseLevel( 4 )


envFiles = list()
if switchEnv:
    envFiles = options['--env']

    # Add our internal environment if not already done by user.
    sysEnv = os.path.join( getUserDir(), 'ctx.env')
    if sysEnv not in envFiles:
        envFiles.append( sysEnv )

#
# Perform environment switch if required
#
global envRestore