Chromium Code Reviews| Index: pylib/gyp/win_tool.py |
| diff --git a/pylib/gyp/win_tool.py b/pylib/gyp/win_tool.py |
| index 22dea0dbff133039da0b837dbcd2c32fe8f391e0..2680341f5e509e0ebf2841cda14c0f003116a167 100755 |
| --- a/pylib/gyp/win_tool.py |
| +++ b/pylib/gyp/win_tool.py |
| @@ -299,5 +299,17 @@ class WinTool(object): |
| dir = dir[0] if dir else None |
| return subprocess.call(args, shell=True, env=env, cwd=dir) |
| + def ExecClCompile(self, project_dir, selected_files): |
| + """Executed by msvs-ninja projects when the 'ClCompile' target is used to |
| + build selected C/C++ files.""" |
| + build_dir = os.path.dirname(os.path.realpath(__file__)) |
| + project_dir = os.path.relpath(project_dir, build_dir) |
|
scottmg
2014/03/18 17:04:12
BASEDIR from above instead of local build_dir
|
| + selected_files = selected_files.split(';') |
| + ninja_targets = [os.path.join(project_dir, filename) + '^^' |
| + for filename in selected_files] |
| + cmd = ['ninja.exe'] |
| + cmd.extend(ninja_targets) |
| + return subprocess.call(cmd, shell=True, cwd=build_dir) |
| + |
| if __name__ == '__main__': |
| sys.exit(main(sys.argv[1:])) |