Exemple #1
0
    def process_clcompile_optimization_element(self,value,condition):
        if self.curr_compile_item is None:
            return

        if condition is not None:
            if not evaluate_expression(condition,self.env):
                return

        evaluated_value = evaluate_expression(value,self.env)

        if evaluated_value == "Disabled":
            self.curr_compile_item.add_options.append("-O0")
        else:
            raise RuntimeError,"unsupported optimization value (%s) in project file" % (evaluated_value)
Exemple #2
0
 def process_clcompile_excluded_from_build(self,value,condition):
     if value:
         if condition is not None:
             if evaluate_expression(condition,self.env):
                 self.curr_compile_item = None
         else:
             self.curr_compile_item = None
Exemple #3
0
    def process_clcompile_additional_options(self,options,condition):
        if self.curr_compile_item is None:
            return

        if condition is not None:
            if not evaluate_expression(condition,self.env):
                return

        evaluated_options = substitute_vars(options,self.env)

        self.curr_compile_item.add_options.append(evaluated_options)
Exemple #4
0
    def begin_import(self,project,condition):
        ignore = False if condition is None else evaluate_expression(condition,self.env)

        if ignore:
            return None

        filename = evaluate_expression(project,self.env)

        if self._is_in_ignored_imports_list(filename):
            return None

        star_index = filename.find('*')

        if not os.path.isabs(filename):
            filename = os.path.join(os.path.dirname(self.import_projects_stack[-1]),filename)

        if star_index >= 0:
            filename_list = filter(lambda x : not self._is_in_ignored_imports_list(x),get_file_list_by_mask(filename))
            Setup.on_load_import_file_list(self, filename_list)
            return filename_list
        else:
            Setup.on_load_import_file_list(self, [ filename ])
            return filename
Exemple #5
0
 def begin_import_group(self,label,condition):
     if condition is not None:
         return evaluate_expression(condition,self.env)
     else:
         return True
Exemple #6
0
 def process_link_definition(self,items):
     for item in items:
         self.env.link_env.set_meta_var(item[0],evaluate_expression(item[1],self.env.link_env))
Exemple #7
0
 def process_property(self,name,value):
     self.env.set_var(name,evaluate_expression(value,self.env))
Exemple #8
0
 def begin_property_group(self,label,condition):
     if condition is not None:
         if not evaluate_expression(condition,self.env):
             return False
     return True
Exemple #9
0
    def begin_clcompile_item(self,include):
        include_value = evaluate_expression(include,self.env)
        self.curr_compile_item = CompileItem(include_value)

        return True