def parse(self, context): filters_file = get_actual_filename(context, context.vcxproj_path + '.filters') if filters_file is not None: self.filters = get_xml_data(context, filters_file) tree = context.vcxproj['tree'] root = tree.getroot() self._parse_nodes(context, root) context.flags.apply_flags_to_context(context) context.files.apply_files_to_context(context) context.dependencies.apply_target_dependency_packages(context) if not context.has_only_headers: context.flags.define_pch_cpp_file(context)
def search_file_path(context, xml_file): """ Util function for checking file in path. """ xml_file = set_unix_slash(xml_file) found_xml_file = get_actual_filename(context, xml_file) if found_xml_file is None: message(context, '{0} file not exists. '.format(xml_file), 'error') return None if found_xml_file != xml_file: message(context, 'file reference probably has wrong case {0}'.format(xml_file), 'warn4') return found_xml_file
def parse(self, context): context.xml_data = get_vcxproj_data(context, context.vcxproj_path) filters_file = get_actual_filename(context, context.vcxproj_path + '.filters') if filters_file is not None: self.filters = get_xml_data(context, filters_file) tree = context.xml_data['tree'] root = tree.getroot() context.current_node = root self._parse_nodes(context, root) context.current_node = None context.flags.apply_flags_to_context(context) context.files.apply_files_to_context(context) context.dependencies.apply_target_dependency_packages(context) if context.sources: context.flags.define_pch_cpp_file(context)