From 9376a275d850e90b559d677619e40eee423a6f27 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Fri, 18 Sep 2020 15:34:21 -0400 Subject: [PATCH] [gn build] Do not sync filenames containing variable references --- utils/gn/build/sync_source_lists_from_cmake.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/gn/build/sync_source_lists_from_cmake.py b/utils/gn/build/sync_source_lists_from_cmake.py index a54483da8e5..ae65b50b1b5 100755 --- a/utils/gn/build/sync_source_lists_from_cmake.py +++ b/utils/gn/build/sync_source_lists_from_cmake.py @@ -61,10 +61,10 @@ def sync_source_lists(write): gn_files = git_out(['ls-files', '*BUILD.gn']).splitlines() # Matches e.g. | "foo.cpp",|, captures |foo| in group 1. - gn_cpp_re = re.compile(r'^\s*"([^"]+\.(?:cpp|c|h|S))",$', re.MULTILINE) + gn_cpp_re = re.compile(r'^\s*"([^$"]+\.(?:cpp|c|h|S))",$', re.MULTILINE) # Matches e.g. | bar_sources = [ "foo.cpp" ]|, captures |foo| in group 1. gn_cpp_re2 = re.compile( - r'^\s*(?:.*_)?sources \+?= \[ "([^"]+\.(?:cpp|c|h|S))" ]$', + r'^\s*(?:.*_)?sources \+?= \[ "([^$"]+\.(?:cpp|c|h|S))" ]$', re.MULTILINE) # Matches e.g. | foo.cpp|, captures |foo| in group 1. cmake_cpp_re = re.compile(r'^\s*([A-Za-z_0-9./-]+\.(?:cpp|c|h|S))$',