def __parse_additional_options(context, node): parent = node.getparent() parent_tag = Parser.strip_namespace(parent.tag) if parent_tag == 'ClCompile': node.tag = 'CompileAdditionalOptions' context.flags.set_flag(context, node) if parent_tag == 'Link': node.tag = 'LinkAdditionalOptions' context.flags.set_flag(context, node)
def __parse_file_nodes(self, context, files_container, file_node, source_group): if self.filters: source_group = self.__get_source_group_from_filters( file_node, Parser.strip_namespace(file_node.tag)) file_context = context.files.add_file_from_node( context, files_container=files_container, file_node=file_node, file_node_attr='Include', source_group=source_group) self._parse_nodes(file_context, file_node) context.warnings_count += file_context.warnings_count
def __parse_file_relative_path(self, context, attr_name, attr_value, file_node): del attr_name, attr_value source_group = '' parent = file_node.getparent() if Parser.strip_namespace(parent.tag) == 'Filter': source_group = parent.attrib['Name'] file_context = context.files.add_file_from_node( context, files_container=context.sources, file_node=file_node, file_node_attr='RelativePath', source_group=source_group) self._parse_nodes(file_context, file_node) context.warnings_count += file_context.warnings_count
def __parse_whole_program_optimization(context, node): """ Set Whole Program Optimization: /GL and /LTCG and INTERPROCEDURAL_OPTIMIZATION """ parent = node.getparent() parent_tag = Parser.strip_namespace(parent.tag) if parent_tag == 'ClCompile': node.tag = 'CompileWholeProgramOptimization' context.flags.set_flag(context, node) if parent_tag == 'PropertyGroup': if node.text in ('true', 'PGInstrument', 'PGOptimize', 'PGUpdate'): context.settings[context.current_setting][ 'INTERPROCEDURAL_OPTIMIZATION'] = ['TRUE'] else: context.settings[context.current_setting]['INTERPROCEDURAL_OPTIMIZATION'] =\ ['FALSE']
def __init__(self): Parser.__init__(self) self.filters = None
def __init__(self): Parser.__init__(self) self.common_diagnostics_value = None self.common_runtime_checks_value = None self.source_group = ''