mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
VSProject: Handle tuples in CPPDEFINES:
The VSProject generator now handles tuples in addition to strings and dicts when converting environment variables such as CPPDEFINES.
This commit is contained in:
committed by
Vinnie Falco
parent
34f0f9dcf1
commit
b8c716a918
@@ -124,9 +124,12 @@ def itemList(items, sep):
|
||||
return items
|
||||
def gen():
|
||||
for item in xsorted(items):
|
||||
if type(item) == dict:
|
||||
if isinstance(item, dict):
|
||||
for k, v in xsorted(item.items()):
|
||||
yield k + '=' + v
|
||||
elif isinstance(item, (tuple, list)):
|
||||
assert len(item) == 2, "Item shoud have exactly two elements: " + str(item)
|
||||
yield '%s=%s' % tuple(item)
|
||||
else:
|
||||
yield item
|
||||
yield sep
|
||||
|
||||
Reference in New Issue
Block a user