<s> "<STR_LIT>" <EOL> import TaskGen , Task , Utils <EOL> from Logs import debug <EOL> import ccroot <EOL> from TaskGen import feature , before , extension , after <EOL> g_cxx_flag_vars = [ <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> "<STR_LIT>" <EOL> EXT_CXX = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> g_cxx_type_vars = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> class cxx_taskgen ( ccroot . ccroot_abstract ) : <EOL> pass <EOL> @ feature ( '<STR_LIT>' ) <EOL> @ before ( '<STR_LIT>' ) <EOL> @ after ( '<STR_LIT>' ) <EOL> def init_cxx ( self ) : <EOL> if not '<STR_LIT>' in self . features : <EOL> self . mappings [ '<STR_LIT>' ] = TaskGen . task_gen . mappings [ '<STR_LIT>' ] <EOL> self . p_flag_vars = set ( self . p_flag_vars ) . union ( g_cxx_flag_vars ) <EOL> self . p_type_vars = set ( self . p_type_vars ) . union ( g_cxx_type_vars ) <EOL> if not self . env [ '<STR_LIT>' ] : <EOL> raise Utils . WafError ( "<STR_LIT>" ) <EOL> @ feature ( '<STR_LIT>' ) <EOL> @ after ( '<STR_LIT>' ) <EOL> def apply_obj_vars_cxx ( self ) : <EOL> """<STR_LIT>""" <EOL> env = self . env <EOL> app = env . append_unique <EOL> cxxpath_st = env [ '<STR_LIT>' ] <EOL> for i in env [ '<STR_LIT>' ] : <EOL> app ( '<STR_LIT>' , cxxpath_st % i . bldpath ( env ) ) <EOL> app ( '<STR_LIT>' , cxxpath_st % i . srcpath ( env ) ) <EOL> for i in env [ '<STR_LIT>' ] : <EOL> app ( '<STR_LIT>' , cxxpath_st % i ) <EOL> @ feature ( '<STR_LIT>' ) <EOL> @ after ( '<STR_LIT>' ) <EOL> def apply_defines_cxx ( self ) : <EOL> """<STR_LIT>""" <EOL> self . defines = getattr ( self , '<STR_LIT>' , [ ] ) <EOL> lst = self . to_list ( self . defines ) + self . to_list ( self . env [ '<STR_LIT>' ] ) <EOL> milst = [ ] <EOL> for defi in lst : <EOL> if not defi in milst : <EOL> milst . append ( defi ) <EOL> libs = self . to_list ( self . uselib ) <EOL> for l in libs : <EOL> val = self . env [ '<STR_LIT>' + l ] <EOL> if val : milst += self . to_list ( val ) <EOL> self . env [ '<STR_LIT>' ] = [ "<STR_LIT>" % ( x [ <NUM_LIT:0> ] , Utils . trimquotes ( '<STR_LIT:=>' . join ( x [ <NUM_LIT:1> : ] ) ) ) for x in [ y . split ( '<STR_LIT:=>' ) for y in milst ] ] <EOL> y = self . env [ '<STR_LIT>' ] <EOL> self . env [ '<STR_LIT>' ] = [ y % x for x in milst ] <EOL> @ extension ( EXT_CXX ) <EOL> def cxx_hook ( self , node ) : <EOL> if getattr ( self , '<STR_LIT>' , None ) : <EOL> obj_ext = self . obj_ext <EOL> else : <EOL> obj_ext = '<STR_LIT>' % self . idx <EOL> task = self . create_task ( '<STR_LIT>' , node , node . change_ext ( obj_ext ) ) <EOL> try : <EOL> self . compiled_tasks . append ( task ) <EOL> except AttributeError : <EOL> raise Utils . WafError ( '<STR_LIT>' % str ( self ) ) <EOL> return task <EOL> cxx_str = '<STR_LIT>' <EOL> cls = Task . simple_task_type ( '<STR_LIT>' , cxx_str , color = '<STR_LIT>' , ext_out = '<STR_LIT>' , ext_in = '<STR_LIT>' , shell = False ) <EOL> cls . scan = ccroot . scan <EOL> cls . vars . append ( '<STR_LIT>' ) <EOL> link_str = '<STR_LIT>' <EOL> cls = Task . simple_task_type ( '<STR_LIT>' , link_str , color = '<STR_LIT>' , ext_in = '<STR_LIT>' , ext_out = '<STR_LIT>' , shell = False ) <EOL> cls . maxjobs = <NUM_LIT:1> <EOL> cls . install = Utils . nada </s>
