Support CMake generated build files

Chromium does not use CMake, however ninja with Goma is used by LLVM
team.

Change-Id: I38349d0574048b22b32365e45c587e604e045442
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2572805
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
changes/05/2572805/4
Vitaly Buka 5 years ago committed by LUCI CQ
parent ca45aff391
commit b2c18f2f62

@ -87,8 +87,14 @@ if os.path.exists(os.path.join(output_dir, 'args.gn')):
line_without_comment):
use_remote_build = True
continue
elif os.path.exists(os.path.join(output_dir, 'rules.ninja')):
with open(os.path.join(output_dir, 'rules.ninja')) as file_handle:
else:
for relative_path in [
'', # GN keeps them in the root of output_dir
'CMakeFiles'
]:
path = os.path.join(output_dir, relative_path, 'rules.ninja')
if os.path.exists(path):
with open(path) as file_handle:
for line in file_handle:
if re.match(r'^\s*command\s*=\s*\S+gomacc', line):
use_remote_build = True

Loading…
Cancel
Save