diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-07-08 11:51:48 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-07-13 22:23:44 +0200 |
commit | bd96a6f7b7eb103f97bcd6eadc21908187e94dce (patch) | |
tree | c4ace9ff4cab817915c9b00496a79e83ea2f7a34 /bin/gbuild-to-ide | |
parent | a3c3ab7394f578340c33e6e1cd8da13196a8b596 (diff) |
Don't rely on Python's treatment of unrecognized escape sequences
According to [1]:
> Changed in version 3.6: Unrecognized escape sequences produce a DeprecationWarning.
> In a future Python version they will be a SyntaxWarning and eventually a SyntaxError.
[1] https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
Change-Id: Ia4f79f17ccb121f423f35b1e1306d5ae285e8762
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98321
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'bin/gbuild-to-ide')
-rwxr-xr-x | bin/gbuild-to-ide | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide index f23592469fd9..7a6964abd454 100755 --- a/bin/gbuild-to-ide +++ b/bin/gbuild-to-ide @@ -94,12 +94,12 @@ class GbuildParser: (self.libs, self.exes, self.tests, self.modulenamelist) = ([], [], [], []) (self.target_by_path, self.target_by_location) = ({}, {}) - includepattern = re.compile('-I(\S+)') - isystempattern = re.compile('-isystem\s*(\S+)') - warningpattern = re.compile('-W\S+') - libpattern = re.compile('Library_(.*)\.mk') - exepattern = re.compile('Executable_(.*)\.mk') - testpattern = re.compile('CppunitTest_(.*)\.mk') + includepattern = re.compile(r'-I(\S+)') + isystempattern = re.compile(r'-isystem\s*(\S+)') + warningpattern = re.compile(r'-W\S+') + libpattern = re.compile(r'Library_(.*)\.mk') + exepattern = re.compile(r'Executable_(.*)\.mk') + testpattern = re.compile(r'CppunitTest_(.*)\.mk') @staticmethod def __split_includes(includes): @@ -1071,7 +1071,7 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator): proj_name_node = ET.SubElement(globals_node, '{%s}ProjectName' % ns) proj_name_node.text = target.short_name() - ET.SubElement(proj_node, '{%s}Import' % ns, Project='$(VCTargetsPath)\Microsoft.Cpp.Default.props') + ET.SubElement(proj_node, '{%s}Import' % ns, Project='$(VCTargetsPath)\\Microsoft.Cpp.Default.props') for configuration in self.configurations: conf_node = ET.SubElement(proj_node, '{%s}PropertyGroup' % ns, Label="Configuration", Condition="'$(Configuration)|$(Platform)'=='%s|%s'" % (configuration, platform)) @@ -1082,14 +1082,14 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator): platform_toolset_node = ET.SubElement(conf_node, '{%s}PlatformToolset' % ns) platform_toolset_node.text = self.toolset - ET.SubElement(proj_node, '{%s}Import' % ns, Project='$(VCTargetsPath)\Microsoft.Cpp.props') + ET.SubElement(proj_node, '{%s}Import' % ns, Project='$(VCTargetsPath)\\Microsoft.Cpp.props') ET.SubElement(proj_node, '{%s}ImportGroup' % ns, Label='ExtensionSettings') for configuration in self.configurations: prop_sheets_node = ET.SubElement(proj_node, '{%s}ImportGroup' % ns, Label='Configuration', Condition="'$(Configuration)|$(Platform)'=='%s|%s'" % (configuration, platform)) ET.SubElement(prop_sheets_node, '{%s}Import' % ns, - Project='$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props', - Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')", + Project='$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props', + Condition="exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')", Label='LocalAppDataPlatform') ET.SubElement(proj_node, '{%s}PropertyGroup' % ns, Label='UserMacros') @@ -1156,7 +1156,7 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator): hfile = include_abs_path + '.h' if os.path.isfile(hfile): ET.SubElement(includes_node, '{%s}ClInclude' % ns, Include=hfile) - ET.SubElement(proj_node, '{%s}Import' % ns, Project='$(VCTargetsPath)\Microsoft.Cpp.targets') + ET.SubElement(proj_node, '{%s}Import' % ns, Project='$(VCTargetsPath)\\Microsoft.Cpp.targets') ET.SubElement(proj_node, '{%s}ImportGroup' % ns, Label='ExtensionTargets') self.write_pretty_xml(proj_node, project_path) self.write_filters(project_path + '.filters', |