Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Unified Diff: pylib/gyp/win_tool.py

Issue 203383003: Support building selected C/C++ files in msvs-ninja (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:]))
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698