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

Unified Diff: pylib/gyp/MSVSSettings.py

Issue 140483003: Quell warnings for exclusion list dictionaries in MSVS generator. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 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 | « no previous file | pylib/gyp/MSVSSettings_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/MSVSSettings.py
===================================================================
--- pylib/gyp/MSVSSettings.py (revision 1842)
+++ pylib/gyp/MSVSSettings.py (working copy)
@@ -403,6 +403,9 @@
return s
+_EXCLUDED_SUFFIX_RE = re.compile('^(.*)_excluded$')
+
+
def ConvertToMSBuildSettings(msvs_settings, stderr=sys.stderr):
"""Converts MSVS settings (VS2008 and earlier) to MSBuild settings (VS2010+).
@@ -429,10 +432,19 @@
print >> stderr, ('Warning: while converting %s/%s to MSBuild, '
'%s' % (msvs_tool_name, msvs_setting, e))
else:
- # We don't know this setting. Give a warning.
- print >> stderr, ('Warning: unrecognized setting %s/%s '
- 'while converting to MSBuild.' %
- (msvs_tool_name, msvs_setting))
+ # This may be unrecognized because it's an exclusion list. If the
+ # setting name has the _excluded suffix, then check the root name.
+ unrecognized = True
+ m = re.match(_EXCLUDED_SUFFIX_RE, msvs_setting)
+ if m:
+ root_msvs_setting = m.group(1)
+ unrecognized = root_msvs_setting not in msvs_tool
+
+ if unrecognized:
+ # We don't know this setting. Give a warning.
+ print >> stderr, ('Warning: unrecognized setting %s/%s '
+ 'while converting to MSBuild.' %
+ (msvs_tool_name, msvs_setting))
else:
print >> stderr, ('Warning: unrecognized tool %s while converting to '
'MSBuild.' % msvs_tool_name)
« no previous file with comments | « no previous file | pylib/gyp/MSVSSettings_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698