Remove duplicated values in array options
Array options can receive duplicated values, which can produce
errors if case those duplicated values make processing some
elements twice when they are expected to be processed only once.
@@ -147,7 +147,7 @@ class UserArrayOption(UserOption):
if value.startswith('['):
newvalue = ast.literal_eval(value)
else:
- newvalue = [v.strip() for v in value.split(',')]
+ newvalue = [v.strip() for v in OrderedDict.fromkeys(value.split(','))]
if not isinstance(newvalue, list):
raise MesonException('"{0}" should be a string array, but it is not'.format(str(newvalue)))
for i in newvalue:
