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

Unified Diff: pylib/gyp/generator/msvs.py

Issue 10378042: Correct the order in which OutputDirectory and IntermediateDirectory are defined. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 7 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
Index: pylib/gyp/generator/msvs.py
===================================================================
--- pylib/gyp/generator/msvs.py (revision 1364)
+++ pylib/gyp/generator/msvs.py (working copy)
@@ -31,6 +31,10 @@
VALID_MSVS_GUID_CHARS = re.compile('^[A-F0-9\-]+$')
+# Regex for msvs variable references.
+MSVS_VARIABLE_REFERENCE = re.compile('\$\(([a-zA-Z_][a-zA-Z0-9_]*)\)')
+
+
generator_default_variables = {
'EXECUTABLE_PREFIX': '',
'EXECUTABLE_SUFFIX': '.exe',
@@ -2649,7 +2653,17 @@
if label:
group.append({'Label': label})
num_configurations = len(spec['configurations'])
- for name, values in sorted(properties.iteritems()):
+ def GetEdges(node):
+ edges = set()
+ for value in sorted(properties[node].keys()):
+ edges.update(set([v for v in MSVS_VARIABLE_REFERENCE.findall(value)
+ if v in properties and v != node]))
gab 2012/05/10 13:57:07 It took me a little while to figure out how this w
bradn 2012/05/10 20:17:56 Done
+ return edges
+ properties_ordered = gyp.common.TopologicallySorted(
+ properties.keys(), GetEdges)
+ properties_ordered.reverse()
Nico 2012/05/10 19:20:23 Here too you're reversing twice
bradn 2012/05/10 20:17:56 So I've moved to normal topological order everywhe
+ for name in properties_ordered:
+ values = properties[name]
for value, conditions in sorted(values.iteritems()):
if len(conditions) == num_configurations:
# If the value is the same all configurations,

Powered by Google App Engine
This is Rietveld 408576698